| ??? 01/24/03 19:01 Read: times |
#37148 - Simple LED Test Program |
Hi All
I'm a beginer and has construct a minimum microcontroller based on AT89C55WD with pull up LED connect to P1.2. The program below supposed to toggle the LED but the LED seems to be not blinking. I've check the P1.2 signal with scope and the signal does go from 5V to 0V (toggle) but not the LED(STAYS ON) . Please comment. #include <at89c55wd.h> char unsigned counter = 0, void timerisr(void) interrupt 1 { TF0 = 0; // clear overflow flag counter++; if (counter == 255); { P12 = !P12; counter = 0; } } void init(void) { TMOD = 0x02; // 8-bit auto reload timer ET0 = 1; // enable timer interrupt EA = 1; // global interrupt enable TR0 = 1; // run timer } void main(void) { init(); while(1); } Thanks Parif |
| Topic | Author | Date |
| Simple LED Test Program | 01/01/70 00:00 | |
| RE: Simple LED Test Program | 01/01/70 00:00 | |
| RE: Simple LED Test Program | 01/01/70 00:00 | |
| RE: Simple LED Test Program | 01/01/70 00:00 | |
| RE: Simple LED Test Program | 01/01/70 00:00 | |
| RE: Simple LED Test Program | 01/01/70 00:00 | |
| RE: Simple LED Test Program | 01/01/70 00:00 | |
| RE: Simple LED Test Program - Success | 01/01/70 00:00 | |
| RE: Simple LED Test Program - Success | 01/01/70 00:00 | |
| RE: Simple LED Test Program - Success | 01/01/70 00:00 | |
| RE: Simple LED Test Program - Success | 01/01/70 00:00 | |
| RE: Simple LED Test Program - Success | 01/01/70 00:00 | |
| RE: Simple LED Test Program - Success- | 01/01/70 00:00 | |
| RE: Simple LED Test Program | 01/01/70 00:00 | |
RE: Simple LED Test Program | 01/01/70 00:00 |



