It is a simple system based on Attiny2313 – remote controlled switch. Remote control from tuner was used for control (red button does not cause any reactions on the tuner).
Elements used:
double ARK connector x2
Attiny2313 + base
7805
470uF/16V
TSOP1736
BC547
4,7k – transistor base
0,33k – TSOP supply
relay with coil for 12V
rectifying diode – protection of transistor
12V power supply
Code:
Code:
'wyłącznik RC5 by BM*
$crystal = 1000000*
$regfile "attiny2313.dat"*
Config Portb.0 = Output*
Portb.0 = 0*
Config Rc5 = Pind.6*
Dim Address As Byte , Command As Byte*
Enable Interrupts*
Do*
Getrc5(address , Command)*
Command = Command And &B01111111*
If Address = 10 And Command = 107 Then*
Toggle Portb.0*
Waitms 400*
End If*
Loop*
End