Author
Topic: Odd LCD Behavior (Read 2310 times)

I am using NHD‐1.5‐128128UGC3 Graphic Color OLED Display Module utilizing SPI serial communication. Most of the time the LCD works fine but occasionally puts some of the pixels of a feature at the wrong location. For example, if it is showing large digits (27 pix wide and 40 pix high), for a time all is OK but occasionally the lower portion of a digit is shown at very odd location (designed to be blank) before resuming to normal showing of the digits. Sometimes the wrongly placed pixels are rotated 90 deg!

Any comment/clue to guide me troubleshoot this problem is appreciated.

The cause of the problem was the corruption of data during SPI communication.

It turns out that the LCD module is only compatible with a sub-set of SPI modes. Out of four possible SPI modes of operation, LCD module did not work at all with one, caused the problem described with another, and worked OK with other two SPI modes.

For this project a PIC24HJ series CPU was used and SPI was set to have CKP and CKE of opposite logic level. The SPI communication worked fine running at 3.3-MHz.