Had to link to the image as it didn't like my url
http://www.robertmeffe.com/gallery/main ... alNumber=1
Code: Select all
Device = 18F4458
Clock = 48
// 20Mhz crystal, 48Mhz internal (FS USB)
Config
PLLDIV = 5,
CPUDIV = OSC1_PLL2,
USBDIV = 2,
FOSC = HSPLL_HS,
VREGEN = ON
// configure GLCD...
#option GLCD_MODEL = S1D13700 // set model
#option GLCD_MODE = 6800
#option GLCD_A0 = PORTB.2 // A0 pin
#option GLCD_RW = PORTB.1 // RW pin
#option GLCD_EN = PORTB.0 // E pin
#option GLCD_DATA = PORTD // data port
#option GLCD_CS = PORTB.3 // chip select
#option GLCD_RES = PORTB.5 // reset pin
// import modules...
Include "glcd.bas"
Include "arial.bas"
Include "graphics.bas"
Include "utils.bas"
// clear screen and set font - driver defaults
// to layer 1 at startup - according to S1D13700 help
// file, bsClear provides fastest font rendering...
Cls(1)
SetFont(Arial)
Brush.Style = bsClear
// display some text...
WriteAt(0,0,"Hello World")
WriteAt(50,50,"Hello World")