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 / Topics / doubt

doubt

|

Microcontroller › 8051 › doubt

  • This topic has 0 replies, 1 voice, and was last updated 12 years, 11 months ago by saavanan.
Viewing 1 post (of 1 total)
  • Author
    Posts
  • September 3, 2013 at 4:14 am #2618
    saavanan
    Participant
    guys please help me.i want proteses simulation for this code
     
     
     
    #include <REGX51.H>
    sbit LED1=P1^0;
    sbit LED2=P1^1;
    sbit LED3=P1^2;
    sbit LED4=P1^3;
    void call_blink(unsigned char dat);
    void delay(void);
    void main()
    {
    TMOD=0x05;
    TH0=0xff;   //for 12MHz   (12/12MHZ)=1u>per cycle operation
    TL0=0xf0;
    TR0=1;
    while(TF0==0)
    {  
    call_blink(TL0&0x0f);
    } 
    if(TF0==1)
    {
    TF0=0;
    call_blink(0xff);
    }
    }
    void call_blink(unsigned char dat)
    {
    if(dat==0xff)
    {
    while(1)
    {
    LED1=0;delay();
    LED1=1;delay();
    }
    }
    if(dat==0x01)
    LED2=0;
    if(dat==0x04)
    LED3=0;
    if(dat==0x08)
    LED4=0;
    }
    /******************delay**********************/
    void delay(void)
    {
    unsigned char i;
    for(i=0;i<255;i++)
    {
    for(i=0;i<255;i++);
    }
    }
     
  • Author
    Posts
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 Arrowfly 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 Arrowfly
Privacy Policy | Advertising

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