I'm using the following code. I know the LCD is working because I can use examples that just print text and the text is displayed.
If I use the following with the LCDInt line, it works and displays an increasing number.
If I replace the LCDInt with LCDHex, the display doesn't work properly. It displays random things all over the display and doesn't display hex characters.
This is due to a minor bug in the LCDHex routine. I'll fix it when I can, but until then adding this line at the very start of the LCDHex routine should make it work:
Set LCD_RS On
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm using the following code. I know the LCD is working because I can use examples that just print text and the text is displayed.
If I use the following with the LCDInt line, it works and displays an increasing number.
If I replace the LCDInt with LCDHex, the display doesn't work properly. It displays random things all over the display and doesn't display hex characters.
Any ideas why LCDHex won't work?
Thanks,
...Dave
'Hardware settings
#chip 16F716, 4
#config WDT_OFF
#config OSC = XT
#config CP = OFF
'LCD connection settings
'#define LCD_IO 4
'#define LCD_DATA_PORT PORTC
#define LCD_IO 4
#define LCD_DB4 PORTB.4
#define LCD_DB5 PORTB.5
#define LCD_DB6 PORTB.6
#define LCD_DB7 PORTB.7
#define LCD_RS PORTB.0
#define LCD_RW PORTB.1
#define LCD_Enable PORTB.2
For Counter = 1 to 255
cls
LCDInt Counter
wait 25 10ms
next
This is due to a minor bug in the LCDHex routine. I'll fix it when I can, but until then adding this line at the very start of the LCDHex routine should make it work:
Set LCD_RS On
Thank you, that fixed the problem.
...Dave