Shop OBEX P1 Docs P2 Docs Learn Events
rf program — Parallax Forums

rf program

smartgsmartg Posts: 26
edited 2008-05-24 17:33 in BASIC Stamp
does the keyfobe work with the parallax rf reciever module.also if it does ,how would i program my bs2 to recieve the incoming data from the keyfob.that way i can say if this comes then do that.i know that when you hit a button on the keyfobe d0,to d5 is recieved depending on which button is pressed.if you know anything that can help me please write.

Post Edited (smartg) : 5/23/2008 9:49:59 PM GMT

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-23 22:40
    The keyfob consists of two parts, the actual RF transmitter and an encoder that takes the button pushes and encodes them as pulses for keying the transmitter. The receive end has to consist of a receiver and a matching decoder. The Parallax receiver is only that part. You'd have to have a decoder chip or some circuitry and partial decoding as part of the Stamp program. You'd have to look at the transmitter and encoder datasheets to see what's necessary. Your easiest path would be to buy the decoder or find a ready made kit for it. Perhaps someone else knows of one.
  • smartgsmartg Posts: 26
    edited 2008-05-24 15:39
    what exatly is a decoder. i remember reading on links website it said the keyfob[noparse][[/noparse]encoder] had to match the receiver or somthing like that.i thought you could just attatch the reciever to my bs2 and when i pressed s1 on the keyfobe and if the program was write it would send d0,and you can see what i thougt if you go to you tube and type in boe mop.when you say decoder could i use a bs2 as a decoder

    Post Edited (smartg) : 5/24/2008 3:46:29 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-24 16:22
    Look, you've got a keyfob with 5 buttons and a little radio transmitter that can either transmit a signal or not transmit a signal. How are you going to get the information to the other end of the "channel" that a certain button has been pushed? Let's say that other people in your neighborhood have similar keyfob transmitters too. How are they going to not interfere with each other?

    An encoder chip / decoder chip pair solves these problems for you. The encoder chip is attached to the 5 buttons (or maybe more) and to the radio transmitter. When any one or more button is pushed, the encoder chip makes up a message consisting of a series of pulses that somehow "encodes" the button(s) that is/are pushed and includes a numeric code (usually set at the factory inside the keyfob) that identifies the keyfob and the encoder turns on and off the transmitter in a pattern that would be recognized by a matching decoder chip and the button push and identifier number are part of the pattern transmitted.

    The receiver detects the transmitted signal and produces a series of on/off pulses that go to the decoder chip which does some interpretation and checking for a valid pulse sequence, then the decoder checks the identification code against some internal switches to make sure it's correct, then puts out a logic signal on each of several pins indicating which button on the keyfob was pressed. There's usually also a "valid data" signal that is true if the button output signals are correct (the data received passed some validity checking).

    It's theoretically possible for something like a BS2 to decode the "raw data" from the receiver, but the exact form of the data is not well documented and the rules for decoding it are not well documented either. I'm sure you could find it somewhere on the Internet, but it's usually easier just to buy a receiver/decoder or just a decoder chip and use that.

    If you buy the combination receiver / decoder, then you do get a separate signal for each of the buttons on the keyfob and you can have the BS2 do something for each of the buttons on the keyfob. As I mentioned, you are still going to have to learn how to program the BS2 and how to get it to react to signals coming in to it like from a receiver / decoder.
  • smartgsmartg Posts: 26
    edited 2008-05-24 17:33
    thanks. i dont have a lot of money so im going to try ttry just using the bs2 to decode but if i casnt find anything ill try your way
Sign In or Register to comment.