Self-learning IR remote receiver and 3 channel switch

Features

Hardware

Scheme The IR signals are detected with a standard receiver. Received signals are active low and cause INT0 interrupts in the ATtiny13. The resistor decouples programming signals from the IR receiver.

The key input is only sensed during startup and is connected to PINB3. This pin is driven high with an internal pullup resistor.

The three output pins PORTB0, PORTB2 and PORTB4 drive red, yellow and green LEDs.



Switch This shows how to connect a 5V relais to a channel output, with Active Low selected in the assembler source code. The PNP transistor provides enough current to activate the relais.

Construction

Breadboard This shows the construction on a simple breadboard.

Software

The software is written in AVR assembler. The asm source code is here, html formatted source code here.

The generated code requires 290 words or 580 bytes of program memory. The output of my assembler:
gavrasm Gerd's AVR assembler version 3.5 (C)2015 by DG4FAC
----------------------------------------------------------
Source file: 12_IR-Rx_Switch.asm
Hex file:    12_IR-Rx_Switch.hex
Eeprom file: 12_IR-Rx_Switch.eep
Compiled:    23.11.2016, 23:23:05
Pass:        2
     1: ;
     2: ; ***************************************
     3: ; * IR-Switch 3-Channel with ATtiny13   *
     4: ; * (C)2016 by www.avr-asm-tutorial.net *
     5: ; ***************************************
...
Program             :      290 words.
Constants           :        0 words.
Total program memory:      290 words.
Eeprom space        :       13 bytes.
Data segment        :       29 bytes.
Compilation completed, no errors.
Compilation ended 23.11.2016, 23:23:05


©2016 by http://www.avr-asm-tutorial.net