Project - Controlling a parallel display using SPI bus

Controlling a parallel display using SPI bus

This is an alternate connection method using SPI that includes a text scroll method and graphic functions. There are 8 CGRAM locations which are arranged either as a single 8char line or a 4x2 rectangle using the LineFormat option. LineFormat=true will be single line using the CGRAM order 76543210. When LineFormat=false, the characters should be arranged 2 lines as the 1st line 3210 and 2nd line 7654. The SetDot function will find the correct XY coordinates based on the format option.

The ClearBuffer function is used first to clear the charmap buffer. Then the draw functions are used such as PrintCGChar and DrawLine. Finally, the SetCGRAM function copies the buffer to the LCD CGRAM and immediately updates the characters on the display.

The standard functions such as Clear, SetCursor and Print are using the normal LCD controls. The SetCGRAM function is the only low level control that will need adapted to use the graphic control if using with a different driver method.