EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Replies / #include sbit

#include sbit

|

Microcontroller › 8051 › 8051 based problem › #include sbit

December 25, 2013 at 6:26 am #10757
balaji
Participant
#include<reg51.h>
 
sbit sw=P1^0;
//unsigned char *call_cmd =”ATD9843927672;”;
 
unsigned char b[]={‘A’,’T’,’D’,’8′,’8′,’4′,’3′,’9′,’2′,’7′,’6′,’7′,’2′,};
unsigned char i;
void delay(unsigned char z)
{
 unsigned int i,j;
 for(i=0;i<z;i++)
 for(j=0;j<1275;j++);
 }
 void trans(unsigned val)
 {
  SBUF=val;
 
  while(TI==0);
  TI=0;
 
  }
 
 
 
 void main()
 {
P1=0xff;
 
  SCON=0X52;
  TMOD=0X20;
  TH1=0XFD;
  TR1=1;
  TI=1;
  sw=0;
  while(1)
  {
   if(sw==0)
   {
     for(i=0;i<14;i++)
        {
       trans(b);
  delay(50);
   }
}
  
   }
  }

RSS Recent Posts

  • Siemens large industrial PLC parts June 15, 2025
  • Parts required for a personal project June 15, 2025
  • Cant log in to Easy PC forum June 15, 2025
  • Failure of polypropylene motor-run capacitors June 15, 2025
  • Wideband matching an electrically short bowtie antenna; 50 ohm, 434 MHz June 15, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise