Reverse LCD Display Problem

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
Posts: 1
Joined: Thu Sep 10, 2015 10:13 pm

Reverse LCD Display Problem

Post by dnorris011 » Sat May 14, 2016 3:16 am

I have been experimenting with the LCD pyskin and have had no problem displaying ordinary text. However, when I tried to reverse the text display, where the background is black and the alpha numerics are white, all I get is bunch of scattered dots in the LCD screen area.

My code follows:

lcd = pub.LCD('X')
lcd.write('Hello World')

s = bytearray(b'0xa7') # 0xa7 is the LCD controller instruction to reverse the display
t = memoryview(s) # this creates the buffer struct needed for the following instruction
lcd.command(0,t) # sends the "instruction" command to the LCD

Funny thing is, this code worked the first time I tried it. However, no joy on repeated attempts. Anyone have a suggestion?
I did try resetting the LCD pyskin by toggling X12, which is connected to the active low reset for the LCD controller. It didn't change anything.

Post Reply