| ??? 06/14/02 20:58 Read: times |
#24486 - RE: Philips 80C552 (80C51) Timer Question |
Hi Vaclav and Peter, thank you for your suggestion. Actually I have considered of using a divided by 4 chip to get the 50Hz signal. However, a frequency divider will always give me a 50% duty cycle which is something I don't like. In fact, the RC servo operates at about 5 to 12% duty cycle.
This is my code written in C. However, it doesn't works quite right. ********************************************* main() { main2() } org 0x8100 main2() { TMOD = 0x11 TL0 = 58 TH0 = 143 ET0 = 1 EA = 1 TL1 = 190 TH1 = 10 ET1 = 1 EA = 1 TR0 = 1 TR1 = 1 P1.0 = 0 Repeat goto Repeat } // Timer 0 overflow interrupt routine org 0x800B timint0vector() { TR0 = 0 TMOD = 0x11 TL0 = 58 TH0 = 143 ET0 = 1 TL1 = 190 TH1 = 10 ET1 = 1 EA = 1 TR0 = 1 TR1 = 1 P1.0 = 1 reti() } // Timer 1 overflow interrupt routine org 0x801B timint1vector() { P1.0 = 0 TR1 = 0 reti() } I don't know what's wrong :( Hey guys, thanks for you help again. Michael |
| Topic | Author | Date |
| Philips 80C552 (80C51) Timer Question | 01/01/70 00:00 | |
| RE: Philips 80C552 (80C51) Timer Question | 01/01/70 00:00 | |
| RE: Philips 80C552 (80C51) Timer Question | 01/01/70 00:00 | |
| RE: Philips 80C552 (80C51) Timer Question | 01/01/70 00:00 | |
| RE: Philips 80C552 (80C51) Timer Question | 01/01/70 00:00 | |
| RE: Philips 80C552 (80C51) Timer Questio | 01/01/70 00:00 | |
| RE: Philips 80C552 (80C51) Timer Question | 01/01/70 00:00 | |
| RE: Philips 80C552 (80C51) Timer Question | 01/01/70 00:00 | |
| RE: Philips 80C552 (80C51) Timer Question | 01/01/70 00:00 | |
RE: Philips 80C552 (80C51) Timer Question | 01/01/70 00:00 |



