??? 06/16/09 15:28 Read: times |
#166145 - Ok. I was being naughty. Responding to: ???'s previous message |
My point was really that a newcomer would find a one line invocation of a "library" function simpler. The only pre-condition is that the F_CPU is known.
Yes of course you can stop and start dedicated timers, have a single "system" clock or any number of methods. However since you have a limited # of timers on an 8051 you would need to restore the timer state after you have finished. Or alternatively document the side-effects very carefully. The newcomer would find this worrying. Handling the timer state transparently would involve extra coding. Which is probably the reason for 8051 compilers not having a <delay.h> header. David. |