- Type
- Library
- Year
- 2022
- Role
- Author
- Stack
- C++ · Pico SDK
- Target
- Raspberry Pi Pico · Sharp LS027B7DH01
- Status
- Abandoned
- License
- MIT
PicoSharp
An old project from January 2022, now abandoned. A small C++ driver for the Raspberry Pi Pico that draws to a 2.7-inch Sharp Memory LCD of 400×240 black and white pixels, over SPI.
Context
A Sharp Memory LCD keeps its image in a memory bit inside each pixel, so it holds a picture with very little power. It is written line by line over SPI, with its own protocol. PicoSharp was tested with Adafruit's breakout of the 2.7-inch screen.
What I built
The frame buffer is stored in the order the screen expects its data. The line addresses are written into it once at start-up, so drawing only changes pixel bits, and a refresh is a single SPI write of 12,482 bytes.
The screen reads line addresses least significant bit first, while the Pico's SPI sends the most significant bit first: each address is stored bit-reversed. Every refresh also flips the VCOM bit of the command, as the screen requires to avoid a DC voltage across the liquid crystal.
Drawing is limited to single pixels, clearing to white, and sprites stored at 2 bits per pixel (transparent, black or white), four pixels per byte.
1000 00001100 0000write · VCOM, flipped at every refresh0000 0001→ 1000 0000bit-reversed once, when the buffer is built