Mikroelektronika MIKROE-738 Datenbogen

Seite von 682
488
mikoC PRO for PIC32
MikroElektronika
SPI_Glcd_Fill
SPI_Glcd_Dot
Prototype
void SPI_Glcd_Fill(char pattern);
Description Fills Glcd memory with byte pattern.
To clear the Glcd screen, use 
SPI_Glcd_Fill(0)
.
To fill the screen completely, use 
SPI_Glcd_Fill(0xFF)
.
Parameters 
pattern
: byte to fill Glcd memory with 
Returns
Nothing.
Requires
Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routine.
Example
// Clear screen
SPI_Glcd_Fill(0);
Notes
None.
Prototype
void SPI_Glcd_Dot(char x_pos, char y_pos, char 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 the dot state: 0 clears dot, 1 puts a dot, and 2 inverts dot state.
Returns
Nothing.
Requires
Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routine.
Example
// Invert the dot in the upper left corner
SPI_Glcd_Dot(0, 0, 2);
Notes
For x and y axis layout explanation see schematic at the bottom of this page.