I want to print to an LCD with a 16F628A using the internal oscillator and 4 bit mode due to the limited pins.
I believe the 2 lines following th #config disable to comparators. All I get is 1 line of black squares on the 2 line LCD. I have it working on a 16F877A, so I know the LCD works. Adjusting the contrast only gives me lighter squares on line 1.
Am I missing disabling something else on the pins that I want to use for the LCD?
I want to print to an LCD with a 16F628A using the internal oscillator and 4 bit mode due to the limited pins.
I believe the 2 lines following th #config disable to comparators. All I get is 1 line of black squares on the 2 line LCD. I have it working on a 16F877A, so I know the LCD works. Adjusting the contrast only gives me lighter squares on line 1.
Am I missing disabling something else on the pins that I want to use for the LCD?
'Hardware settings
#chip 16F628A, 4
#config MCLRE_OFF, INTOSC_OSC_NOCLKOUT
MOVLW 0x07
MOVWF CMCON
'LCD connection settings
#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
'Show opening message
PRINT "Line 1"
locate 1,0
PRINT "Line 2"
Thanks,
...Dave
Seems I had a band ground connection. It is working now.