??? 04/16/04 16:10 Read: times |
#68635 - RE: 8051 and for led Responding to: ???'s previous message |
I dont have a scop at home.
about the timer I copied the wrong code this is what I downloaded to the controller #include <reg52x2.h> void timer(void){ int t; t=0; 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; } } } |
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 |