Datasheet

SPI_Glcd_Dot
SPI_Glcd_Line
406
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
procedure SPI_Glcd_Dot(x_pos : byte; y_pos : byte; color : byte)
Returns Nothing.
Description
Draws a dot on Glcd at coordinates (x_pos, y_pos).
Parameters :
-
x_pos: x position. Valid values: 0..127
-
y_pos: y position. Valid values: 0..63
- color: color parameter. Valid values: 0..2
The parameter color determines the dot state: 0 clears dot, 1 puts a dot, and 2
inverts dot state.
Note: For x and y axis layout explanation see schematic at the bottom of this page.
Requires Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routines.
Example
// Invert the dot in the upper left corner
SPI_Glcd_Dot(0, 0, 2);
Prototype
procedure SPI_Glcd_Line(x_start : integer; y_start : integer;
x_end : integer; y_end : integer; color : byte);
Returns Nothing.
Description
Draws a line on Glcd.
Parameters :
-
x_start: x coordinate of the line start. Valid values: 0..127
- y_start: y coordinate of the line start. Valid values: 0..63
-
x_end: x coordinate of the line end. Valid values: 0..127
- y_end: y coordinate of the line end. Valid values: 0..63
- color: color parameter. Valid values: 0..2
Parameter color determines the line color: 0 white, 1 black, and 2 inverts each dot.
Requires Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routines.
Example
// Draw a line between dots (0,0) and (20,30)
SPI_Glcd_Line(0, 0, 20, 30, 1);