RC5 Decoder Homepage


Welcome to my homepage. I made it to publish a piece of code which i developed for the preamplifier above. The piece of code you can find on this page is for decoding commands sent by a RC5 remote. The code is written for Microchip's PIC16F84. It is based on an article from the german Elrad magazine. This software is different from other software i could find on the net: it is based on a state machine to decode the incoming RC5 string.

First a few words on the preamplifier. It is based on the P11 preamp from the Audio&Techniek magazine. (Like the Elrad magazine, it is no longer published)
The PCB in the back is from "the preamp" preamplifier of Elektuur/Elektor. (dec.'86) The PCB in the third picture is my own developement. Some features:

- PIC 16F84 controller is in sleepmode when no code is received.
- I2C IO expanders used to control the relays for switching the inputs, volume and power of the preamp.
- The PIC can be programmed in-circuit, a DB9 connector at the back of the preamp can be connected to a serial port.
- Controls my Kenwood tuner using the Kenwood 8-bit XS protocol (on/off, change presets)

The code published here is only for decoding RC5. There are enough sources on the net for I2C routines (where do you think i got them from?) and the other stuff (position decoder / kenwood XS) is too specific for publishing, i think. I always have problems getting the code i want from publications on the net. Usually it is the complete code to control a specific piece of equipment. But since i only want a part of it (e.g. the RC5 code here) for my own specific purpose there is always too much. I tried to aviod this here!

Click here for the assembly code. And here for an inside view of the preamp. If you have questions on the code or the preamp in general, you can mail me. But i cannot help you any further on writing code for your own application. That is up to you !

The source code is distributed under the GNU Public License (GPL). All code is provided as is with no warranty expressed or implied. Use it, learn from it, change it and play with it. Just don't steal it and claim that you wrote it, don't build it into any product you plan to charge money for, and don't use it in any mission critical systems.

Upload to new provider: February 20, 2004
May 1, 2009:
- Replaced pictures with the latest ones.
- It's a 16F628 now, as i needed more eeprom space.
- Kenwood code is no longer used.
- Added a very cool VFD

And they even have a counter....... You're number: