Microcontroller › 8051 › to know about DTMF Controlled Home Automation System Using 8951 or 8051
- This topic has 5 replies, 3 voices, and was last updated 11 years, 2 months ago by
naresh.
-
AuthorPosts
-
December 10, 2013 at 11:14 am #2756
naresh
Participanti want to know abot the dtmf controlled automation using microcontroller 8051
December 11, 2013 at 5:20 pm #10721mrutyunjay parida
ParticipantI am attaching a code here. You can use this hints for your project work.
This is not the complete working code.
You have to analyze it and rewrite your own code.
#include<reg51.h>bit keylflag = 0x10;bit key2flag = 0x11;bit key3flag = 0x12;bit key4flag = 0x13;bit stop_flag = 0x14;bit stop_flag1 = 0x15;bit stop_flag3 = 0x16;sbit IN1=P0^6;sbit IN2=P0^5;sbit EN1=P0^7;sbit std=P0^4;sbit D1=P3^0;sbit D2=P2^1;sbit D3=P2^2;sbit D4=P2^3;sbit red=P1^0;sbit green1=P1^1;sbit green2=P1^4;sbit green3=P1^5;sbit green4=P1^6;void int0_init();void intl_init();void start_motor();void start_motorl();void main(){red = 0; //red led offgreen1 = 0; //greenl led offgreen2 = 0; //green2 led offgreen3 = 0; //green3 led offgreen4 = 0; //green4 led offkeylflag = 0; //clear keylflagkey2flag = 0; //clear key2flagkey3flag = 0; //clear key3flagkey4flag = 0; //clear key4flagstop_flag = 0; //clear stopflagstop_flagl = 0; //clear stopflaglstop_flag3 =0; //clear stopflag3EN1=0; // motor stopIN1=0;IN2=0;while(1){if(D1==1 && D2==0 && D3==1 && D4==0) // FOR KEY 1{red =0 //red led offgreen1 =1; //green1 led ongreen2 =0; //green2 led offgreen3 =0; //green3 led offgreen4 =0; //green4 led offkey1flag =1; //make key1flag high}else if(D1==1 && D2==0 && D3==0 && D4==1) //for key2{red =0; //red led offgreen1 =0; //green1 led offgreen2 =1; //green2 led ongreen3 =0; //green3 led offgreen4 =0; //green4 led offkey2flag = 1 //make key2flag high}else if(D1==1 && D2==0 && D3==0 && D4==0) // for key 3{red =0; //red led offgreenl =0; //green1 led offgreen2 =0; //green2 led offgreen3 =1; //green3 led ongreen4 =0; //green4 led offkey3flag =1; //make key3flag high}else if(D1=1 && D2=0 && D3==1&& D4==0) // for key 4{red =0; //red led offgreenl =0; //green1 led offgreen2 =0; //green2 led offgreen3 =0; //green3 led offgreen4 =1; //green4 led onkey4flag =0; //make key4flag highif((keylflag ==1) && (key2flag ==1) && (key3flag ==1) && (key4flag ==1)){startmotor(); //open the doorkey1flag = 0; //clear key1flagkey2flag = 0; //clear key2flagkey3flag = 0; //clear key3flagkey4flag = 0; //clear key4flagwhile(stopflag3 == 0){if(D1==0&&D2=1&&D3=1&&D4==0) // for key 9{start—motorl(); //close the doorstopflag3 =1; //set stop3 flag}}stopflag3 = 0; //clear stop3flag}}else{red 1; //red led ongreen1 = 0; //green1 led offgreen2 = 0; //green2 led offgreen3 = 0; //green3 led offgreen4 = 0; //green4 led off}}}void startmotor(){EN1 =1; //rotate the motor in clockwise directionIN1 =1;IN2 =0;intO_init(); //initialise the interruptwhile(stopflag == 0); //wait here till stopflag goes to highstopflag =0; //clear stopflag}void intO_init(){EX0=1; //ENABLE INTO INTERRUPTIT0 =1; // MAKE INTO Is FALLING EDGE TRIGGERED}void intO_isr(void) interrupt 0 // EXTERNAL INTERRUPTO ISR{EN1 =0;//stop motorIN1 =0;IN2 =0;stop_flag =1; //set stop_flag}void start_motor1(){EN1 =0; //rotate motor in anticlockwise directionIN1 =0;IN2 =1;int1_init(); //initialise interupt1while(stop_flag1=1); //wait here till the stop_flag1 goes to zerostop_flag1= 0;//clear stop_flag1}void int1_init(){EX1=1; // ENABLE iNT1 iNTERRUPTIT1=1; // MAKE INT1 IS FALLING EDGE TRIGGERED}void intl_isr(void) interrupt 1 // EXTERNAL INTERRUPT1 ISR{EN1 =0; //stop motorIN1 =0;IN2 =0;stopflag1=1; //set stopflagl}December 12, 2013 at 4:09 am #10724AJISH ALFRED
ParticipantHi Naresh,
I’m sure you will find this link very useful
http://www.engineersgarage.com/contribution/dtmf-controlled-home-automation-system-using-8951
January 26, 2014 at 3:30 pm #10892naresh
Participantthanx alote for guiding…but i want exact circuit diagram of DTMF Controlled Home Automation System Using 8951 or 8051…plzz help me
January 27, 2014 at 5:16 am #10893AJISH ALFRED
ParticipantHi Naresh,
Can’t you find a tab with label “Cricuit diagram” in the same link
http://www.engineersgarage.com/contribution/dtmf-controlled-home-automation-system-using-8951.
February 23, 2014 at 11:56 am #11090naresh
Participantheloo sir.. i am not able to see the ckt diagram on above link
-
AuthorPosts
- You must be logged in to reply to this topic.