NHD-0216K3Z-FS(RGB)-FBW-V3 garbage characters
Bringing up this display in RS232 mode (R1 and R2 not populated). Running VSS at 5V and the RS232 line toggles between 0V and 5V. Green backlight is current limited to 10mA with a 240 ohm resistor.
I run the python program below but just get the same garbage character over and over. The specific garbage character varies from one instance of the display to another but for any given display I get the same garbage character every time I send a byte.
import serial
import time
#set up port
ser = serial.Serial('COM7', 9600, serial.EIGHTBITS, serial.PARITY_NONE, serial.STOPBITS_ONE)
#set contrast to 40 out of 50
cmnd = bytearray()
cmnd.append(0xFE)
cmnd.append(0x52)
cmnd.append(40)
ser.write(cmnd)
print(cmnd)
#set backlight to 15 out of 15
cmnd = bytearray()
cmnd.append(0x53)
cmnd.append(15)
ser.write(cmnd)
print(cmnd)
#underline off
cmnd = bytearray()
cmnd.append(0x48)
ser.write(cmnd)
print(cmnd)
# Wait 1 second
time.sleep(1)
msg = b"Hello World"
ser.write(msg)
print(msg)
-
Hi mnorvig,
You may try importing a Python library that supports writing to serial character LCDs. A quick search on Github will result in a few options for you to test.
Regards,0 -
As you can see from the first line of the Python program attached to my original post I have already done this ("import serial"). I've verified the serial port is working with the protocol analyzer on my scope. The display responds to TTY input, it just displays the same arbitrary configuration of pixels for each character received on the RX pin.
Not mentioned in my first post, I've tried all supported BAUD rates with no success.0
Please sign in to leave a comment.
Comments
2 comments