Shop OBEX P1 Docs P2 Docs Learn Events
BS2 and RF problems — Parallax Forums

BS2 and RF problems

SiCCSiCC Posts: 21
edited 2008-01-12 01:34 in BASIC Stamp
I have 2 BS2's and a pair of Digikey (i think) TX99 and RE99 transmitter/receiver. I guess these were bought from parallax a few years back but i cant find any tutorials or doc's on the site.

im not able to make the 2 stamps talk thru the above. to test (using the same code) i removed the above and just ran a jumper between the two stamps + a jumper for both vss. the programs do what they should, everything is great. im not sure how to test if the rf devices are workin correctly or at all.

the tx and re have 3 pins: grd, V+ and Data.

im thinkin either

1) i dont have them connected properly (missing parts or something)
2) these guys dont use SER IN/OUT
3) they just dont work at all


here's the code....the variable N9600 is actually set as 2400 N81 and my transmitter does not have flow control so i removed that piece.


Thanks for any help!

*****RECEIVE

'---Set up Variables---
Value VAR Word 'Holds data value being transmitted
junk VAR Word

'---Set up Constants---
Rx CON 0 'Receive I/O pin number
N9600 CON 16780 'Baud mode value for 9600 baud, 8,N,1
synch CON "A"

'Receive data
ReceiverMain:
SERIN Rx,N9600,[noparse][[/noparse]WAIT(synch),STR Value\18] 'Receive one byte
DEBUG "Receiving: ",STR Value,CR

GOTO ReceiverMain 'Then start over again



****TRANSMIT

'---Set up Variables---
Value VAR Byte

junk VAR Word 'Holds data value being transmitted

'---Set up Constants---
Tx CON 0 'Transmit I/O pin number
TxFlow CON 14 'Transmit flow control I/O pin number
N9600 CON 16780 'Baud mode value for 9600 baud, 8,N,1
synch CON "A"


Initialize:
LOW Tx 'Initialize transmitter interface

'Transmit data
SenderMain:
FOR Value = 0 TO 255
SEROUT Tx,N9600,[noparse][[/noparse]junk,synch,"Blake says YaHoo!"]
PAUSE 100
NEXT
PAUSE 1000 'Pause for 1 second
GOTO SenderMain 'Then start over again

Comments

  • Bruce BatesBruce Bates Posts: 3,045
    edited 2008-01-11 09:08
    SiCC -

    The following statement DOES NOT do what it says it's doing:

    SERIN Rx,N9600,[noparse][[/noparse]WAIT(synch),STR Value\18] 'Receive one byte

    It's attempting to read 18 BYTES into a variable that can only contain TWO BYTES at MOST! What the other 16 BYTES are CLOBBERING, is anyone's guess. This would be a far better method of defining VALUE:

    VALUE VAR BYTE(18)

    Just remember, you only have 26 BYTES of variable space available on a BS-2.

    Lastly, when using an RF connection, either $55 or $AA make far better SYNCH characters since they both have alternating strings of 1's and 0's.

    BTW - Those RF units were manufactured by Ming Electronics in China (as I remember). I MAY have data sheets for them, but it will take me some time to dig them out.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Post Edited (Bruce Bates) : 1/11/2008 9:13:36 AM GMT
  • SiCCSiCC Posts: 21
    edited 2008-01-12 01:34
    i'll fix my code for the SERIN, thanks for the heads up. i was just trying a quick test to see if these worked or not. at first i was cycling 0-255, which worked correctly. then i switched to the yahoo! phrase as a further test, which also worked correctly. Both tests passed with SER IN/OUT to one another but failed when using the RF combo.

    and youre right about the manufacturer, digikey was the distributor.


    besides my code being ugly [noparse]:)[/noparse] do you have any suggestion for testing whether the tx99 and re99 are doing anything?
Sign In or Register to comment.