I2C 2004 Serial 20 x 4 LCD Module via USB UART
Posted: Wed Feb 25, 2015 10:11 am
Hello,
I purchased a I2C 2004 Serial 20 x 4 LCD Module from yourselves with the intention of using a USB=>serial connection to talk to it via my Pi or PC.
I connect it as follows with my USB UART in 5v mode (I have used this USB UART successfully in the past):
UART->LCD
========
GND->GND
5v->VCC
SCL->TX
SDA->RX
When I plug it in on my windows machine the drivers successfully install and it shows up as COM3. The unit comes on and the 1st and 3rd lines of text show as solid blocks (I understand this means it is uninitialised).
I then run the following Python to send some text through (this was gleaned from t'internet)...
import serial
lcd = serial.Serial("//./COM3", 9600)
lcd.write("\xFE")
lcd.write("\x47")
lcd.write("\x01")
lcd.write("\x01")
lcd.write("Test)
...and nothing happens. At this point I realise I don't have a clue what control codes to send through to this thing so I quickly knock up another Python script to send through all 64K combinations of 2 bytes just to see if I can get a reaction out of this thing... nothing. Tried the same thing via my PI (with the appropriate serial port) and the result was the same.
Can anybody help me with this - I'd very much like to understand the appropriate control codes and get some text displayed on it through a USB UART.
Regards,
Col
I purchased a I2C 2004 Serial 20 x 4 LCD Module from yourselves with the intention of using a USB=>serial connection to talk to it via my Pi or PC.
I connect it as follows with my USB UART in 5v mode (I have used this USB UART successfully in the past):
UART->LCD
========
GND->GND
5v->VCC
SCL->TX
SDA->RX
When I plug it in on my windows machine the drivers successfully install and it shows up as COM3. The unit comes on and the 1st and 3rd lines of text show as solid blocks (I understand this means it is uninitialised).
I then run the following Python to send some text through (this was gleaned from t'internet)...
import serial
lcd = serial.Serial("//./COM3", 9600)
lcd.write("\xFE")
lcd.write("\x47")
lcd.write("\x01")
lcd.write("\x01")
lcd.write("Test)
...and nothing happens. At this point I realise I don't have a clue what control codes to send through to this thing so I quickly knock up another Python script to send through all 64K combinations of 2 bytes just to see if I can get a reaction out of this thing... nothing. Tried the same thing via my PI (with the appropriate serial port) and the result was the same.
Can anybody help me with this - I'd very much like to understand the appropriate control codes and get some text displayed on it through a USB UART.
Regards,
Col