finally I got my full version of SwordFish !
Now, I´m trying to build another version of my "on board computer" for my Opel Corsa using a GLCD.
I did some tests with Proteus 7 using the following code, to initiate my tests :
Code: Select all
// if device and clock are omitted, then the compiler defaults to
// 18F452 @ 20MHz - they are just used here for clarity...
Device = 18F452
Clock = 20
#Option GLCD_SCREEN_WIDTH = 128
#Option GLCD_SCREEN_HEIGHT = 64
#Option GLCD_DATA = PORTD
#Option GLCD_RS = PORTB.2
#Option GLCD_CS1 = PORTB.1
#Option GLCD_CS2 = PORTB.0
#Option GLCD_RW = PORTB.3
#Option GLCD_EN = PORTB.4
#Option GLCD_RST = PORTB.5
#Option GLCD_INIT_DELAY = 100
#option GLCD_INVERT_CS = FALSE
#option GLCD_MODEL = KS0108
Include "GLCD.bas"
Include "FixedFont.bas"
Include "Arial.bas"
Include "Garamond.bas"
Include "Tahoma.bas"
Include "Verdana.bas"
Include "Times.bas"
ADCON1 = $07 // PORTE as digital (GLCD)
GLCD.Cls
GLCD.SetFont(Fixed)
GLCD.WriteAt(6,2,"System Font")
did some one got the same error or, did some one know where the problem is ?
I tryied some other GLCD models in proteus, but the results were the same.
In My second try , i reduced the clck speed to 10 Mhz, and the code :
Code: Select all
// if device and clock are omitted, then the compiler defaults to
// 18F452 @ 20MHz - they are just used here for clarity...
device = 18F452
clock = 20
#Option GLCD_SCREEN_WIDTH = 128
#Option GLCD_SCREEN_HEIGHT = 64
#Option GLCD_DATA = PORTD
#Option GLCD_RS = PORTB.2
#Option GLCD_CS1 = PORTB.1
#Option GLCD_CS2 = PORTB.0
#Option GLCD_RW = PORTB.3
#Option GLCD_EN = PORTB.4
#Option GLCD_RST = PORTB.5
#Option GLCD_INIT_DELAY = 100
#option GLCD_INVERT_CS = FALSE
#option GLCD_MODEL = KS0108
include "GLCD.bas"
include "FixedFont.bas"
include "Arial.bas"
include "Garamond.bas"
include "Tahoma.bas"
include "Verdana.bas"
include "Times.bas"
ADCON1 = $07 // PORTE as digital (GLCD)
GLCD.Cls
GLCD.SetFont(Fixed)
GLCD.WriteAt(4,2,"System Font")
GLCD.SetFont(ArialBold)
GLCD.WriteAt(4,10,"Arial Font")
GLCD.SetFont(GaramondBold)
GLCD.WriteAt(4,20,"Garamond Font")
GLCD.SetFont(TahomaBold)
GLCD.WriteAt(4,30,"Tahoma Font")
GLCD.SetFont(VerdanaBold)
GLCD.WriteAt(4,40,"Verdana Font")
GLCD.SetFont(TimesNewRomanBold)
GLCD.WriteAt(4,50,"Times New Roman")
Any idea ?
Thank you in advance.
Regards
Sérgio