Mikroelektronika MIKROE-350 Hoja De Datos
Glcd_Write_Text
Glcd_Image
230
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure Glcd_Write_Text(dim byref text as string[20], dim
x_pos
x_pos
as byte, dim page_num as byte, dim color as 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.
this page.
Requires
Glcd needs to be initialized, see Glcd_Init routine. Use Glcd_Set_Font to speci-
fy the font for display; if no font is specified, then default 5x8 font supplied with
the library will be used.
fy the font for display; if no font is specified, then default 5x8 font supplied with
the library will be used.
Example
' Write text "Hello world!" on the position 10 inside the page 2:
Glcd_Write_Text("Hello world!", 10, 2, 1)
Prototype
sub procedure Glcd_Image(dim byref const image as ^byte)
Returns
Nothing.
Description
Displays bitmap on Glcd.
Parameters :
-
image:
image to be displayed. Bitmap array must be located in code memory.
Use the mikroBasic PRO for AVR integrated Glcd Bitmap Editor to convert
image to a constant array suitable for displaying on Glcd.
image to a constant array suitable for displaying on Glcd.
Requires
Glcd needs to be initialized, see Glcd_Init routine.
Example
' Draw image my_image on Glcd
Glcd_Image(my_image)
Glcd_Image(my_image)