LCD Controller Specification
©
2006 Microchip Technology Inc.
DS70099D-page 77
B.3.2.2
PIXELS
The pixel commands give the user control over individual pixels. Pixel coordinates
(X,Y) have their origin at the lower left of the LCD display. The coordinate range is
X: 0-121 and Y: 0-31. The PixPos (X,Y) specifies the default location for pixel
commands. The home position is the bottom left of the LCD display, PixPos = (0,0).
B.3.2.3
COLUMNS
The column commands are used to write bitmaps to the display. A column is a vertical
column of 8 pixels that spans the height of one of the character rows. Column
coordinates (X,R) have their origin at the upper left corner of the LCD.
The X is defined the same as the pixel coordinates and the R is defined the same as
the character coordinates. The coordinate range is X: 0->121 and R: 0->3. The ColPos
(X,R) specifies the default location for column commands. The home position is the top
left of the LCD display, ColPos = (0,0).
Unless otherwise specified, incrementing ColPosX past 121 will wrap to the next line
(i.e., ColPosX = 0 and C 1). If ColPosY exceeds 31, it will wrap to line 0.
B.3.3
Power-up Defaults
Upon a device Reset, the following LCD controller conditions are valid:
• Character cursor off
• All coordinate variables are set to their home values:
- ChrPosC = 0, ChrPosR = 0
- PixPosX = 0, PixPosY = 0
- ColPosX = 0, ColPosR = 0
- ScrollY = 0
B.3.4
Command Description
A basic command format is implemented on the PIC18F242. In general,
communicating with the PIC18F242 LCD controller requires adherence to this protocol:
• Command name: Description
• Cmd: Opcode value
• Data: Number of data bytes
- [7 6 5 4 3 2 1 0] Command dependent data
- [7 6 5 4 3 2 1 0] Command dependent data
- [7 6 5 4 3 2 1 0] Command dependent data