PDA

View Full Version : better way



grounded
- 24th July 2008, 13:35
As always I looking for a better way, I know this is NOT the way a real programmer would do it
thanks
PBP 16F676 TO 16F676 TO LCD
THE MANUAL SAYS
‘ Wait until the character “A” is received
serially on Pin1 and put next character into B0"

WHATS THE BEST WAY TO SEND "GROUNDED" FROM ONE PIC TO PIC TO LCD
THIS WORKS BUT THINKING THERE MITE BE A BETTER WAY

TX

SEROUT PORTA.0,N2400, ["GR"]

RX

SERIN PORTA.0,N2400,["G"],B0
IF B0="R" THEN LCDOUT $FE,1,"GROUNDED"

mackrackit
- 24th July 2008, 15:20
That looks about right.

You do realize that you are not sending "GROUNDED" but just sending "GR" :)

The other ways of using hardware serial or maybe the SERIN2 command or DEBUG may or may not be a "better way", depends on what you are doing. SERIN/SEROUT is fine for basic stuff , SERIN2 gives more options....

skimask
- 24th July 2008, 17:10
Are you looking to make an LCD serial backpack?
If so, there are a few decent examples of that here on the forums.
Just do a search...it's out there...

grounded
- 24th July 2008, 19:04
yep mackrackit just "GR"

skimask if backpack is what it is called when you turn a $9.00 LCD into a $35.00 LCD
thats what I'm trying to do. Now I Know what to search for
thanks to the both of you

mackrackit
- 24th July 2008, 19:12
Here is a good place to start.

http://www.picbasic.co.uk/forum/showthread.php?t=4972&highlight=serial+backpack

grounded
- 24th July 2008, 19:17
I just "print PDF" that one along with some more to study up on.
make it easier when you at least know what to search for LOL
thanks

skimask
- 24th July 2008, 20:23
skimask if backpack is what it is called when you turn a $9.00 LCD into a $35.00 LCD thats what I'm trying to do. Now I Know what to search for
thanks to the both of you
Yep, basically, you take one PIC, write the code, replace LCDOUT with SEROUT, take another PIC and use SERIN to get the LCDOUT.
Make any sense? It will after you muddle thru that link above...