PDA

View Full Version : Anyone use RWS-434/TWS-434



sdy
04-17-2007, 07:21 AM
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,[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,[ WAIT(65), dat1]
HIGH 2
DEBUG DEC dat1,CR
' PAUSE 100
LOW 2
GOTO START

swrider
04-17-2007, 01:14 PM
Try shortening your pause between transmits to around 10ms vs 1 second. The receiver needs to be stabilized/sync'd and I found 10 transmits with 10ms pauses worked great, you'll just need to adjust your receiver code with a suitable pause so that it ignores the redundant transmits.

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

sdy
04-18-2007, 05:48 AM
So these do work sucessfully for you? Then I just need to rweak my code. Thanks.

sdy
04-18-2007, 06:57 AM
Got it! I had the baud rate scewed up. I have a BSp2 as xmit and BS2 as rcv, but both were using the same value for baud rate. Thanks for making me look at it!