# PiTerm1986 **GOAL:** Convert 80s style user interface ( 8031 based ADP Product: chicklet keyboard and 2x20 lcd ) to pi zero based terminal using i2c based io expanders. ![](images/IMG_3780.jpg) ![](images/IMG_3784.jpg) ![](images/IMG_3783.jpg) ![](images/IMG_3782.jpg) ![](images/IMG_3781.jpg) Looking under the keyboard membrane and tracing the connectors we can get the following key map under a 4x12 array (16 pins). ``` 0123456789A B -------------------- 0) *# ZXCVBNM/ 1) -LASDFGHJK 2) 0912345678 3) POQWERTYUI ```
*# ZXCVBNM/STOP
-LASDFGHJKN/CENTER
0912345678<----START
POQWERTYUICANCELDIAL
### Keyboard ![](images/IMG_3779.jpg) For this we look at the AW9523 GPIO expander with 16 pins of io. ### LCD/VFD Since the LCD is a 5v circuit requiring either 8 or 12 pins we look at the Microchip MCP23017 on the Adafruit GPIO Expander Bonnet which we can wire either using both ports or one port in nibble mode. ![](images/HD44780.jpg) ### Attaching Both Boards to the Raspberry pi. ![](images/IMG_3791.jpg) ![](images/IMG_3789.jpg) ![](images/IMG_3793.jpg) ``` root@somepi1:/home/feurig# i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- 58 -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- ``` # References * [https://learn.adafruit.com/adafruit-aw9523-gpio-expander-and-led-driver](https://learn.adafruit.com/adafruit-aw9523-gpio-expander-and-led-driver) * [AW9523 Datasheet](https://cdn-shop.adafruit.com/product-files/4886/AW9523+English+Datasheet.pdf) * [https://learn.adafruit.com/gpio-expander-bonnet/overview](https://learn.adafruit.com/gpio-expander-bonnet/overview) * [MCP23017 Datasheet](http://ww1.microchip.com/downloads/en/devicedoc/20001952c.pdf) * [https://protostack.com.au/2010/03/character-lcd-displays-part-1/](https://protostack.com.au/2010/03/character-lcd-displays-part-1/) * [https://www.electronicsforu.com/technology-trends/learn-electronics/16x2-lcd-pinout-diagram](https://www.electronicsforu.com/technology-trends/learn-electronics/16x2-lcd-pinout-diagram)