I think I simplified the bug to its smallest size.
Using GLCD library and KS0108 (actually its an S6B0108 newer version) the X axis is offset 64 pixels to the right.
The program below causes "hello" to be appear at x=64, not x=0 where it should do. (Something to do with the CS1 CS2 select?).
Help welcome.
Code: Select all
Device = 18F87J93
Clock = 12
Config OSC = HS
// User options
#Option GLCD_MODEL = KS0108
#option GLCD_SCREEN_WIDTH = 128
#option GLCD_SCREEN_HEIGHT = 64
#Option GLCD_DATA = PORTD
#Option GLCD_RS = PORTB.2
#Option GLCD_RW = PORTB.1
#Option GLCD_EN = PORTB.0
#Option GLCD_CS1 = PORTB.4
#Option GLCD_CS2 = PORTC.4
#Option GLCD_RST = PORTE.3
#Option GLCD_ASPECT_RATIO = 100
#Option GLCD_INIT_DELAY = 50
#Option GLCD_INVERT_CS = true
Include "glcd.bas"
Include "graphics.bas"
Include "Bitmaps.bas"
Include "Arial.bas"
TRISD = %00000000 ' data port
TRISB = %11100000 ' handshake port
TRISE = %11110111 ' reset pin
GLCD.Cls
GLCD.SetFont(ArialBold)
GLCD.WriteAt(0,0,"hello")
While true
Wend