glitch
Veteran Member
I had some time to hack around tonight, so I cobbled together something I'd been wanting to do for a little while: I wanted to rethink a previous attempt to interface a HD44780-compatible character display to my S-100 system. My previous attempt had failed due to timing limitations of my unknown-manufacturer surplus 16x2 LCD display, which I'd attempted to interface almost directly to the bus (that is, no PIA chips or anything, only 7400 series logic).
This time around, I decided to let an 8255 PIA do the interfacing with the display...this means that set-up times for the various HD44780 signals doesn't depend on the bus timing. As luck would have it, the S100computers/N8VEM Serial IO board I'd recently started building has an 8255 on-board with Port A and Port B brought out to a header, along with four signals from Port C and +5/GND. I put together a wedge board that connected the Serial IO board to my character display, a Noritake ITRON Vacuum Flourescent Display that's pin-compatible with the HD44780:
I connected the 8 data bits from 8255 Port A to the display's 8 data bits, PC4 to Register Select, and PC5 to Enable. R//W got tied to ground, since I didn't want to bother polling the display to see if it was finished. The little wedge board also contains a 22 uF capacitor and a LED with dropping resistor to indicate power is on.
My Serial IO board is still jumpered as recommended for initial test in the s100computers.com documentation, so the 8255 PIA is addressed at 0xA8-0xAB. To do a simple test, I brought up SID86 under CP/M-86 on my CompuPro 8/16 and did the following:
Kind of tedious, but if you look closely at the picture, you will see "IIIIVVV" printed on the first line -- success! I'll probably write up some ROM routines for initializing the display and pushing chars out to it at some point. I'm thinking of building a more involved board that would contain the HD44780 wedge as well as a set of pushbuttons on Port B and using it as a sort of advanced front panel a la KIM-1 with a monitor in ROM.
This time around, I decided to let an 8255 PIA do the interfacing with the display...this means that set-up times for the various HD44780 signals doesn't depend on the bus timing. As luck would have it, the S100computers/N8VEM Serial IO board I'd recently started building has an 8255 on-board with Port A and Port B brought out to a header, along with four signals from Port C and +5/GND. I put together a wedge board that connected the Serial IO board to my character display, a Noritake ITRON Vacuum Flourescent Display that's pin-compatible with the HD44780:
I connected the 8 data bits from 8255 Port A to the display's 8 data bits, PC4 to Register Select, and PC5 to Enable. R//W got tied to ground, since I didn't want to bother polling the display to see if it was finished. The little wedge board also contains a 22 uF capacitor and a LED with dropping resistor to indicate power is on.
My Serial IO board is still jumpered as recommended for initial test in the s100computers.com documentation, so the 8255 PIA is addressed at 0xA8-0xAB. To do a simple test, I brought up SID86 under CP/M-86 on my CompuPro 8/16 and did the following:
Code:
QOAB,80 ;Output 0x80 to the 8255 control reg, all bits output
QOAA,20 ;0x20 -> Port C, set Enable, RS = 0
QOA8,30 ;0x30 -> Port A
QOAA,00 ;Clear Enable, cause the HD44780 to process the command
QOAA,20 ;Set Enable for next command
QOAA,00 ;Process 0x30 again
QOAA,20
QOAA,00 ;And once more
QOAA,20
QOA8,38 ;0x38 -> Port A, set 8 bit mode, 2 lines
QOAA,00
QOAA,20
QOA8,08 ;Set no shift, no cursor
QOAA,00
QOAA,20
QOA8,01 ;Clear display and move to home pos
QOAA,00
QOAA,20
QOA8,06 ;Move cursor right
QOAA,00
QOAA,20
QOA8,0C ;Turn display on
QOAA,30 ;0x30 -> Port C, Set Enable and RS=1
QOA8,49 ;0x49 -> Port A, ASCII "I"
QOAA,10 ;Write char to display
QOAA,30
Kind of tedious, but if you look closely at the picture, you will see "IIIIVVV" printed on the first line -- success! I'll probably write up some ROM routines for initializing the display and pushing chars out to it at some point. I'm thinking of building a more involved board that would contain the HD44780 wedge as well as a set of pushbuttons on Port B and using it as a sort of advanced front panel a la KIM-1 with a monitor in ROM.