Mikroelektronika MIKROE-724 データシート

ページ / 726
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
325
S1D13700_Init
Prototype
sub procedure S1D13700_Init(dim width as word, dim height as word)
Returns
Nothing.
Description Initializes S1D13700 Graphic Lcd controller.
Parameters:
width
: width of the Glcd panel. 
height
: height of the Glcd panel. 
Requires
Global variables: 
S1D13700_Data_Port
: Data Bus Port. 
S1D13700_WR
: Write signal pin. 
S1D13700_RD
: Read signal pin. 
S1D13700_A0
: Command/Data signal pin. 
S1D13700_RES
: Reset signal pin. 
S1D13700_CS
: Chip Select signal pin. 
S1D13700_Data_Port_Direction
: Data Bus Port Direction. 
S1D13700_WR_Direction
: Direction of Write signal pin. 
S1D13700_RD_Direction
: Direction of Read signal pin. 
S1D13700_A0_Direction
: Direction of Command/Data signal pin. 
S1D13700_RES_Direction
: Direction of Reset signal pin. 
S1D13700_CS_Direction
: Direction of Chip Select signal pin. 
must be defined before using this function.
Example
‘ S1D13700 module connections
dim S1D13700_Data_Port as byte at PORTD
dim S1D13700_WR as sbit at LATC2_bit
dim S1D13700_RD as sbit at LATC1_bit
dim S1D13700_A0 as sbit at LATC0_bit
dim S1D13700_RES as sbit at LATC4_bit
dim S1D13700_CS as sbit at LATC5_bit
dim S1D13700_Data_Port_Direction as byte at TRISD
dim S1D13700_WR_Direction as sbit at TRISC2_bit
dim S1D13700_RD_Direction as sbit at TRISC1_bit
dim S1D13700_A0_Direction as sbit at TRISC0_bit
dim S1D13700_RES_Direction as sbit at TRISC4_bit
dim S1D13700_CS_Direction as sbit at TRISC5_bit
‘ End of S1D13700 module connections
...
‘ init display for 320 pixel width, 240 pixel height
S1D13700_Init(320, 240)