Hi there,
I'm using a 16F88 and try to get an 2x16 LCD display working.
I found some examples on how to connect the display to the PIC but when I switch on the programmer (AN589), the display switches on all 1st lines character's pixels (see attachment); nothing else happens. Worse, the PIC is heating (maybe up to 50°C). The circuit is powered by the programmer.
I don't think that this has something to do with the PIC since I erased it and the same phenomenon happened again.
According to the documentation I could find, I connected:
Code:
PIC ports Symbol LCD pin
PORTA.0 DB4 11
PORTA.1 DB5 12
PORTA.2 DB6 13
PORTA.3 DB7 14
PORTA.4 RS 4
PORTB.3 E 6
- Vss - GND 1
- Vdd / Vcc +5V 2
- Vee / Contrast 3
- R/W 5
I double checked my wiring (used different colours) and don't see what's wrong. Appart the 10k pull-up on MCLR, there are no other components (display DIRECTLY connected to PIC).
The code is here:
Code:
'LCDOUT PBP command
'It assumes the LCD will be used with a 4-bit bus with
' data lines DB4 - DB7 connected to PICmicro PORTA.0 - PORTA.3,
' Register Select to PORTA.4 and Enable to PORTB.3.
' It is also preset to initialize the LCD to a 2 line display.
OSCCON = %01100000 'Internal RC set to 4MHZ
Pause 1000 'Wait for display to initialise
Main:
lcdout $FE, 1 'Clear LCD
lcdout $FE, 2 'Position cursor at home
lcdout "Hello World" 'Send "Hello World" to LCD on line 1
lcdout $FE, $C0 'Position cursor second line
lcdout "Second line" 'Send "Second line" to LCD on line 2
pause 1000 'Pause 1 second to see it
goto Main
end
What am I doing wrong?
Bookmarks