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

  • need help in photodetection TIA circuit November 18, 2025
  • Need to solder a really delicate ribbon for an electric reel need advice November 18, 2025
  • Help please! BLDC driver circuit using the IR2136s and the STP80NF06 MOSFETS November 18, 2025
  • Measuring controller current output with a meter November 18, 2025
  • Anyone In The US Ordered From AliExpress Recently? November 17, 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