The simple wireless RF remote using HT12E & HT12D set of encoder/decoder and RF module has limitation of providing only 4 controls to the user. This topic presents a way to create 16 channels of output corresponding to 4 channels of input. This has been achieved by using AT89C51 of 8051 family of microcontrollers on the receiver end. In this application, a maximum of 16 appliances can be switched by four inputs at transmission end.
The provision of providing input to the circuit has been provided by a set of four switches. These switches are connected to the encoder IC HT12E. The binary logics from 0000 to 1111 can be passed through these switches. For example, a 1001 logic can be sent by pressing the 2nd and 3rd switches (since the switches are connected to ground). The encoder converts the parallel logic to serial form which gets transmitted through the antenna of the RF transmitter. For more details, refer wireless RF remote. The RF receiver acquires these signals and sends it to the decoder IC HT12D. HT12D decodes the serial data to generate the parallel signals again.
Project Source Code
###
#include<reg51.h> sbit in1=P2^0; //input pin1 sbit in2=P2^1; //input pin1 sbit in3=P2^2; //input pin1 sbit in4=P2^3; //input pin1 sbit out1=P1^0; //output pins for 16 controls/appliances sbit out2=P1^1; sbit out3=P1^2; sbit out4=P1^3; sbit out5=P1^4; sbit out6=P1^5; sbit out7=P1^6; sbit out8=P1^7; sbit out9=P3^0; sbit out10=P3^1; sbit out11=P3^2; sbit out12=P3^3; sbit out13=P3^4; sbit out14=P3^5; sbit out15=P3^6; sbit out16=P3^7; void main() { in1=in2=in3=in4=1; //configuring as input pins out1=out2=out3=out4=out5=out6=out7=out8=out9=out10=out11=out12=out13=out14=out15=out16=1; //making output pins high while(1) { while(in1==1&&in2==1&&in3==1&&in4==1) //signal (1111) is fed to output pin 1 { out2=out3=out4=out5=out6=out7=out8=out9=out10=out11=out12=out13=out14=out15=out16=1; out1=0; } while(in1==1&&in2==1&&in3==1&&in4==0) //signal (1110) is fed to output pin 2 { out1=out3=out4=out5=out6=out7=out8=out9=out10=out11=out12=out13=out14=out15=out16=1; out2=0; } while(in1==1&&in2==1&&in3==0&&in4==1) //signal (1101) is fed to output pin 3 { out1=out2=out4=out5=out6=out7=out8=out9=out10=out11=out12=out13=out14=out15=out16=1; out3=0; } while(in1==1&&in2==1&&in3==0&&in4==0) //signal (1100) is fed to output pin 4 { out1=out2=out3=out5=out6=out7=out8=out9=out10=out11=out12=out13=out14=out15=out16=1; out4=0; } while(in1==1&&in2==0&&in3==1&&in4==1) //signal (1011) is fed to output pin 5 { out1=out2=out3=out4=out6=out7=out8=out9=out10=out11=out12=out13=out14=out15=out16=1; out5=0; } while(in1==1&&in2==0&&in3==1&&in4==0) //signal (1010) is fed to output pin 6 { out1=out2=out3=out4=out5=out7=out8=out9=out10=out11=out12=out13=out14=out15=out16=1; out6=0; } while(in1==1&&in2==0&&in3==0&&in4==1) //signal (1001) is fed to output pin 7 { out1=out2=out3=out4=out5=out6=out8=out9=out10=out11=out12=out13=out14=out15=out16=1; out7=0; } while(in1==1&&in2==0&&in3==0&&in4==0) //signal (1000) is fed to output pin 8 { out1=out2=out3=out4=out5=out6=out7=out9=out10=out11=out12=out13=out14=out15=out16=1; out8=0; } while(in1==0&&in2==1&&in3==1&&in4==1) //signal (0111) is fed to output pin 9 { out1=out2=out3=out4=out5=out6=out7=out8=out10=out11=out12=out13=out14=out15=out16=1; out9=0; } while(in1==0&&in2==1&&in3==1&&in4==0) //signal (0110) is fed to output pin 10 { out1=out2=out3=out4=out5=out6=out7=out8=out9=out11=out12=out13=out14=out15=out16=1; out10=0; } while(in1==0&&in2==1&&in3==0&&in4==1) //signal (0101) is fed to output pin 11 { out1=out2=out3=out4=out5=out6=out7=out8=out9=out10=out12=out13=out14=out15=out16=1; out11=0; } while(in1==0&&in2==1&&in3==0&&in4==0) //signal (0100) is fed to output pin 12 { out1=out2=out3=out4=out5=out6=out7=out8=out9=out10=out11=out13=out14=out15=out16=1; out12=0; } while(in1==0&&in2==0&&in3==1&&in4==1) //signal (0011) is fed to output pin 13 { out1=out2=out3=out4=out5=out6=out7=out8=out9=out10=out11=out12=out14=out15=out16=1; out13=0; } while(in1==0&&in2==0&&in3==1&&in4==0) //signal (0010) is fed to output pin 14 { out1=out2=out3=out4=out5=out6=out7=out8=out9=out10=out11=out12=out13=out15=out16=1; out14=0; } while(in1==0&&in2==0&&in3==0&&in4==1) //signal (0001) is fed to output pin 15 { out1=out2=out3=out4=out5=out6=out7=out8=out9=out10=out11=out12=out13=out14=out16=1; out15=0; } while(in1==0&&in2==0&&in3==0&&in4==0) //signal (0000) is fed to output pin 16 { out1=out2=out3=out4=out5=out6=out7=out8=out9=out10=out11=out12=out13=out14=out15=1; out16=0; } } }###
Circuit Diagrams
Project Components
Filed Under: 8051 Microcontroller
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.