Wow! Joe that was fast reply.
I'm going to try your suggestion right now. The
ANSEL=%00000000 ' set all analog pins to digital
is what I think is the missing piece.
Will let know how this goes.
Thanks for your help.
Gordon
Wow! Joe that was fast reply.
I'm going to try your suggestion right now. The
ANSEL=%00000000 ' set all analog pins to digital
is what I think is the missing piece.
Will let know how this goes.
Thanks for your help.
Gordon
Tried the
ANSEL=%00000000 ' set all analog pins to digital
still no luck. Just the solid black line across the
top of the LCD. Any other suggestions/ideas.
Thanks in advance.
Got going Joe.
Thanks for the tips and the link to the thread. Found it was a huge
help.
Thanks again, now I can move forward with this project.
Hi Gordon,
It's like being married, it's not that you did anything wrong, maybe sometimes just not enough
I would add some housekeeping code like:
I would add code to set the config fuses so as not to have to rememberCode:TrisA = %11110110 ' make port 0 and 4 outputs for lcd TrisB = %11110000 ' make lower 4 bits outputs for lcd
when programming. I would temporaraly add an lcdout to run once at startup, something like:
just to make sure the lcd is working and I would add a pause 1000 just before that to allow lcd time to initialize.Code:start: ' this goes after your defines and adcon, ansel etc . . . Lcdout $fe, 1, "Gordon's Thermometer" pause 1000 main: all of your other code goes here goto main end
If you do not see the splash screen, you won't see anything else, and then you know to check wireing, contrast etc . . .
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
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 19: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
Bookmarks