talking to AM transciver
janb
Posts: 74
Hi,
I'd like to use FullDuplex.spin for bidirectional data transmition using
AM transciver module from Abacom
http://www.abacom-tech.com/catalog/rtf_saw.pdf
In the specification it gives Tx-Rx switching time about 100 ms.
It looks to me the assembler part of the fullDuplex code may switch more often.
I'm not very familiar with the assambler at this point, could you suggest how to modify the code to delay or eliminate the automatic switching?
The best would be if coge is the Rx mode all the time except if I call a Tx method .
any suggestions are welcome
Jan
I'd like to use FullDuplex.spin for bidirectional data transmition using
AM transciver module from Abacom
http://www.abacom-tech.com/catalog/rtf_saw.pdf
In the specification it gives Tx-Rx switching time about 100 ms.
It looks to me the assembler part of the fullDuplex code may switch more often.
I'm not very familiar with the assambler at this point, could you suggest how to modify the code to delay or eliminate the automatic switching?
The best would be if coge is the Rx mode all the time except if I call a Tx method .
any suggestions are welcome
Jan
Comments
http://www.abacom-tech.com/data_sheets/RTF_L-DATA-SAWuser.pdf
Second, I'm not really sure what is meant by a 100ms "Tx-Rx switching time," though I assume it is the minimum amount of time you want to wait between sending data and receiving data, so that one portion stops operating and doesn't interfere with the other portion.
Third, (and I haven't exactly figured out how this thing works, since the datasheet isn't that great), but it looks like what you want to do to send data would be to put +5v on pin 8, connect an antenna to pin 9, than connect pin 2 to any open I/O pin on your prop.·Then, use the following spin·code to send/receive·two·bits:
dira[noparse][[/noparse]pin]~~·····························'sets the pin to ouput
outa[noparse][[/noparse]pin] := bit1··················· · 'outputs first bit
waitcnt(_CLKFREQ/4800 + cnt)·· 'waits 1/4800th of a second (for 4800 baud)
outa[noparse][[/noparse]pin] := bit2····················· 'outputs second bit
To receive data, you want to connect +5v to pin 25, then antenna to pin 9, and an I/O pin to pin 23. Then, use this spin code to retrieve the data from the device:
dira[noparse][[/noparse]pin]~·······························'sets the pin to input
bit1 := ina[noparse][[/noparse]pin]························'read first bit
waitcnt(_CLKFREQ/4800 + cnt)·· 'waits 1/4800th of a second (for 4800 baud)
bit2 := ina[noparse][[/noparse]pin]························'read second bit
I think you also need to ground pin 8 while you are receiving so that you aren't accidentally reading whatever is on pin 2 (since the data would just propagate through the device, past the antenna, straight to the output).
Now, I have no idea if this will actually work, but this is my best guess as to how it is supposed to work. If noone else replys, or knows for certain, you might try sending an e-mail to abacom and ask them for a better explanation of how it works (and if you do, could you maybe post back on here?)
-Zero