@@ -3,9 +3,19 @@ lcd_api and i2c_lcd
33
44Python code for talking to HD44780 compatible character based dot matrix LCDs.
55
6+ ## Other ports
7+
68This code is synchronous. Peter Hinch put together an async driver for
79the HD77480 over [ here] ( https://github.com/peterhinch/micropython-async/tree/master/HD44780 ) .
810
11+ This library is based off of a C version that I wrote, which can be found
12+ [ here] ( https://github.com/dhylands/projects/blob/master/common/lcd-api.c )
13+ (also look for files in the same directory which start with lcd).
14+
15+ Nic created a C# port of this library which can be found [ here] ( https://github.com/OfItselfSo/CS_LCD ) .
16+
17+ ## Communicating with the LCD
18+
919You can communicate with the LCDs using either 4 or 8 GPIO pins.
1020
1121Alternatively, the I2C classes implement 8-bit GPIO expander boards
@@ -29,8 +39,7 @@ Files starting with **nodemcu_** were tested on a
2939The files containing ** adafruit_lcd** were tested on an Adafruit
3040[ I2C / SPI character LCD backpack] ( https://www.adafruit.com/product/292 )
3141
32- Files
33- =====
42+ ## Files
3443
3544| File | Description |
3645| ----- | ----------- |
@@ -60,9 +69,6 @@ file is used.
6069** i2c_lcd.py** was tested on a [ BeagleBone Black] ( https://beagleboard.org/black ) using a 2 x 16 LCD with an I2C
6170module similar to [ this one] ( http://arduino-info.wikispaces.com/LCD-Blue-I2C ) .
6271
63- This code was adapted from some C code that I had written previously for
64- the AVR.
65-
6672To install on your BBB:
6773``` bash
6874git clone https://github.com/dhylands/python_lcd.git
@@ -82,30 +88,28 @@ I put together some
8288[ photos here] (https://picasaweb.google.com/115853040635737241756/PythonI2CLCD?authkey=Gv1sRgCLyZoJ3_uPjiXA )
8389
8490Coming from the BeagleBone Black the wire colors are:
85- ```
86- Color Pin Name
87- ------ ----- ------
88- Black P9-1 GND
89- Red P9-3 3.3v
90- Orange P9-7 SYS_5V
91- Yellow P9-19 SCL
92- White P9-20 SDA
93- ```
91+
92+ | Color | Pin | Name |
93+ | ------ | ----- | ------ |
94+ | Black | P9-1 | GND |
95+ | Red | P9-3 | 3.3v |
96+ | Orange | P9-7 | SYS_5V |
97+ | Yellow | P9-19 | SCL |
98+ | White | P9-20 | SDA |
9499
95100The photo shows Orange connected to P9-5. I discovered that P9-7 is controlled
96101by the onboard voltage regulators, so when you do a "sudo poweroff" then
97102SYS_5V drops to 0v when the BBB is powered off. P9-5 (VDD_5V) remains at
981035v after the BBB is powered off.
99104
100105And the colors going to the LCD are:
101- ```
102- Color Name
103- ------ ----
104- Black GND
105- Red 5v
106- White SDA
107- Yellow SCL
108- ```
106+
107+ | Color | Name |
108+ | ------ | ---- |
109+ | Black | GND |
110+ | Red | 5v |
111+ | White | SDA |
112+ | Yellow | SCL |
109113
110114I used a [ SparkFun level shifter] ( https://www.sparkfun.com/products/8745 )
111115(this particular model is no longer available).
@@ -125,8 +129,7 @@ and thought I would include it here, since it's related to the LCDs these driver
125129The circuit allows for digitally controlling the contrast via PWM and also controlling
126130the backlight brightness via PWM.
127131
128- Custom characters
129- =================
132+ ## Custom characters
130133
131134The HD44780 displays come with 3 possible CGROM font sets. Japanese, European and Custom.
132135Test which you have using:
0 commit comments