I feel like a noob, yes, i know every week someone asks about serial, I looked, still can't get it, I'm an idiot.
here's my code, I'm sure it's obvious, or I hope it's obvious what I'm doing wrong...
as per the example in the help file I'm using a 22k resitor, I have portB.2 going for serout, and portb.3 for serin on a 16f628a, internal 4mhz oscillator.
I'm trying to test via hyperterminal on xp, I get nothing output via the pic, and typing numbers does zilch.
I'd just liek to enter the number ONE or TWO and have the leds turn on as such.
should be basic....
define OSC 4
DataRec Var byte
testNum Var byte
testNum = 7
main:
SERIN2 PORTB.3,396,[dec1 DataRec]
SEROUT PORTB.2,N2400,[#testNum,10]
if DataRec > 1 then
HIGH porta.0
else
LOW porta.0
endif
'------------------------
if DataRec > 2 then
high porta.1
else
low porta.1
endif
pause 2000
goto main
any and all help WITHOUT hitting me is great
Bookmarks