Having trouble with NHD-C0220BIZ-FSW-FBW-3V3M firmware documentation
I am writing code to communicate with the NHD-C0220BIZ-FSW-FBW-3V3M using Python, CircuitPython to be exact. I can communicate with the display to initialize it and send some text, but I am encountering strange behavior and the firmware documentation is not terribly helpful, It seems to be a mishmash of several display types with some commands not even supported by this display.
I managed to get the results I have from translating the example code, but the behavior I am seeing is very puzzling. If I send the display a string of test, such as Hello World, the test appears on the display as ello World, dropping the first character H. Why is the first character not being displayed?
If I place a space before the H The entire top row is filled totally with black boxes, which as far as I understand are not even valid characters. If I use an underscore _ as the leading character I get the correct display of Hello World. If I use a dash - as he leading character I get the black boxes.
Apparently, even though all of those characters appear in the documentation as valid, it is freaking out over certain characters if used as the first character. The same characters are fine in other locations ie. -Hello World freaks it out, _Hello World- does not.
Is there anywhere I can find better/more complete documentation about this? I got as far as I did so far by trial and error rather than by being able to understand and rely on the documentation.
-
Hi Albert,
Thank you for reaching out. Are you able to share your code? Usually, if the display is not initialized properly either due to commands or delays not being sufficient, it could cause the issues you are currently experiencing.
0 -
Here is the code. Also, does the display processor do any write activity on the I2C bus? I am seeing bus traffic that I do not initiate. I will mention that I have written similar code for dozens of other I2C devices and never seen such weird behavior. The display appears to initialize ok, since I can write text to it. It just behaves unexpectedly.
init_data = [0x38,0x39,0x14,0x78,0x5E,0x6D,0x0C,0x01,0x06]
my_data = (bytearray("_Hello There World!!"))
more_data = [0x00,0x48,0x45,0x4C,0x4C,0x4F]
line2 = const(0xC0)def write_command(command):
with device:
device.write(bytes(command))
def write_data (data):
with device:
device.write(bytes(data))
def init_display():
write_command(0x00)
write_data(init_data)def next_line():
write_command(0x00)
write_data(line2)
init_display()
write_command(0x40)
write_data(my_data) # this displays correctly except for the first character missing thing
next_line()
write_command(0x40)
write_data(more_data) # this does not display at all
time.sleep(.01)0 -
Hi Albert,
Thank you for your patience and for sharing your code. For the function "device.write()", is it taking care of the slave address, start and stop signals?
Could you try sending "Hello There World" individually like how you did for "init_data()"?
0
Please sign in to leave a comment.
Comments
3 comments