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 / u can generate the 1sec delay

u can generate the 1sec delay

|

Microcontroller › 8051 › Generate delay › u can generate the 1sec delay

April 23, 2013 at 5:14 am #9571
alekhya
Participant

u can generate the 1sec delay like this….check this i think so itz helpful to u

 

 

 

#include<REG51.H>
sbit led1 = P1^1;
sbit led2 = P1^2;
sbit led3 = P1^3;
void delay (unsigned int k);
void main()
{
led1 = 1;
led2 = 0;
led3 = 0;
delay(1s);
led1 = 0;
led2 = 1;
led3 = 1;
delay(1s);
}
void delay(unsigned int k)
{
unsigned int i,j;
for(i=0;i<k;i++)
for(j=0;j<100;j++);
}

RSS Recent Posts

  • EasyEda program has a major bug April 12, 2026
  • understanding transmission line properties from TDR plot April 12, 2026
  • isolating S-params in of PCB board without connectors April 12, 2026
  • Some opamp advice please April 12, 2026
  • want help with microprocessor April 11, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 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