AMI LCD Screen output
A bit of fun now! Using one of AY-8910 ports to drive a 20*2 character LCD/OLED screen. These LCD/OLED screens can be found quite easily on eBay. Make sure the LCD's built in controller is compatible with HD44780 chip, most are. The one we have used has 2 lines of 20 characters 5x8 dots and is a OLED type. Your LCD unit will come with a data sheet check the pin outs, most have 16 pins to interface to. Note that some LCD units have a back light. The OLED display emits light already and does not need a back light
The display operates in 4-bit mode and is controlled by port A. The display needs a single 5v supply, as we have added that to the port it is fairly easy to wire up. Note that in the above image I have soldered some header pins the unit so I can use a header socket. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
Wiring of LCD Screen to Port A on AMI V1-f
† 10K Potentiometer Brightness Wiring. pot pin 1 connect to 0V Pot pin 2 (middle pin) connect to LCD pin 3 Brightness adjustment control. pot pin 3 connect to 5v If you like, you can mount the pot with the connections on a veroboard strip, I have also included a jumper here (in yellow) as a switch in the 5+ line to reset the LCD controller. You should also be able to spot the pot in black. A capacitor has also been added, 220uf, across the 0+ and 5v power lines to help to stabilize the supply. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
LCD ACEForth Words.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
Edwin worked his magic again to come up with some AceForth words to send commands and data to the LCD screen.
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
: SR ( Select Register) 65533 OUT ; : WR (Write Register) 49149 OUT ; : WN ( Write Nibble) DUP 64 OR WR WR ; : WC ( Write Command) DUP 16 / WN 15 AND WN ; : WD ( Write Data) DUP 16 / 128 OR WN 15 AND 128 OR WN ; : LCD (Initialize LCD after power on) 7 SR 127 WR (Port A for Output,no sound) 14 SR 2 WN (Function set 4-bit mode) 40 WC (Function set, 2 lines, 5x8 font) 1 WC (clear display) 15 WC (display on, blinking cursor) 6 WC (entry mode set) ; LCD (will initialize the LCD unit after power up) (this only needs to be done once after a power up) 65 WD (will display A to the LCD)
Some useful LCD commands.
ACEforth Function. 1 WC Clear display. 2 WC Cursor home, selects display address 0 and disables scroll. 4 WC Write char at cursor and move cursor left mode. 5 WC Write char at cursor and scroll display right mode. 6 WC Write char at cursor and move cursor right mode. 7 WC Write char at cursor and scroll display left mode. 8 WC Display off. 12 WC Display on without cursor. 14 WC Display on with cursor. 15 WC Display on with blinking cursor. 16 WC Move cursor left. 20 WC Move cursor right. 24 WC Scroll display left. 28 WC Scroll display right. 128+0..39 WC Select top line column, set character mode. 128+64..103 WC Select bottom line column, set character mode. 64+0..63 WC Select graphic ram addr, set graphic mode. | ||||||||||||||||||||||||||||||||||||||||||||||||||||
|