??? 08/17/08 10:50 Read: times |
#157532 - Compare using software Responding to: ???'s previous message |
Can I implement compare function by comparing the timer register and any RAM register(compare value) in AT89C51 and set the period in another RAM register (to auto reload).
I found another code which is very simple but I am not sure whether it works or not. void Delay (long int sure) { long int j,q; for (j=1;j<=sure;j++) for(q=0;q<=10;++q){;} } main() { long int b; b=9; P0=0x00; P1=0x00; P2=0x00; P3=0x00; Delay(300); while(1){ P1=0x2A; Delay(b); P1=0x00; Delay(1); P1=0x0E; Delay(b); P1=0x00; Delay(1); P1=0x1C; Delay(b); P1=0x00; Delay(1); P1=0x15; Delay(b); P1=0x00; Delay(1); P1=0x31; Delay(b); P1=0x00; Delay(1); P1=0x23; Delay(b); P1=0x00; Delay(1); if (P0_0==1){b=3;} if (P0_1==1){b=4;} if (P0_2==1){b=5;} if (P0_3==1){b=6;} if (P0_4==1){b=7;} if (P0_5==1){b=8;} if (P0_6==1){b=9;} if (P0_7==1){b=10;} } } Another concern is how to control the starting current below 5A when the rated current is about 3.6A for induction motor.Can I increase the the frequency or decrease to limit current. |
Topic | Author | Date |
Drive IGBT using AT89C51 | 01/01/70 00:00 | |
good luck | 01/01/70 00:00 | |
Re: | 01/01/70 00:00 | |
IGBT short circuit protection | 01/01/70 00:00 | |
Timings | 01/01/70 00:00 | |
yes | 01/01/70 00:00 | |
3 phase output | 01/01/70 00:00 | |
RE:SPWM | 01/01/70 00:00 | |
get a device with CCU (capture compare unit) | 01/01/70 00:00 | |
or with a PCA | 01/01/70 00:00 | |
PCA 5% useful; CCU 95% useful | 01/01/70 00:00 | |
IGBT driver | 01/01/70 00:00 | |
IGBT | 01/01/70 00:00 | |
HEXFET or IGBT | 01/01/70 00:00 | |
Compare using software | 01/01/70 00:00 | |
Compare using software | 01/01/70 00:00 | |
code | 01/01/70 00:00 | |
Blowing MOSFETs | 01/01/70 00:00 | |
soft start design | 01/01/70 00:00 | |
Schematic![]() | 01/01/70 00:00 |