Problem with 16F886 and LCD on PortC
Hi, I write a program to test LCD and I see on first line black squares.
What's wrong ?
The LCD is OK, i have test with 16F690 on PortC and work.
This is my code:
@ __config _CONFIG1,_WDT_OFF & _MCLRE_OFF & _LVP_OFF & _CP_OFF
@ __config _CONFIG2, _WRT_OFF
DEFINE OSC 4
ANSEL=0 'toate porturile sunt digitale
ANSELH=0
;******** legaturi display 2x16 caractere *******
DEFINE LCD_DREG PORTC ;PortC folosit pentru date
DEFINE LCD_DBIT 0 ;pinul 0 este primul pin de date conectat
DEFINE LCD_RSREG PORTC ;portC folosit pt. pinul RS
DEFINE LCD_RSBIT 5 ;Register select pin
DEFINE LCD_EREG PORTC ;foloseste PortC pentru pinul E
DEFINE LCD_EBIT 4 ;Enable pin
DEFINE LCD_BITS 4 ;bus pe 4 biti
DEFINE LCD_LINES 2 ;LCD cu doua randuri de caractere
Pause 500
Bucla:
Lcdout $FE,1 ;clear display
Lcdout $FE,2 ;return home
Lcdout "TEST TEST"
pause 3000
goto Bucla
end
Re: Problem with 16F886 and LCD on PortC
Have you searched the forum for similar problem?
Look at this from similar chip:
http://melabs.com/samples/LABX1-16F887/lcdx.htm
Came from: http://www.picbasic.co.uk/forum/show...87+lcd+digital
Robert
Re: Problem with 16F886 and LCD on PortC
I try these and... nothing. The program run (I put a LED who blink). Any advise, please ?
Re: Problem with 16F886 and LCD on PortC
Is it possible that the CONTRAST on the LCD is set too high?
Re: Problem with 16F886 and LCD on PortC
Solved. DB4 from LCD not conected :confused: Thanks.
Re: Problem with 16F886 and LCD on PortC
What about analog, pwm or some pther feature enabled on selected ports?
Robert
Re: Problem with 16F886 and LCD on PortC
Quote:
Originally Posted by
Demon
What about analog, pwm or some pther feature enabled on selected ports?
Robert
I use this
ANSEL=0 ;porturile A si B sunt digitale
ANSELH=0
ADCON0.0=0
SSPCON.5=0 ;dezactiveaza portC serial
RCSTA.7=0