Mathieu: Another LCD backpack
From DP
Contents |
Protocol
0x00 reset LCD
i initialize LCD
Reset and initialize the LCD.
v version string
Hardware/software version string.
- HxxxxFxxxxBxxxx (still undefined)
c contrast
Requires 3 bytes. Byte one is the contrast, only setting that seems to have effect on current LCD
- B1 default is 0x24,
- VOLCTR - contrast/brightness for EPSON
- B1 - VOLCTR 1 contrast setting
- B2 - VOLCTR 2 internal resistor ratio (no effect)
- SETCON - contrast/brightness for PHILLIPS
- B3 - no effect
| 0 | 1 | 2 | 3 |
|---|---|---|---|
| command | VOLCTR byte 1 | VOLCTR byte 2 | SETCON byte 1 |
| c (0x63) | contrast (EPSON) | resistor ratio (EPSON?) | contrast (PHILLIPS) |
| 0x63 | 0x24 | 0x03 | 0x30 |
b set bounding box
Defines the area of the screen to draw.
| 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| command | x start | y start | x end | y end |
| b (0x62) | 0x00 | 0x00 | 0x64 | 0x64 |
p/P send page of image data (whole display)
| 0 | 1 | 2 | 3 | ... | n |
|---|---|---|---|---|---|
| command | pixel byte 1 | px byte 2 | px byte 3 | ... | px byte n |
| p (0x) | rrrrgggg | bbbbrrrr | ggggbbbb | ... | ggggbbbb |
- p Fill the entire display with the pixel data sent
- P Fill the area defined by the last bounding box
Send command, then enough pixels to fill the screen or bounding box. Replies '1' at the end.
- 12bit color
- two pixels packed per 3 bytes
- rrrrgggg|bbbbRRRR|GGGGBBBB
- must use three byte/two pixel segments! end on an even boundary
t/T test pattern (whole display)
- t Cycles colors on the entire display
- T In the area defined by the last bounding box
Any byte exits at the end of the next refresh.
f/F fill with color
- f Fill the entire display with the pixel data sent
- F Fill the area defined by the last bounding box
| 0 | 1 | 2 |
|---|---|---|
| command | color byte 1 | color byte 2 |
| f (0x62) | rrrrgggg | bbbb0000 |
