you want receiuve them serial or parrallel ???
if it's parrallel.
this example use all the 8 pins from PORTB. PORTA.0 is the receive acknoledge pin
SleepPin VAR PORTA.0
RParrallel VAR BYTE
while SleepPin=High
Wend
RParrallel=PORTB
vallue is store into RParrallel.
if you want to receive in serial use SERIN statement. The following will receive data from PORTB.0 pin. I assume you have an MAX232 between PC and PIC
Rserial VAR BYTE
SERIN PORTB.0,4,Rserial
in case you don't have any MAX232 between PIC and PC use
SERIN PORTB.0,0,Rserial
the above assume that you use 2400 baud. In case baudrate is different be sure to have the right crystal to be able handle your specific baudrate. 20MHZ crystal is suitable for 9600 serial comms.
regards
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks