Ive got the GLCD library going nicely except with one bug.
The screen of the display (KS0801 controller) seems to be divided in half, probably due to CS1 CS2 operation.
If I try to place text or a graphic such as a box on the screen it thinks that the X compoent of 0,0 is mid screen. Y works OK.
Code: Select all
If I comment out the "Invert Chip Select" library directive I then get "hello" where x is 0 as well as where x is mid screen. Y is OK.
There seems to be something mixed up with the X position / chip select operation?
Code is below,
Code: Select all
Device = 18F87J93 // select our device Clock = 12 Config OSC = HS // User options #Option GLCD_MODEL = KS0108 // GLCD driver #option GLCD_SCREEN_WIDTH = 128 // Screen Width in Pixels #option GLCD_SCREEN_HEIGHT = 64 // Screen Height in Pixels #Option GLCD_DATA = PORTD // data port #Option GLCD_RS = PORTB.2 // RS pin #Option GLCD_RW = PORTB.1 // RW pin #Option GLCD_EN = PORTB.0 // EN pin #Option GLCD_CS1 = PORTB.4 // chip select #Option GLCD_CS2 = PORTC.4 // chip select #Option GLCD_RST = PORTE.3 // reset pin #Option GLCD_ASPECT_RATIO = 100 // aspect ratio, smaller number will squeeze y for GLCD circles and box #Option GLCD_INIT_DELAY = 50 // initialisation delay (ms) '#Option GLCD_INVERT_CS = true // invert CS lines... Include "glcd.bas" // main GLCD module Include "graphics.bas" // support for GLCD Include "Bitmaps.bas" // support for GLCD Include "Arial.bas" // ArialFont for GLCD TRISD = %00000000 // IO is on ports B D and E TRISB = %00000000 TRISE = %00000000 While true GLCD.Cls DelayMS(1000) GLCD.SetFont(ArialBold) GLCD.WriteAt(0,31,"Hello") ' hello is succesfully blinked but at x =0 and x = midscreen (64 I guess) DelayMS(1000) Wend