Shop OBEX P1 Docs P2 Docs Learn Events
Error Detection for RF transceiver — Parallax Forums

Error Detection for RF transceiver

acadienjccacadienjcc Posts: 6
edited 2013-01-14 07:32 in BASIC Stamp
Good day all,
I am doing a project that is using an RF transceiver,(product code # 27982 - 27982-433MHzRFTransceiver-v1.1.pdf) and it is successfullytransmitting information from one to be received by another. The issue with RF,as probably all of you know, is very susceptible to interference since it is inthe free-range of bandwidth. I researched and found a code from parallax thatis supposed to minimize the error detection by 99%, and it is supposed to befairly easy to run. Here is the code for both the transmit and receive ends:433Radio2WayTX-V1.2.bs2433Radio2WayRX-V1.2.bs2
My tranceivers works for my project code(transmitor.bs2receivetri.bs2) which is transmitting data takenfrom a tri-axis accelerometer (HitachiH48C3AxisAccelerometer.pdf) and sending it to thereceive end, which is showing that data on a Parallax Serial LCD display (RevE). Although without error detection, this project is very inefficient.
But trying to run the sample code from parallax (attachedabove) does not work. The transmit end reads; 'sending packet 1' continuously,and the receive end does not appear to read anything. I tried modifying thecode so that the baud rate matches the one used in our program, but nothingchanges.
I'm not sure how to go about this, so I am asking the goodpeople of the parallax forum (that's you guys :P) to help out. Any help wouldbe appreciated.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2013-01-11 09:20
    The error detection / correction code does work and the transceivers do work, so the problem you are having must have something to do with your specific setup or whatever changes you have made in the sample code. you will need to post your code and a schematic or detailed description of how you have things connected. Use the attachment manager that you get by clicking on the "Go Advanced" button to upload your files.

    The sample error detection / correction code uses different I/O pins from your project code and the sample code has to be modified to use the proper I/O pins for your setup. If you have not made those changes correctly, the sample code won't work. If you post the actual code you're using, we can look for that sort of changes for you.
  • acadienjccacadienjcc Posts: 6
    edited 2013-01-14 06:59
    Tried it again today and got it working. the issues now is lack of space when trying to compilate the code. Is there a way to shorten the code so that our code can be implemented without running out of space?

    here is the transmit&receive code we are trying to implement with error detection. (transmit:transmitor.bs2) (receive: receivetri.bs2)


    Thanks for the guidance
  • Mike GreenMike Green Posts: 23,101
    edited 2013-01-14 07:32
    The usual problem people run into with using this error detection code is that it uses all of the variable space available. The only way to manage that is to use the "aliases" feature of PBasic to reuse some of the temporary variables in the error detection code for their own routines. So, for example, if the variable AA in your code is only used to process the data from the ADC and, once a packet is made up to transmit to the other end of the wireless link, it's not used. Then there's a variable in the error detection code BB that's used only during the actual transmission. You can use the same storage for both variables by defining "BB VAR AA". This is described beginning on page 89 of the BASIC Stamp Syntax and Reference Manual.
Sign In or Register to comment.