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 / sir,i want a proteses

sir,i want a proteses

|

Microcontroller › 8051 › counter › sir,i want a proteses

September 3, 2013 at 4:07 am #10413
saavanan
Participant
sir,i want a 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++);
}
}

 

 

RSS Recent Posts

  • Getting into an LED bulb April 21, 2026
  • understanding of resonance in time domain April 21, 2026
  • Beginner Questions About CNC Machines – G-code, Control Systems & Accuracy April 21, 2026
  • A Must-Watch Video Showing Dangerous Construction of Cheap Lithium-Ion Cells April 21, 2026
  • S1MJ ? April 20, 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