From 5d5bb445348f5fd2c0cd281289f9f53dafe3af23 Mon Sep 17 00:00:00 2001 From: feurig Date: Mon, 14 Jun 2021 22:26:27 -0700 Subject: Add a working vfd in place of the lcd --- PiTerm.py | 8 ++++++ README.md | 51 ++++++++++++++++++++++++++++++++++--- images/IMG_3789.jpg | Bin 1053112 -> 431766 bytes images/IMG_3809.jpg | Bin 0 -> 927103 bytes images/layout.jpg | Bin 0 -> 1246108 bytes images/piterm1986pahts.jpg | Bin 0 -> 1143278 bytes images/raspberry_pi_pilcdplate.png | Bin 0 -> 18694 bytes 7 files changed, 55 insertions(+), 4 deletions(-) create mode 100755 images/IMG_3809.jpg create mode 100755 images/layout.jpg create mode 100755 images/piterm1986pahts.jpg create mode 100644 images/raspberry_pi_pilcdplate.png diff --git a/PiTerm.py b/PiTerm.py index 08852c8..13653f0 100644 --- a/PiTerm.py +++ b/PiTerm.py @@ -3,3 +3,11 @@ keymap.append('*# ZXCVBNM/\001') keymap.append('-LASDFGHJK\r\n') keymap.append('0912345678\010\002') keymap.append('POQWERTYUI\030\004') + +import busio +import adafruit_character_lcd.character_lcd_rgb_i2c as character_lcd +lcd_columns = 24 +lcd_rows = 2 +i2c = busio.I2C(board.SCL, board.SDA) +lcd = character_lcd.Character_LCD_RGB_I2C(i2c, lcd_columns, lcd_rows) +lcd.message = "Hello\nCircuitPython" diff --git a/README.md b/README.md index 29be54a..c26be80 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ Looking under the keyboard membrane and tracing the connectors we can get the following key map under a 4x12 array (16 pins). ``` - 0123456789A B + 0123456789A(10)B(11) -------------------- 0) *# ZXCVBNM/ -1) -LASDFGHJK +1) -LASDFGHJK 2) 0912345678 3) POQWERTYUI ``` @@ -39,9 +39,9 @@ Since the LCD is a 5v circuit requiring either 8 or 12 pins we look at the Micro ![](images/HD44780.jpg) ### Attaching Both Boards to the Raspberry pi. -![](images/IMG_3791.jpg) + +![](images/piterm1986pahts.jpg) ![](images/IMG_3789.jpg) -![](images/IMG_3793.jpg) ``` root@somepi1:/home/feurig# i2cdetect -y 1 @@ -55,6 +55,49 @@ root@somepi1:/home/feurig# i2cdetect -y 1 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- ``` + +## Assembly and layout. +After putting the board in the box I realized that the grey paint was conductive and that I almost let the smoke out of the pi zero. (you could smell it). So I went out and found a piece of plastic from a previous project. + +![](images/layout.jpg) + +### So there's a circuitpython library for an mcp23017 connected to an lcd. + +``` +root@somepi1:/home/feurig# pip3 install adafruit-circuitpython-charlcd +... +``` + +![](images/raspberry_pi_pilcdplate.png) + +I am not thrilled about the way its wired but whatever. + +## And then I was like OH SHIT I have Noritake 2x24 VFD thats a close fit.. + +Wiring it up according to the above schematic lets us write away + +``` +root@somepi1:/home/feurig# python3 +Type "help", "copyright", "credits" or "license" for more information. +>>> import board +>>> import busio +>>> import adafruit_character_lcd.character_lcd_rgb_i2c as character_lcd +>>> lcd_columns = 24 +>>> lcd_rows = 2 +>>> i2c = busio.I2C(board.SCL, board.SDA) +>>> lcd = character_lcd.Character_LCD_RGB_I2C(i2c, lcd_columns, lcd_rows) +>>> lcd.message = "Hello\nPiTerm1986" +>>> lcd.clear() +>>> lcd.message = "Hello\nPiTerm1982" +>>> +``` + +![](images/IMG_3809.jpg) + + + + + # 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) diff --git a/images/IMG_3789.jpg b/images/IMG_3789.jpg index 13cea76..95d77ce 100755 Binary files a/images/IMG_3789.jpg and b/images/IMG_3789.jpg differ diff --git a/images/IMG_3809.jpg b/images/IMG_3809.jpg new file mode 100755 index 0000000..d883a75 Binary files /dev/null and b/images/IMG_3809.jpg differ diff --git a/images/layout.jpg b/images/layout.jpg new file mode 100755 index 0000000..ad6f491 Binary files /dev/null and b/images/layout.jpg differ diff --git a/images/piterm1986pahts.jpg b/images/piterm1986pahts.jpg new file mode 100755 index 0000000..25f957a Binary files /dev/null and b/images/piterm1986pahts.jpg differ diff --git a/images/raspberry_pi_pilcdplate.png b/images/raspberry_pi_pilcdplate.png new file mode 100644 index 0000000..dd85580 Binary files /dev/null and b/images/raspberry_pi_pilcdplate.png differ -- cgit v1.2.3