// Unicorn GLCD test
Device = 18F4550
Clock = 48
Config
PLLDIV = 5,
CPUDIV = OSC1_PLL2,
USBDIV = 2,
FOSC = HSPLL_HS,
VREGEN = OFF
#option GLCD_DATA = PORTD // data port
#option GLCD_RS = PORTE.0 // RS pin
#option GLCD_EN = PORTE.2 // EN pin
#option GLCD_RW = PORTE.1 // RW pin
#option GLCD_CS1 = PORTB.4 // chip select
#option GLCD_CS2 = PORTC.0 // chip select
#option GLCD_ASPECT_RATIO = 75 // aspect ratio, smaller number will squeeze y for GLCD circles and box
#option GLCD_INIT_DELAY = 100 // initialisation delay (ms)
#option GLCD_INVERT_CS = true // invert CS lines...
#option GLCD_RST = PORTA.4 // reset line
Include "GLCD.bas"
Include "Arial.bas"
// program start...
ADCON1 = $0F //All digital
CMCON = $07 //No comparators
Cls
High (PORTB.3) //turn on back light
GLCD.SetFont(Arial)
WriteAt(10,10,"Hello World")
GLCD.SetFont(ArialBold)
WriteAt(10,20,"Hello World")
line(10,30,70,30)
While(true)
Wend
End