Dave
Will try the operation with only your code...
Can one run SERIN and SEROUT on same pic as I would like to send the received data to hyperterminal and also to the LCD. So would the fol.lowing code be correct then ?
Oh and why did you choose PORTC.4 ? Looking at the pinouts for both pics I see PORTC.6 is TX and PORTC.7 is RX -are these for hardware serial , ie. HSERIN and HSEROUT and should I use them for SERIN and SEROUT or is it better to use PORTC.4 in case I want to use them for HSERIN/OUT later ?
Here's the code
Transmitter PIC (16F887)
Code:
SEROUT PORTC.4,T2400,[9,3]
Receiver PIC (18F4520)
Code:
main:
SERIN PORTC.4,T2400,[9],net 'prepare to receive the data from other PIC
IF net = 3 LCDOUT "data is",net 'look for the number 3
SEROUT PORTC.5,T2400,[9,3] 'send received data to hyperterminal via max232n to PC
end if
goto main
end
Smoke and mirrors indeed :-)
Kind regards
Dennis
Bookmarks