www.piclist.com/techref/microchip/time.htm?key=time

On Tue, 3 Sep 2002, Dave Tweed wrote:

{Quote hidden}

Maybe, maybe not. 14-instructions is limited, but there are tricks! For

example, you don't have to compute every thing in the 14 cycles. It's

possible to distribute processing across many 14-cycle slots. I assume

that a minimum 16-bit arithmetic will be required. 6-cycles will be

required for the phase accumulator and addition 2 (or three) for examining

roll overs. 2 more cycles are required for looping. This leaves only

3-cycles! However, if you unroll the loop then the 2-cycle loop overhead

can occur once for every, say, 32 accumulation intervals. This give

roughly 5-cycles per accumulation interval for doing other stuff.

Here's an extreme example of only 1-cycle available per iteration:

www.piclist.com/techref/microchip/pulsewidth-sd.htm

(it's pulse width measurement and not a pulse generator, but the same

conceptual programming approach is applicable.)

Scott

--

http://www.piclist.com hint: To leave the PICList

spamBeGonepiclist-unsubscribe-requestspammitvma.mit.edu

In reply to: <E17mJou-0001Zj-00@pintail.mail.pas.earthlink.net>

See also: www.piclist.com/techref/microchip/time.htm?key=time