Shop OBEX P1 Docs P2 Docs Learn Events
Anyone use RWS-434/TWS-434 — Parallax Forums

Anyone use RWS-434/TWS-434

sdysdy Posts: 40
edited 2007-04-17 22:57 in BASIC Stamp
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

Comments

  • swriderswrider Posts: 16
    edited 2007-04-17 05:14
    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
  • sdysdy Posts: 40
    edited 2007-04-17 21:48
    So these do work sucessfully for you? Then I just need to rweak my code. Thanks.
  • sdysdy Posts: 40
    edited 2007-04-17 22:57
    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!
Sign In or Register to comment.