User manual
519
mikoPascal PRO for dsPIC30/33 and PIC24
MikroElektronika
- SPI_Glcd_Rectangle
- SPI_Glcd_Rectangle_Round_Edges
- SPI_Glcd_Rectangle_Round_Edges_Fill
- SPI_Glcd_Box
- SPI_Glcd_Circle
- SPI_Glcd_Circle_Fill
- SPI_Glcd_Set_Font
- SPI_Glcd_Write_Char
- SPI_Glcd_Write_Text
- SPI_Glcd_Image
- SPI_Glcd_PartialImage
SPI_Glcd_Init
Prototype
procedure SPI_Glcd_Init(DeviceAddress : byte);
Description Initializes the Glcd module via SPI interface.
Parameters - DeviceAddress: SPI expander hardware address, see schematic at the bottom of this page
Returns Nothing.
Requires Global variables:
- SPExpanderCS: Chip Select line
- SPExpanderRST: Reset line
- SPExpanderCS_Direction: Direction of the Chip Select pin
- SPExpanderRST_Direction: Direction of the Reset pin
must be dened before using this function.
The SPI module needs to be initialized. See SPIx_Init and SPIx_Init_Advanced routines.
Example
// Port Expander module connections
var SPExpanderRST : sbit at LATF0_bit;
SPExpanderCS : sbit at LATF1_bit;
SPExpanderRST_Direction : sbit at TRISF0_bit;
SPExpanderCS_Direction : sbit at TRISF1_bit;
// End Port Expander module connections
...
// If Port Expander Library uses SPI module :
SPI1_Init(); // Initialize SPI module used with PortExpander
SPI_Glcd_Init(0);
Notes None.