Anyone use RWS-434/TWS-434
sdy
Posts: 40
Getting very crappy communications link. It waits forever for the synch word, without it, recieved data is all over the place. Any one have some code I could try? Here's mine:
XMIT:
cntr VAR Byte
junk VAR Byte
junk = 126
'sync = "A"
start:
PAUSE 1000
dat = 1
FOR cntr = 0 TO 9
HIGH 0
SEROUT 3,17405,[noparse][[/noparse]junk,65,DEC dat]
LOW 0
PAUSE 1000
NEXT
LOW 0
PAUSE 100
GOTO start
RCV:
dat1 VAR Byte 'Data storage variable
START:
SERIN 0,17405,[noparse][[/noparse] WAIT(65), dat1]
HIGH 2
DEBUG DEC dat1,CR
' PAUSE 100
LOW 2
GOTO START
XMIT:
cntr VAR Byte
junk VAR Byte
junk = 126
'sync = "A"
start:
PAUSE 1000
dat = 1
FOR cntr = 0 TO 9
HIGH 0
SEROUT 3,17405,[noparse][[/noparse]junk,65,DEC dat]
LOW 0
PAUSE 1000
NEXT
LOW 0
PAUSE 100
GOTO start
RCV:
dat1 VAR Byte 'Data storage variable
START:
SERIN 0,17405,[noparse][[/noparse] WAIT(65), dat1]
HIGH 2
DEBUG DEC dat1,CR
' PAUSE 100
LOW 2
GOTO START
Comments
Also, these little RX/TX are rated at 2400 baud max, you might want to try 1200. I couldn't get them to work above 1200 at all but I am using BS1's so that may be a factor. I'll be trying these with a propeller tomorrow and will·try 2400 first but don't have my hopes up.
I think these units are great for short range, low speed RF and have a number of small projects in the works using them.·I think I've fallen for the Xbee's though, which are a bit more power hungry but·on paper appear to be alot more bang for a little more $.
M