The problem is due to your LCD DEFINES
Code:
' LCD Display
' -----------
DEFINE LCD4X20
DEFINE LCD_DREG PortD ' Set LCD Data to PortD
DEFINE LCD_DBIT 0 ' Set starting Data to Bit0
DEFINE LCD_EREG PortD ' Set LCD Enable to PortC
DEFINE LCD_EBIT 5 ' Set LCD Enable line to PortC.1
DEFINE LCD_RSREG PortD ' Set LCD Register Select to PortB
DEFINE LCD_RSBIT 4 ' Set LCD RS line to PORTC.0
DEFINE LCD_BITS 4 ' Set for a 8 bit Bus
Always make sure that ALL DEFINEs are properly written. you MUST use PORTD in uppercase.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks