Mikroelektronika MIKROE-742 데이터 시트

다운로드
페이지 532
SPI_Glcd_Write_Text
SPI_Glcd_Image
411
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Prototype
procedure SPI_Glcd_Write_Text(var text : array[40] of byte; x_pos
: byte; page_numb : byte; color : byte);
Returns
Nothing.
Description
Prints text on Glcd.
Parameters : 
text
: text to be written 
x_pos
: text starting position on x-axis. 
page_num
: the number of the page on which text will be written. Valid values: 
0..7 
color
: color parameter. Valid values: 0..2 
The parameter color determines the color of the text: 0 white, 1 black, and 2
inverts each dot.
Note: For x axis and page layout explanation see schematic at the bottom of
this page.
Requires
Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routines.
Use the SPI_Glcd_Set_Font to specify the font for display; if no font is speci-
fied, then the default 5x8 font supplied with the library will be used.
Example
// Write text "Hello world!" on the position 10 inside the page
2:SPI_Glcd_Write_Text("Hello world!", 10, 2, 1);
Prototype
procedure SPI_Glcd_Image(const image : ^byte);
Returns
Nothing.
Description
Displays bitmap on Glcd.
Parameters : 
image
: image to be displayed. Bitmap array can be located in both code and 
RAM memory (due to the mikroPascal PRO for AVR pointer to const and 
pointer to RAM equivalency). 
Use the mikroPascal PRO for AVR integrated Glcd Bitmap Editor (menu option
Tools › Glcd Bitmap Editor) to convert image to a constant array suitable for
displaying on Glcd.
Requires
Glcd needs to be initialized for SPI communication, see SPI_Glcd_Init routines.
Example
// Draw image my_image on Glcd
SPI_Glcd_Image(my_image);