Mikroelektronika MIKROE-442 Datenbogen
mikroBasic PRO for dsPIC30/33 and PIC24
MikroElektronika
361
Glcd_Write_Char
Glcd_Write_Text
Prototype
sub procedure Glcd_Write_Char(dim character, x_pos, page_num, color as
byte)
Description Prints character on the Glcd.
Parameters -
Parameters -
character
: character to be written
-
x_pos
: character starting position on x-axis. Valid values: 0..(127-FontWidth)
-
page_num
: the number of the page on which character will be written. Valid values: 0..7
-
color
: color parameter. Valid values: 0..2
The parameter
color
determines the color of the character: 0 white, 1 black, and 2 inverts each dot.
Returns
Nothing.
Requires
Glcd needs to be initialized, see Glcd_Init routine. Use Glcd_Set_Font to specify the font for display; if
no font is specified, then default
Font_Glcd_System5x7
font supplied with the library will be used.
Example
‘ Write character ‘C’ on the position 10 inside the page 2:
Glcd_Write_Char(‘C’, 10, 2, 1)
Notes
For x axis and page layout explanation see schematic at the bottom of this page.
Prototype
sub procedure Glcd_Write_Text(dim byref text as string, dim x_pos, page_num,
color as byte)
Description Prints text on Glcd.
Parameters -
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.
Returns
Nothing.
Requires
Glcd needs to be initialized, see Glcd_Init routine. Use Glcd_Set_Font to specify the font for display; if
no font is specified, then default
Font_Glcd_System5x7
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)
Notes
For x axis and page layout explanation see schematic at the bottom of this page.