Mathieu: Another LCD backpack

From DP

Revision as of 10:28, 7 October 2010 by Ian (Talk | contribs)
Jump to: navigation , search

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

caption
0 123
command VOLCTR byte 1VOLCTR byte 2SETCON byte 1
c (0x63) contrast (EPSON)resistor ratio (EPSON?)contrast (PHILLIPS)
0x630x240x030x30

Requires 3 bytes. Byte one is the contrast, only setting that seems to have effect on current LCD

  • VOLCTR - contrast/brightness for EPSON
    • Byte 1 - VOLCTR 1 contrast setting (0x24 default)
    • Byte 2 - VOLCTR 2 internal resistor ratio (no effect) (0x03 default)
  • SETCON - contrast/brightness for PHILLIPS
    • Byte 3 - no effect (0x30 default)

b set bounding box

Defines the area of the screen to draw.

caption
0 1234
command x starty startx endy end
b (0x62) 0x000x000x640x64

p/P send page of image data (whole display)

caption
0 123...n
command pixel byte 1px byte 2px byte 3...px byte n
p (0x) rrrrggggbbbbrrrrggggbbbb...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.

caption
0 12
pixel byte 1 pixel byte 2pixel byte 3
rrrrggggbbbbRRRRGGGGBBBB
  • 12bit color
  • two pixels packed per 3 bytes
  • 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
caption
0 12
command color byte 1color byte 2
f (0x62) rrrrggggbbbb0000