Having trouble with NHD-C0220BIZ-FSW-FBW-3V3M firmware documentation

Comments

3 comments

  • Engineering Support
    Community moderator

    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
  • Albert Pierce

    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
  • Engineering Support
    Community moderator

    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.