| ??? 06/21/03 17:08 Read: times |
#48996 - RE: WDT bigger timeout Responding to: ???'s previous message |
Peter:
I would suggest that putting the endless loop for timeouts in the interrupt service routine does not seem to me to be the best design practice. What I will almost always do is have timers which the mainline code sets as as necessary to some count. The interrupt routine's job is simply to decrement any timer that is not already at zero. Then the mainline executive code can poll the timers for a zero/non zero value. If zero the mainline knows that the time period has expired some time since te last poll. I have used timer interrupt rates of various resolution for this but often a 100 Hz rate gives a nice 10 msec resolution. An unsigned byte counter can thus support delays out to 2.5 seconds. If I need longer delays I either put a prescaler divider in the interrupt to provide some support for 100 msec timers or even 1 sec timers. Alternatively I will use 16 bit timer registers and count them down to zero. (Remember when testing a 16-bit timer value for zero in the mainline it is necessary to disable interrupts around the test since the 8051 cannot access a 16 bit quantity for a test as an atomic entity. Michael Karas |
| Topic | Author | Date |
| WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: WDT bigger timeout | 01/01/70 00:00 | |
RE: WDT bigger timeout | 01/01/70 00:00 | |
| RE: why no 555 | 01/01/70 00:00 |



