??? 12/01/09 02:34 Read: times |
#171334 - 8052 Timer precision |
Hi, I am trying to do something every 64 uS.
I am using a 12-clocker with a 24MHz crystal, and I set Timer0 in 8 bit auto-reload mode and use 128d as reload value. The problem is that according to keil uvision debugger and proteus simulator, the ISR executes sometimes every 64.5 uS and some other times every 64 uS. I think it depends of how many cycles the ISR uses. This is my code: org 0 jmp main org 0xB cpl P1.0 nop ;If I remove this nop then interrupt happens every 64.5uS, otherwise 64uS reti org 30h main: mov tmod, #2 mov th0, #128d setb tr0 setb ea setb et0 jmp $ end Is it some bug in the simulators, or is it a feature of the 8052 timers I am not aware of? How can I avoid it? Thanks for your help, Gonzalo Ávila |
Topic | Author | Date |
8052 Timer precision | 01/01/70 00:00 | |
Jitter | 01/01/70 00:00 | |
The IRQ is stable. The Latency is variable | 01/01/70 00:00 | |
sleep | 01/01/70 00:00 | |
idle mode![]() | 01/01/70 00:00 |