120 likes | 309 Views
Computer Architecture Lab Secret DTMF Remote Control. Supvised By : Eng Mohammed Timmraz. Prepared By Mohammed Ibraheem El- kahlout Hussain Abd-jaleell Shaalan Mohammed Mamdouh Azaiza Mohammed Majed Erheem Abdullah Abu Nada Nael Wael Skaik. Contents. Introduction. Problem.
E N D
Computer Architecture LabSecret DTMF Remote Control Supvised By : EngMohammed Timmraz Prepared By Mohammed Ibraheem El-kahlout HussainAbd-jaleell Shaalan Mohammed MamdouhAzaiza Mohammed MajedErheem Abdullah Abu Nada Nael Wael Skaik
Contents Introduction Problem Solution Idea Hardware Requirement Internal Design Source Code
Introduction • In Design Of System • We Used a C Programming Language. • Programmed Using Micro-C Studio. • We Develop a Simulation Using Protus 7.4
Problem • The Project Idea Comes that’s there are many machines that we need a continuous observe to turn it on or off as electrical generators , water pumps and many other machines.
Solution Idea • As One Of Available important Solutions , “Controlling Electrical and Electronically Devices over distance” • This will be applied by calling mobile device connected to Electronically Circuit that control devices connected to circuit . • Instruction will be send to circuit as numbers from the caller mobile to the mobile connected to circuit . • Determining which device will be on and which will be off depends on the instructions send from user.
4 LEDs Hardware Requirement Mt 887 Decoder HardwareRequirement 220 ohm Resistor Pic 16F688
Source Code • void interrupt(void); • intnum; • int temp[4]; • int i=0; • void EXE(); • void test(); • void main() { • CMCON=7; • TRISB=1; • TRISA=0X0F; • PORTB=0; • INTCON=0; • OPTION_REG=0X40; • INTCON=0X90; • LOOP: • asm{ • nop; • } • goto LOOP; • }
Source Code … Continued • void interrupt() • { • if(INTCON.INTF) • { • i++; • num=PORTA; • num=(num & 0X0E); • if(num==9) • i=0; • switch(i) • { • case(1):temp[1]=num;break; • case(2):temp[2]=num;break; • case(3):temp[3]=num;test();break; • case(4):EXE();break; • } • delay_ms(100); • INTCON=0X80; • } • }
Source Code … Continued void test() { if((temp[1]==3)&&(temp[2]==5)&&(temp[3]==7)) { PORTB.F5=1; } else i=0; return; }
Source Code … Continued • void EXE() • { • switch(num) • { • case(0):PORTB=0;PORTB.F5=1;i--;break; • case(1):PORTB=2;PORTB.F5=1;i--;break; • case(2):PORTB=4;PORTB.F5=1;i--;break; • case(3):PORTB=8;PORTB.F5=1;i--;break; • case(4):PORTB=0X10;PORTB.F5=1;i--;break; • case(5):PORTB=0X1F;PORTB.F5=1;i--; break; • case(9):PORTB=0;i=0;break; • default:PORTB=0;PORTB.F5=1;i--;break; • } • return; • }