NXC
Version 1.2.1 r5
Main Page
Related Pages
Modules
Data Structures
Files
Examples
All
Data Structures
Files
Functions
Variables
Groups
Pages
ex_contrast.nxc
This is an example of how to use the
DisplayContrast
and
SetDisplayContrast
functions.
task main()
{
for
(byte contrast = 0; contrast <
DISPLAY_CONTRAST_MAX
; contrast++)
{
SetDisplayContrast
(contrast);
NumOut
(0,
LCD_LINE1
,
DisplayContrast
());
Wait
(100);
}
for
(byte contrast = DISPLAY_CONTRAST_MAX; contrast > 0; contrast--)
{
SetDisplayContrast
(contrast);
NumOut
(0,
LCD_LINE1
,
DisplayContrast
());
Wait
(100);
}
SetDisplayContrast
(
DISPLAY_CONTRAST_DEFAULT
);
NumOut
(0,
LCD_LINE1
,
DisplayContrast
());
while
(
true
);
}
Generated by
1.8.2