A kijelző ami a panelen lett az a Philips chipes.
A mintaprogram, amivel nyúzható:
Kód: Egész kijelölése
'$lib "lcd-epson11182.lbx" 'special color display support
$lib "lcd-pcf8833e.lbx" 'special color display support
'epson:zold ; philips:sárga
$regfile = "m328def.dat" 'ATMega 8, change if using different processors
$crystal = 16000000 '8 MHz
'First we define that we use a graphic LCD
Config Graphlcd = Color , Controlport = Portb , Cs = 2 , Rs = 1 , Scl = 5 , Sda = 3
'here we define the colors
Dim I As Byte
Const Blue = &B00000011 'predefined contants are making programming easier
Const Yellow = &B11111100
Const Red = &B11100000
Const Green = &B00011100
Const Black = &B00000000
Const White = &B11111111
Const Brightgreen = &B00111110
Const Darkgreen = &B00010100
Const Darkred = &B10100000
Const Darkblue = &B00000010
Const Brightblue = &B00011111
Const Orange = &B11111000
'(
Glcdcmd &H81 'command for contrast
Glcddata &H24 'data for command contrast. 32,3
Glcddata &H00
Glcddata &H25 'set contrast-phil
Glcddata &H00 '
')
'clear the display
Cls
'Glcdcmd &H81 'command for contrast
'Glcddata &H24 'data for command contrast. 32,3
'Glcddata &H00
'Glcddata &H25 'set contrast-phil
'Glcddata &H00 '
'create a cross
'Line(0 , 0) -(130 , 130) , Blue
'Line(130 , 0) -(0 , 130) , Red
'Waitms 1000
'show an RLE encoded picture
Showpic 0 , 0 , Plaatje
Showpic 0 , 80 , Plaatje
Waitms 1000
'select a font
Setfont Color16x16
'and show some text
'Lcdat 100 , 0 , "12345678" , Blue , Yellow
'Lcdat 75 , 0 , "avr.tavir.hu" , Yellow , Blue
'select a font
Setfont Color8x8
'and show some text
Lcdat 50 , 5 , "AVR-Duino/N6110" , Blue , Yellow
Lcdat 70 , 15 , "avr.tavir.hu" , Yellow , Blue
'Waitms 1000
'Circle(30 , 30) , 10 , Blue
'Waitms 1000
'make a box
Box(0 , 0) -(1 , 1) , Red
'set some pixels
Pset 32 , 110 , Black
Pset 38 , 110 , Black
Pset 35 , 112 , Black
End
Do
For I = 0 To 255
Glcdcmd &H28
'Glcddata I
Waitms 50
Glcdcmd &H29
Waitms 50
Next I
Loop
End
Plaatje:
$bgf "tavir.bgc"
$include "color8x8.font"
$include "color16x16.font"