Delete the first line and add a pullup ressistor to RA4Code:Low PORTA.4 ' LCD R/W line low (W) Pause 1000 ' Wait for LCD to start
Delete the first line and add a pullup ressistor to RA4Code:Low PORTA.4 ' LCD R/W line low (W) Pause 1000 ' Wait for LCD to start
What about the contrast POT of the LCD?
May be it is working but because it is too dark, you see nothing but blocks!
Trim the POT until you see something on LCD.
-------------------------
"If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte
or the LCD R/W pin is left floating or set to high. In your first code example you said
As A.4 is actually the LCD RS bit, it can't work.. or i miss something?Code:Low PORTA.4 ' LCD R/W line low (W)
BTW, i've tested it here, with your current setting, and it's working.
Code:DEFINE LOADER_USED 1 Define LCD_DREG PORTA Define LCD_DBIT 0 Define LCD_RSREG PORTA Define LCD_RSBIT 4 Define LCD_EREG PORTB Define LCD_EBIT 3 Define LCD_BITS 4 Define LCD_LINES 2 Define LCD_COMMANDUS 2000 DEFINE LCD_DATAUS 50 CMCON = 7 ' disable analog comparator ANSEL = 0 ' disable ADCs Pause 500 ' LCD start up delay Lcdout $fe, 1, "LCD Test" Here: goto here ' spin here forever
Last edited by mister_e; - 4th February 2007 at 18:49.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi All
I'm happy to say my LCD is up and running. I'm impressed by the number of
quick responses to my question.
Thanks to all for the replies and tips. You guys are great.
Gordon
You're welcome!
Yeah we knowYou guys are great.
Just to satisfy my own curiosity... what was the problem???
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
The problem was a couple of issues. The port wasn't set to digtal (ANSEL),
Another was the pull-up resistor was omitted. I checked the data sheet
to make sure the CMCON was turned off, but somehow didn't realize the
ANSEL register needed to be set to 0. Bet I wont forget about this register
in the furture.
Thanks again all.
Gordon
Just to set the record. For this device and by the datasheet, PORTA.4 is not an open drain as some suggested. It's really a full CMOS output pin. So you don't even need the pull-up resistor.
But YES, you have to disable the internal analog comparators and ADCs.
Learning opportunityBet I wont forget about this register![]()
Last edited by mister_e; - 4th February 2007 at 19:58.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks