View Full Version : Sample code for "418 Mhz Receiver-Keychain"
07-29-2005, 04:32 PM
I'm looking for a sample code to use the keychain and the receiver (with a bs2) . Is there someone who kindly helps me ?
Thanks a lot !
07-29-2005, 07:17 PM
There's nothing to it: When you press a button on the fob the corresponding output on the receiver goes high.· If you connect the outputs to P0..P4 you could use this bit of code to monitor the buttons:
btnStatus··· VAR··· Byte
· btnStatus = INL & %00011111
· DEBUG BIN5 btnStatus, CR
· PAUSE 100
· GOTO Main
Applications Engineer, Parallax
07-29-2005, 07:38 PM
Thank you. i understand it's a simple thing but i'm a newbie about this topic and when i bought the keychain and the receiver there wasn't any instruction with them.
So , thanks again !
07-30-2005, 01:14 PM
I wanted to latch the recieved outputs so that they are independent of each other.
As it is, the received high signal is only one of four, One goes high and three go low.·
If you want to retain previous high signals rather than reset, you have to do that in your software as toggles·or insert a 74HC112 as four independent toggles.· Either way, they would toggle on the high signal.
G. Herzog in Taiwan
07-30-2005, 09:57 PM
I have some more examples at work, send me an e-mail at email@example.com (mailto:firstname.lastname@example.org) and I will send you some sample programs.