Tomexx
- 14th November 2004, 00:33
Hi,
I'd like to send a word from one pic and receive it on another using Serin & Serout ...I guess. Could anyone provide an example, please?
Thanks,
Tom
mister_e
- 15th November 2004, 03:45
Transmitter ...
SerPinOut VAR PORTB.0
Serdata VAR WORD
MSB VAR BYTE
LSB VAR BYTE
SerData=65000
MSB=SerData.HighByte
LSB=SerData.LowByte
SerPinOut=1
pause 20
start:
serout SerPinOut,4,["ok",MSB,LSB]
pause 1000
goto start
receiver...
SerPinInput VAR PORTB.0
Led VAR PORTB.1
SerData VAR WORD
MSB VAR BYTE
LSB VAR BYTE
Led=0
Start:
Serin SerPinInput,4,["ok"],MSB,LSB
Serdata.HighByte=MSB
SerData.LowByte=LSB
If Serdata=6500 then
Led=1
Pause 200
led=0
endif
Goto Start
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.