> I thought that there would be a rule-of-thumb to calculate > these things Not that I'm aware of, but maybe you could deduce a formula from my chart. It's reasonably straight-line. Not that I bothered, sorry. Didn't need to. There is some variance between different PICs (both individually and families), as you'll see from the loose specs in the data sheet (ISTR 7% ?) and tolerances of caps and resistors plus temperature fluctuations. If you need a 100ms delay, work out how many instruction cycles to do that, that is both in the internal 00-FF loop and the external counter incrementation So a basic loop takes 1 + 256 +1 + (256 * 2) = 770 cycles (did I get that right ? Been a very very busy day) clrf count1 (1) loop incfsz count1,f (1) or (2) goto loop (2) At 4MHz this would take 770us. Bump another counter 128 times (just test its bit7) to give you the 100ms, give or take the "incf" and "goto loop" and test for the second counter byte, which will be a small fraction of the overall time But you still need, I think, to set up a timer IRQ routine as I suggested to actually measure the frequency if you have no scope or freq counter -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu