Introduction
Let me make this perfectly clear, this project has nothing to do with the Commodore CD1200,
CD32 drive for the Amiga.
That said, this is an A1200 clockport interface for Peter Gordon's CD1200 project. It provides a
24 bit I/O port and LCD interface to the A1200.
I was asked by Peter to adapt my existing 24 bit I/O card for the clockport. No easy task as the
lack of space gave me a few headaches at first, especially as I could not use surface mount parts.
I persevered and came up with a design.
Feature list
24 programmable I/O pins, (23 available)
currently configured for 16 inputs and 7 outputs.
Capable of controlling an 18 character by 2 line LCD display.
Current Status (4th May 2004)
Two prototype PCBs have been manufactured and sent to Peter. He has yet to build them.
I prototyped the interface using my A1200 and some basic test software to drive it.
Here is a picture of the current prototype PCBs.
Schematic
Click on the thumbnail below for the full schematic.
Here are my design notes
CD1200 Interface board notes + programming information
LCD Connector
The PCB is designed to take a 16 way IDC socket + ribbon cable.
Pins 1 & 16 are marked on the silkscreen to aid in orientation.
The idea is that, allowing for most LCDs using a standard 16 way x 1 line
LCD connector you can easily wire pin 1 to pin 1, pin 2 to pin 2 etc with
no cross overs, allowing for the IDC cable wiring, may need a drawing of this.
I/O connections
It is a good idea to use Berg pin header/pin strip or single in line IC sockets
for the I/O connections as this will stand repeated connections if necessary.
Holes in the board
The two big holes in the PCB are for support legs, nothing more.
Programming information
The Intel 8255 has 4 registers:
Port A
Port B
Port C
Control
Port A-C are the I/O registers, the control register sets the I/O port direction
and mode of operation, more on this later.
Memory Addresses
The chip is mapped into the following addresses;
Port A $D80001
Port B$D80005
Port C$D80009
Control$D8000D
All accesses to these addresses must be word aligned/size.
i.e. write an int to address $D80001
Remember of course that the addresses are 32 bit in size.
8255 Control word
This controls the operation of the chip and I copied this from the datasheet.
D7 D6 D5 D4 D3 D2 D1 D0
| | | | | | | |
| | | | | | | --- Port C lower 4 bits, 1 = input, 0 = output.
| | | | | | --------Port B, 1 = input, 0 = output.
| | | | | ------------Mode selection, 0 = mode 0, 1 = mode 1.
| | | | |---------------Port C upper 4 bits, 1 = input, 0 = output.
| | | |-------------------Port A, 1 = input, 0 = output.
| | |-----------------------} Mode selection 00 = Mode 0
| |---------------------------} 01 = Mode 1
| 1X = Mode 2*
|------------------------------- Mode set flag
*Normally you can operate this fine in Mode 0
So the set the chip to mode 0, Port A as output, Port B all input, Port C 4
bits in and 4 bits out (correct for this card) you would write:
00100010 or $22
Then to write to the output port A you write a word/int to address $D80001
To read an input at port B, you read an int from $D80005
That should cover the I/O in general.
LCD control
-----------
Nearly forgot this, the LCD is mapped to a specific address, $D8001D
With reference to the RS partnumber/datasheet 287-0536
The LCD can operate in two modes, data mode on control mode.
Output PC0 of the 8255 controls this.
When PC0 = 0 control/config mode.
When PC0 = 1 data mode.
To send/read messages from the display, PC0 = 1
See page 6 of the datasheet for full details of the available control modes.
Note: From experience, you often have to wait 50us or more between some
writes to the LCD display.
PCB power
The board is designed to be powered from a fixed +5V supply. There is a 2.1 mm jack
plug connector which can be used. Ensure the tip (inside of the barrel) is positive.
You could wire to the underside of the power connector if you so wish. The PCB pad nearest
the mounting hole is +5V, either of the other 2 pads will do for 0VL.
That's it for now.
Ian Stedman, 4th May 2004.
Updated 30 August 2010