IR with RC5 is not working properly
Jakob Selbing
Posts: 8
I have made a little circuit which acts as a Bluetooth-to-IR remote control. The circuit can read an RC5 command from a remote control, and then replicate it. However, there's something fishy with the IR commands. Some commands·will only work the first time I press the button. In order to get any response from this command again, another command has to be sent first.
Does anyone know why this happens?
I suspect that it has something to do with the toggle bit of the RC5 protocol. This bit is toggled each time a command is sent, which I think is the correct behavior. I also tried switching of the toggling. Neither works properly...
Any help would be appreciated. Thanks
/Jakob
Does anyone know why this happens?
I suspect that it has something to do with the toggle bit of the RC5 protocol. This bit is toggled each time a command is sent, which I think is the correct behavior. I also tried switching of the toggling. Neither works properly...
Any help would be appreciated. Thanks
/Jakob
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
Doesn't the RC5 protocol auto-repeat? That is, as long as you hold down the key, the remote keeps sending the key. It does set a bit on the sends to indicate when it is a 'first key-press' versus a 'repeat-key-press' -- but I've forgotten enough of the protocol by now to remember the mechanism.
It sounds like your program is not properly doing the mecanism though.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Jon Williams
Applications Engineer, Parallax
Dallas Office
If you look at the topic and read my first post, you'll see that it is a question about the RC5 protocol, and not about PIC programming. And there were several other posts about infrared communications·in this forum.
The toggle bit toggles everytime you release a button and press another or the same button. That is there so the receiver can detect if you are selecting "1" or "11" for instance. The first time you press the "1" button the toggle bit may be zero, and the next time it's a one. That way the receiver can detect that you have released the button and that you are pressing it again.
Problem solved
Thanks anyway
/Jakob