Steve, my apologies, it is a
122x32 LCD per the title. Here is the full code:
Code: Select all
Device = 18F4410
Clock = 32
Config osc = hspll ' 8Mhz Crystal
#option GLCD_MODEL = SED1520
#option GLCD_WIDTH = 122 // width (pixels)
#option GLCD_HEIGHT = 32 // height (pixels)
#option GLCD_DATA = PORTD // data port
#option GLCD_RS = PORTB.2 // RS pin
#option GLCD_RW = PORTB.3 // RW pin
#option GLCD_CS1 = PORTB.0 // chip select
#option GLCD_CS2 = PORTB.1 // chip select
#option GLCD_INIT_DELAY = 100
Include "GLCD.bas"
Include "Graphics.bas"
Include "Convert.bas"
Include "Tahoma.bas"
Include "Bitmaps.bas"
TRISC = 0
SetFont(Tahoma)
Font.Style = fsNormal
TextAlign = taCenter
l1:
GLCD.Cls
PORTC = $ff
DelayMS(3000) ' Here, consistent display on PORTD leds, RD5 on
WriteStr(60,4,"- SWORDFISH SED1520 -")
SetImage(0,19,BtnOK)
PORTC = $0
DelayMS(3000) ' PORTD leds not consistent, 0-8 leds can be on
GoTo l1
This is on an EasyPIC4 board. I am using PORTC as an indication of where the program is.
After the GLCD.Cls command, PORTD is always consistent (PORTD.5 is ON, all others are off). However, after the other graphics commands, PORTD is not consistent - anything from 0 to 8 LED's can be ON, some LED's may also flash/flicker during the delay. This may be an indication of what is going on.