MAG-85 Construction:

44780-Controlled LCD Interface



Why an LCD?

It's not as retro as an LED display, and it's more dependent on software, but it's cheap and requires very little support hardware.

Talk to Me

When an LED's Just Not Enough

So far, our communication with the MAG-85 has been through a push button and a single LED. It's time to give the MAG-85 more to say than "blink".

2x16 44780-Controlled LCD Display
The MAG-85 Gets Talkative. And Multi-Lingual.

Output 00

Using the "4-bit" interface mode for the LCD, we can talk to it using a single output port. Before we can hook up the LCD, we need an output port. Since there's going to be more than one output device when we're done, we need select circuitry. Then we need a latch to transfer the data to the LCD.

I/O Select Circuit

The 8085 uses its address lines to select up to 256 possible input ports and output ports. It puts out an 8 bit port address on its lower address lines along with an ALE strobe to allow the address to be captured. It also puts out the same 8 bit port address on its upper 8 address lines, and here the address is held through the transfer time. For that reason some designers prefer to use the upper 8 bits for selecting the I/O port. For this design, I chose to use the lower 8 bits since they are buffered by the latch. That way I don't have to worry about overloading the upper lines, or adding a buffer, if at some point down the road I add more memory devices to the system.

If I only had one input device and one output device I wouldn't need to use a port address at all. I could safely assume that any IN operation was for my one input device, and any OUT operation is going to my one output device. All I would need as selects would be the IO/M line and the /RD line for the input device, the /WR line for the output device. I could use an addressable latch for each with no additional logic. If I were trying for absolute minimalism here, that's what I'd do.

Another approach would be to use each address line with addressable latches. If the latch had three address lines, IO/M, one address line, and either /RD or /WR could be used to select it. This would allow up to eight inputs and eight outputs. Plenty for my application.

The problem is that chips with that many address lines don't latch 8 bits. It would take 2 packages per input or output to handle 8 bits. That's 16 packages. Right now I'm not buffering the data lines on the 8085. If I were to build for that many packages, I'd want to buffer--even with modern CMOS chips on the bus.

Instead, I use a pair of 74HC138 decoders. One for inputs, one for outputs. Each one gives me 8 select lines. For the MAG-85, 4 selects would be enough, but dropping to 4 I/Os wouldn't save me any chips on the board so it might as well be 8.

Here's the circuit (click to enlarge):

I/O Select Circuit for MAG-85
I/O Select Circuit Showing Select Lines to LCD Latch and Keyboard Encoder

Part 2: The I/O Port >>

LCD Display Page: 1  2  3


<< Mag-85 Home