Mikroelektronika MIKROE-442 Datenbogen
522
mikoBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
SPI_Glcd_Read_Data
SPI_Glcd_Write_Data
Prototype
sub function SPI_Glcd_Read_Data() as byte
Description Reads data from the current location of Glcd memory and moves to the next location.
Returns
Returns
One byte from Glcd memory.
Requires
Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routine.
Glcd side, x-axis position and page should be set first. See the functions SPI_Glcd_Set_Side, SPI_
Glcd_Set_X, and SPI_Glcd_Set_Page.
Parameters None.
Example
Example
dim data_ as byte
...
data_ = SPI_Glcd_Read_Data()
Notes
None.
Prototype
sub procedure SPI_Glcd_Write_Data(dim data_ as byte)
Description Writes one byte to the current location in Glcd memory and moves to the next location.
Parameters -
Parameters -
data_
: data to be written
Returns
Nothing.
Requires
Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routine.
Glcd side, x-axis position and page should be set first. See the functions SPI_Glcd_Set_Side, SPI_
Glcd_Set_X, and SPI_Glcd_Set_Page.
Example
dim data_ as byte
...
SPI_Glcd_Write_Data(data_)
Notes
None.
SPI_Glcd_Fill
Prototype
sub procedure SPI_Glcd_Fill(dim pattern as byte)
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.