User manual

Table Of Contents
330
mikoC PRO for PIC32
MikroElektronika
Glcd_Fill
Glcd_Dot
Glcd_Line
Prototype
void Glcd_Fill(unsigned short pattern);
Description Fills Glcd memory with the byte pattern.
To clear the Glcd screen, use Glcd_Fill(0).
To ll the screen completely, use Glcd_Fill(0xFF).
Parameters - pattern: byte to ll Glcd memory with.
Returns Nothing.
Requires Glcd needs to be initialized, see Glcd_Init routine.
Example
// Clear screen
Glcd_Fill(0);
Notes None.
Prototype
void Glcd_Dot(unsigned short x_pos, unsigned short y_pos, unsigned short
color);
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 a dot state: 0 clears dot, 1 puts a dot, and 2 inverts dot state.
Returns Nothing.
Requires Glcd needs to be initialized, see Glcd_Init routine.
Example
// Invert the dot in the upper left corner
Glcd_Dot(0, 0, 2);
Notes For x and y axis layout explanation see schematic at the bottom of this page.
Prototype
void Glcd_Line(int x_start, int y_start, int x_end, int y_end, unsigned
short color);
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
The parameter color determines the line color: 0 white, 1 black, and 2 inverts each dot.
Returns Nothing.
Requires Glcd needs to be initialized, see Glcd_Init routine.
Example
// Draw a line between dots (0,0) and (20,30)
Glcd_Line(0, 0, 20, 30, 1);
Notes None.