??? 04/16/04 13:34 Read: times |
#68613 - 8051 and for led |
Hi. I connect 4 leds to 8051 and I want to light one led at a time. and if I get a high in p1.4 I want to light all the leds.
when I turn the circuit on the it dosent work. this is the C code while(t!=100){ t=t+1; TF0 = 0; TH0 = 0x00; TL0 = 0x00; TR0 = 1;/*turn timer on*/ while (!TF0); TR0 = 0; } } void main (){ while(1){ if (P1_4==0){ P3=0; timer(); P3=0; P3_2=1; timer(); P3=0; P3_3=1; timer(); P3=0; P3_4=1; timer(); P3=0; P3_5=1; } if (P1_4==1){ P3=0xff; } } } Help!!! |
Topic | Author | Date |
8051 and for led | 01/01/70 00:00 | |
RE: 8051 and for led | 01/01/70 00:00 | |
RE: 8051 and for led | 01/01/70 00:00 | |
RE: 8051 and for led | 01/01/70 00:00 | |
RE: 8051 and for led | 01/01/70 00:00 | |
RE: 8051 and for led | 01/01/70 00:00 | |
RE: 8051 and for led | 01/01/70 00:00 | |
RE: 8051 and for led | 01/01/70 00:00 | |
RE: 8051 and for led | 01/01/70 00:00 | |
on more thing | 01/01/70 00:00 | |
RE: 8051 and for led | 01/01/70 00:00 | |
RE: 8051 and for led | 01/01/70 00:00 | |
RE: 8051 and for led![]() | 01/01/70 00:00 |