Mikroelektronika MIKROE-350 Datenbogen
![Mikroelektronika](https://files.manualsbrain.com/attachments/e0529b3b58069a916ad7bb89f7e9f5f0eda73421/common/fit/150/50/1b07b99aa3112e022a916b06db07f1f4f211e91d41878452d87c7638b1bf/brand_logo.gif)
Glcd_Dot
Glcd_Line
224
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroBasic PRO for AVR
CHAPTER 6
Prototype
sub procedure Glcd_Dot(dim x_pos as byte, dim y_pos as byte, dim
color as byte)
color as byte)
Returns
Nothing.
Description
Draws a dot on Glcd at coordinates (
x_pos
,
y_pos
).
Parameters :
-
x_pos:
x position. Valid values: 0..127
-
y_pos:
y position. Valid values: 0..63
-
color:
color parameter. Valid values: 0..2
The parameter
color
determines a dot state: 0 clears dot, 1 puts a dot, and 2
inverts dot state.
Note: For x and y axis layout explanation see schematic at the bottom of this page.
Requires
Glcd needs to be initialized, see Glcd_Init routine.
Example
' Invert the dot in the upper left corner
Glcd_Dot(0, 0, 2)
Glcd_Dot(0, 0, 2)
Prototype
sub procedure Glcd_Line(dim x_start as integer, dim y_start as inte-
ger, dim x_end as integer, dim y_end as integer, dim color as byte)
ger, dim x_end as integer, dim y_end as integer, dim color as byte)
Returns
Nothing.
Description
Draws a line on Glcd.
Parameters :
-
x_start:
x coordinate of the line start. Valid values: 0..127
-
y_start:
y coordinate of the line start. Valid values: 0..63
-
x_end:
x coordinate of the line end. Valid values: 0..127
-
y_end:
y coordinate of the line end. Valid values: 0..63
-
color:
color parameter. Valid values: 0..2
The parameter color determines the line color: 0 white, 1 black, and 2 inverts
each dot.
each dot.
Requires
Glcd needs to be initialized, see Glcd_Init routine.
Example
' Draw a line between dots (0,0) and (20,30)
Glcd_Line(0, 0, 20, 30, 1)
Glcd_Line(0, 0, 20, 30, 1)