Hi,
I have a 44-pin demo board with a 18f4431 driving a Varitronix LCD display. After I push the program to the pic with a PicKit2.
The problem is it takes 30-40 sec for the display to show the message. Code is below, is this normal? What have I screwed up?
thanks
t
' Define LCD registers and bits
DEFINE LCD_DREG PORTB 'LCD data port
DEFINE LCD_DBIT 0 'LCD data starting bit 0 or 4
DEFINE LCD_BITS 4 'LCD bus size 4 or 8
DEFINE LCD_LINES 2 'Number lines on LCD
DEFINE LCD_RSREG PORTD 'LCD register select port
DEFINE LCD_RSBIT 1 'LCD register select bit
DEFINE LCD_RWREG PORTD 'LCD read/write port
DEFINE LCD_RWBIT 2 'LCD read/write bit
DEFINE LCD_EREG PORTD 'LCD enable port
DEFINE LCD_EBIT 3 'LCD enable bit
DEFINE LCD_COMMANDUS 2000 'Command delay time in us
DEFINE LCD_DATAUS 50 'Data delay time in us
TRISC = 0
TRISB = 0
TRISD = 0
ANSEL0 = 0
ANSEL1 = 0
Low PORTD.1
Low PortD.2
Pause 500
Lcdout $fe, 1
loop:
Lcdout $fe, $1, "Hello"
Lcdout $fe, $c0, "World"
Goto loop ' Do it forever
End
Bookmarks