Quantcast
Channel: Microcontrollers
Viewing all articles
Browse latest Browse all 4923

Why LED is not turning OFF - 8051 Timers

$
0
0
Hi
I want to ON/OFF LED for 500 ms. I have written a program that suppose to ON/OFF LED for 500 ms

Environment : AT89C51, Keil,

C:
#include<reg51.h>

sbit LED   = P2^0;    /*LED connected at output Pin P2.0 */

#define LED_ON   1     // LED Turn ON
#define LED_OFF  0     // LED Trn OFF

/* Function to generate Delay*/
void Delay(DelayTime)
{
    unsigned int count;
    
    for ( count = 0; count < DelayTime; count)

       {
            
             }             
}

int main ()
{...
Why LED is not turning OFF - 8051 Timers

Viewing all articles
Browse latest Browse all 4923

Trending Articles