Of course, there are lot of similar projects offered on the market either as pre assembled units or as kits. Here we have our own that obtained with the use of Flow Code v5.
The unit is remotely controllable thru the use of RC-5 protocol. A ready RC-5 component is offered by the new versions of Flow Code, so there is no need to build a MACRO for it. Just drag and drop the Flow Code RC-5 compo on control panel and configure it thru its properties window. It is so simple! A brief description of unit: It offers the VOL+ and VOL- functions plus STBY and MUTE.
The micro is programmed to communicate with any RC5 compatible remote control handset. Each handset transmits a unique address code, e.g. TV address = 0 and Preamplifier address = 16. To initialize the micro for communication with a remote handset, turn off power supply then turn it on again. The red LED mounted on PCB immediately starts to blink fast for 10 times. Within this time, press firmly the button mounted on PCB until LED stops to blink and remains constantly glowing. Release the button. Now, within 3 seconds, press firmly a button (MUTE is preferred) on remote control handset. If its address code has been stored successfully into micro, the LED blinks slowly 6 times. If we don’t press any button on remote control handset then the TV address code = 0 is automatically stored into micro and the LED does not lit. If the remote control is incompatible with RC-5, the LED starts to blink fast for 10 times and the TV address = 0 is automaticaly stored into micro. That is all. The internal EEPROM of micro retains constantly the address code.
Some details about the microcontroller and program code: I did use of everything I had in my stock and so a PIC16F88. This micro includes an internal oscillator module that is very accurate for the given project so there is no need of use an external XTAL. In higher level PICs - like P16F88X - if we don’t configure their internal oscillator it is automatically placed at 4MHz. In P16F88 the INTOSC module should be configured thru OSCCON register or else will not work. That is the reason of the C-code command “osccon = 0x6C;” (INTOSC = 4MHz) in the beginning of Flow chart. The other command “osctune = 0x00;” maybe is redundant, but in P16F88 datasheet is referred that it places the oscillator in its center frequency. The 2nd C-code command “option_reg.NOT_RBPU = 0;” enables the internal weak pull-ups connected at pins RB.0-RB.7 of Port B. This eliminates the need of use external pull-up resistors.
In configuration screen you can see that I have disabled the BOR reset. I did it for two reasons: 1) PIC16F88 offers just one level for BOR, 4Vdc. 2) The motor of ALPS potentiometer consumes enough current (100 to 150mA) during its rotation and so it can cause a sufficient voltage drop to trigger without reason the BOR reset of micro. Higher level PICs offer two - selectable - BOR levels, 4V and 2.1V. It should be noted that, according to Microchip, when both POR and BOR are enabled the MCLR is usually redundant. In the current project, an external MCLR (reset) circuit is used. You can play with different RESET configurations; for me that was a luxury because i had to send the project for test.
In the picture you can see that I have connected the IR receiver with a screened cable of 20cm to the PCB. That offers flexibility in the mounting of IR receiver. I haven't noticed any interference or signal loss issue.