
Originally Posted by
Darrel Taylor
Utilization is less than 3% of total.
The limiting factor is the Least Significant Bit in the dutycycle. It's so short that it doesn't give much time to do anything. The mirror image helped some, because I was able to combine the LSB of both halves of the mirror, for a longer period, but it's still only 68 instructions (worst case).
It has to get into the interrupt handler, save context, reload the Timer, service all the LEDs dutycycles, keep track of the bit sequencing, restore context and exit the interrupt within those 68 instructions.
Each PIN uses 6 instructions, and the rest of the handler uses about 40.
So @ 4 mhz you can only get 4 LED's (40 + 24 = 64).
Refresh rate @ 4mhz = 80 hz with 4 LEDs.
With higher OSC freqs, refresh rates can be as high as 650hz, depends on how many LEDs there are.
The rate can be set lower with a DEFINE if needed.
Warnings from the assembler will indicate if your setup is out of range.
<br>
Bookmarks