mslaney
- 22nd January 2005, 21:39
Hi there,
I'm getting garbled text on my Hitachi based LCD attached to a 16F876. Most of the letters are legible but sometimes it skips a letter or misprints multiple letters. I've tried three seperate displays with the same results.
Here's my code.
'Chip config
trisa = %00000000
trisb = %00000000
'General Defines
define LOADER_USED 1
define OSC 20
'LCD Defines Pins / port for LCD data I/O
define LCD_DREG PORTB
define LCD_DBIT 4
define LCD_RSREG PORTB
define LCD_RSBIT 3
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 0
define LCD_BITS 4
DEFINE LCD_LINES 4
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
START:
pause 600
lcdout $fe,1
lcdout $fe,2
pause 1000
porta = %00000001
lcdout "hello world"
pause 1000
porta = %00000000
goto start
end
I'm getting garbled text on my Hitachi based LCD attached to a 16F876. Most of the letters are legible but sometimes it skips a letter or misprints multiple letters. I've tried three seperate displays with the same results.
Here's my code.
'Chip config
trisa = %00000000
trisb = %00000000
'General Defines
define LOADER_USED 1
define OSC 20
'LCD Defines Pins / port for LCD data I/O
define LCD_DREG PORTB
define LCD_DBIT 4
define LCD_RSREG PORTB
define LCD_RSBIT 3
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 0
define LCD_BITS 4
DEFINE LCD_LINES 4
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
START:
pause 600
lcdout $fe,1
lcdout $fe,2
pause 1000
porta = %00000001
lcdout "hello world"
pause 1000
porta = %00000000
goto start
end