Sample 7: Contrast Adjustment
This program demonstrates how to adjust the screen contrast at runtime. The screen contrast is stored
in the EEPROM at addres &HFFF.
#include "CT18XX"
Dim CT18_cont_value As Byte
CT18_cont_value = Eeread(&hfff,1)
If CT18_cont_value = &hff Then
CT18_cont_value = 150
Endif
Ct18contrast CT18_cont_value
Box 10,20,310,100
Box 10,140,310,230
Font 5,1
Glocate 120,50
Gprint "Co"
Glocate 120,175
Gprint "Contrast -"
Ct18beep 30
Font 2,0
On Pad Gosub TouchOccur
'
' ********************* Main Loop ************************
'
Do
Locate 0,0
Print "20",Hp(Rtcread(6),2,1),"-",Hp(Rtcread(5),2,1),"-",Hp(Rtcread(4),2,1), "
", Hp(Rtcread(2),2,0),":",Hp(Rtcread(1),2,1),":",Hp(Rtcread(0),2,1)
Locate 24,0
Print "Contrast : ",Dp(CT18_cont_value,3,0)
Wait 1000
Loop
TouchOccur:
_TouchPosx = Sys(10)
_TouchPosy = Sys(11)
If _TouchPosy > 120 Then
CT18_cont_value = CT18_cont_value - 1
Ct18contrast CT18_cont_value
Eewrite &hfff,CT18_cont_value,1
Else
CT18_cont_value = CT18_cont 1
Ct18contrast CT18_cont_value
Eewrite &hfff,CT18_cont_value,1
Endif
Ct18beep 30
Return
End
Comfile Technology, Inc
CT1820 User's Manual
77 Of 93
Содержание CUTOUCH CT1820
Страница 4: ...Chapter 1 Overview Comfile Technology Inc CT1820 User s Manual 4 Of 93 ...
Страница 7: ...The CT1820 s Appearance Comfile Technology Inc CT1820 User s Manual 7 Of 93 ...
Страница 8: ...Comfile Technology Inc CT1820 User s Manual 8 Of 93 ...
Страница 9: ...Comfile Technology Inc CT1820 User s Manual 9 Of 93 ...
Страница 12: ...Comfile Technology Inc CT1820 User s Manual 12 Of 93 ...
Страница 17: ...Comfile Technology Inc CT1820 User s Manual 17 Of 93 ...
Страница 19: ...Chapter 2 I O Comfile Technology Inc CT1820 User s Manual 19 Of 93 ...
Страница 29: ...Comfile Technology Inc CT1820 User s Manual 29 Of 93 ...
Страница 32: ...Chapter 3 Command Reference Comfile Technology Inc CT1820 User s Manual 32 Of 93 ...
Страница 41: ...Chapter 4 Touch Input Comfile Technology Inc CT1820 User s Manual 41 Of 93 ...
Страница 52: ...Chapter 5 ModPort I O Expansion Comfile Technology Inc CT1820 User s Manual 52 Of 93 ...
Страница 61: ...Chapter 6 Sample Programs Comfile Technology Inc CT1820 User s Manual 61 Of 93 ...
Страница 87: ...Chapter 7 Panel Mounting Comfile Technology Inc CT1820 User s Manual 87 Of 93 ...
Страница 88: ...Dimensions Comfile Technology Inc CT1820 User s Manual 88 Of 93 ...
Страница 89: ...Comfile Technology Inc CT1820 User s Manual 89 Of 93 ...
Страница 90: ...Panel Cutout Comfile Technology Inc CT1820 User s Manual 90 Of 93 ...