Things used in this project

Hardware components:
Atmel AT89S52
×1
Ble
Bluetooth Low Energy Module for Tessel
×1
Hand tools and fabrication machines:
A4kb1xynkid5ebvjyil7
Digilent Screwdriver

Schematics

img_43001_IlUP2r2JTc.JPG
Img 43001 ilup2r2jtc

Code

C.CODE.txtC/C++
C51 COMPILER V9.50a   AUTOMATE                                                             09/15/2017 10:38:01 PAGE 1   


C51 COMPILER V9.50a, COMPILATION OF MODULE AUTOMATE
OBJECT MODULE PLACED IN .\automate.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\automate.c BROWSE DEBUG OBJECTEXTEND TABS(2) OBJECT(.\automate.obj)

line level    source

   1          #include<reg52.h>
   2          #include<stdio.h>
   3          sbit b= P0^0;
   4          sbit c = P0^1;
   5          
   6          unsigned  int x;
   7          void receive()
   8          {
   9   1      TMOD = 0x20; //timer 1 auto
  10   1      TH1=0xFD;
  11   1      SCON=0x50;
  12   1      TR1=1;
  13   1      while(RI==0);
  14   1      x=SBUF;
  15   1      RI=0;
  16   1      }
  17          void main()
  18          {
  19   1      P0=0x00;
  20   1      while(1)
  21   1      {
  22   2      receive();
  23   2      if(x=='a')
  24   2      b=1;
  25   2      if(x=='b')
  26   2      b=0;
  27   2      if(x=='c')
  28   2      c=1;
  29   2      if(x=='d')
  30   2      c=0;
  31   2      }
  32   1      }


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =     72    ----
   CONSTANT SIZE    =   ----    ----
   XDATA SIZE       =   ----    ----
   PDATA SIZE       =   ----    ----
   DATA SIZE        =      2    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.

Credits

22528369 843351882491866 3317672870973266149 n
Pavan Kumar
0 projects • 0 followers
Contact

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Add projectSign up / Login