C51 COMPILER V8.12   DTMF_CONTROLLED                                                       08/17/2013 10:45:04 PAGE 1   


C51 COMPILER V8.12, COMPILATION OF MODULE DTMF_CONTROLLED
OBJECT MODULE PLACED IN dtmf_controlled.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE dtmf_controlled.c BROWSE DEBUG OBJECTEXTEND

line level    source

   1          // Project name : DTMF Controlled Robot
   2          // Designed By  : ROBOMART
   3          //                http://www.robomart.com
   4          
   5          /* Program for "Mobile Controlled Robot" 
   6          ___________________________________________________
   7          
   8          Connection settings of Kit
   9          
  10          DTMF---@------------->P0.0, P0.1, P0.2, P0.3
  11          
  12          RIGHT MOTOR(+)------->P2.0
  13          RIGHT MOTOR(-)------->P2.1
  14          LEFT MOTOR(-)-------->P2.2
  15          LEFT MOTOR(+)-------->P2.3
  16          
  17          RESET-------------------------->PIN9
  18          Crystal Ossilator-------------->PIN18 and PIN19
  19          VCC=Regulated 5V
  20          Gnd=Ground(0V)
  21          */
  22          
  23          
  24          #include<reg52.h>
  25          sbit dtmf1 = P0^0;   
  26          sbit dtmf2 = P0^1;
  27          sbit dtmf3 = P0^2;
  28          sbit dtmf4 = P0^3;
  29          
  30          void main(void)
  31          {
  32   1      dtmf1=1;                   //make this pin as input port.
  33   1      dtmf2=1;                   //make this pin as input port.
  34   1      dtmf3=1;                   //make this pin as input port.
  35   1      dtmf4=1;                   //make this pin as input port.
  36   1      P2=0x00;           // make port2 as output port.
  37   1      while(1)
  38   1      {
  39   2      if((dtmf2==1)&(dtmf1==0)&(dtmf3==0)&(dtmf4==0))    // if 2 key of your mobile keypad is pressed
  40   2      P2=0x09;  //forward     movement
  41   2      if((dtmf4==1)&(dtmf1==0)&(dtmf2==0)&(dtmf3==0))    // if 8 key of your mobile keypad is pressed
  42   2      P2=0x06;   //back movement
  43   2      if((dtmf4==0)&(dtmf1==0)&(dtmf2==0)&(dtmf3==1))    // if 4 key of your mobile keypad is pressed
  44   2      P2=0x01;  // left movement
  45   2      if((dtmf4==0)&(dtmf1==0)&(dtmf2==1)&(dtmf3==1))    // if 6 key of your mobile keypad is pressed
  46   2      P2=0x08;  //right movement
  47   2      if((dtmf4==0)&(dtmf1==1)&(dtmf2==0)&(dtmf3==1))    // if 5 key of your mobile keypad is pressed
  48   2      P2=0x00;  //stop movement
  49   2      
  50   2       }
  51   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    262    ----
C51 COMPILER V8.12   DTMF_CONTROLLED                                                       08/17/2013 10:45:04 PAGE 2   

   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)
