Darrels documentation saysIn order to increase the resolution to 10 bits the LSB would need to be 1/4 of its current length meaning you'd need the PIC to run at 192MHz. Or you'd need to reduce the cycle time by 4. The documentaion doesn't say what the cycle time is but I imagine it's not excessive so reducing by a factor of 4 would likely result in flicker ( [speculating mode on] ).The number of LED's you can use is limited by the OSC frequency. It's not that the module uses so much processor time that it needs more speed.The limitation is the LSB (Least Significant Bit) of the DutyCycle, which is so short that it doesn't leave much time to do a whole lot of code.
@ 4Mhz, you can only run 4 LEDs MAX. This can be useful for RGB LED's on small chips.
@ 20Mhz, you can run 20 LEDs since there are more instructions available per period.
@ 48Mhz, you can run 48 LEDs, and anywhere in-between you can have the equivelant number of LEDs to match the OSC frequency.
Here's an idea that may or may not fly: Use a PIC with a couple of CCP or PWM modules and PPS. "Scan" the CCP/PWM module outputs across the I/O-pins, changing the duty cycle accordingly creating a multiplexed PWM scheme.
Bookmarks