??? 03/30/06 10:40 Read: times |
#113392 - LED Blinking problem |
Dear All,
I am fascing a problem regarding LED blinking. What i want to do: ------------------ I just want to blink a LED fitted in Port P1.0(ie. 0th pin of P1). My diagram: ----------- I fitted the LED with a resistor (as a current limitter) with the Microcontrller AT89C52. The MC is given all the necessery connection(like VCC,GND,Xtl, RC Reset etc.) Compiler: --------- Keil c51(Eval) Program used: ------------- #include<stdio.h> #include<regx52.h> #include<stdlib.h> void delay(void); // delay genareting function void main(void) { while(1) // for infinite loop { P1=0x01; //set pin P1.0=1, LED will not glow for some time delay(); // function to remain in not glow condition P1=0x00; //set pin P1.0=0, LED will glow for some time delay(); // again remain in glow cond. } } void delay() { int i; for(i=0;i<900;i++) ; } Problem: -------- The LED is not blinking at all. Rather it is in always glow state. Pls. can any body help me regarding this problem. Thanx in advance. Kaushik. |
Topic | Author | Date |
LED Blinking problem | 01/01/70 00:00 | |
WHERE | 01/01/70 00:00 | |
Re: WHERE | 01/01/70 00:00 | |
Search | 01/01/70 00:00 | |
scope it. | 01/01/70 00:00 | |
how delay calculated ? | 01/01/70 00:00 | |
eagle eyes | 01/01/70 00:00 | |
off axis ? | 01/01/70 00:00 | |
well | 01/01/70 00:00 | |
foveal | 01/01/70 00:00 | |
Off-Axis (Off-topic) | 01/01/70 00:00 | |
Precisely | 01/01/70 00:00 | |
Flicker![]() | 01/01/70 00:00 | |
Optimization problem? | 01/01/70 00:00 | |
Slow the blinking | 01/01/70 00:00 | |
Regarding the slow blinking | 01/01/70 00:00 | |
Delay too short | 01/01/70 00:00 | |
Led blinking | 01/01/70 00:00 | |
LED BLINKING PROBLEM IS OVER | 01/01/70 00:00 |