LCD Controller Specification
©
2006 Microchip Technology Inc.
DS70099D-page 83
B.8
EXAMPLES
EXAMPLE B-1:
WRITE A WORD
This example clears the display and writes “Hi” starting at row 2, column 10. Write the
following bytes to the SPI port:
0x82
// Clear screen
0xE7, ‘H’, 10, 2
// Write ‘H’ to column 10, row 2, then increment the column
0xA8, ‘i’
// Write ‘i’ at column 11, row 2 then increment the column
EXAMPLE B-2:
DRAW A STRAIGHT LINE
This example draws a straight line from X location (1,1) to Y location (119,3). Write the
following bytes to SPI port:
0xD7, 1, 1
// Set Pixel cursor to X=1, Y=1
0xDA, 119, 31
// Draw line to X=119, Y=31
EXAMPLE B-3:
DRAW AN ICON
This example draws an icon 8 pixels tall and 3 pixels wide that looks like a ‘T’ on
row = 1, column = 19. Write the following bytes to SPI port:
0xDB, 19, 1
// Set Column cursor to X=19, Row = 1
0xBC, 0x01
// Write pixel at top of display at column 19, increment column
0xBC, 0xFF
// Write vertical line at column 20, increment column
0xBC, 0x01
// Write pixel at top of display at column 21, increment column
Содержание dsPICDEM 1.1 Plus
Страница 1: ...2006 Microchip Technology Inc DS70099D dsPICDEM 1 1 Plus Development Board User s Guide...
Страница 12: ...dsPICDEM 1 1 Plus Development Board User s Guide DS70099D page 8 2006 Microchip Technology Inc NOTES...
Страница 64: ...dsPICDEM 1 1 Plus Development Board User s Guide DS70099D page 60 2006 Microchip Technology Inc NOTES...
Страница 78: ...dsPICDEM 1 1 Plus Development Board User s Guide DS70099D page 74 2006 Microchip Technology Inc NOTES...
Страница 88: ...dsPICDEM 1 1 Plus Development Board User s Guide DS70099D page 84 2006 Microchip Technology Inc NOTES...
Страница 91: ...Index 2006 Microchip Technology Inc DS70099D page 87 NOTES...