| ??? 04/27/03 20:43 Read: times |
#44378 - Dinamic time delay |
Hello! I was writing some time delay routines for a colleague but they are "hardwired", I mean, if I write a code for a 12MHz clock (e.g. a 5ms delay), the same code would generate a twice larger delay in a 6MHz clock (or 10ms if the same code form the example).
I was thinking in some way to detect the running clock and use the detected value to feed delay routines that would self-adjust for each different clock. Is possible or am I delirious? TIA orlando |



