Hello.
Currently this "library" or whatever it is correctly called, has resolution of 8 bits, which can be somewhat limiting.
Is there a chance to "increase" resolution to 9 or 10 bits, or it has to be re-written completely?
Hello.
Currently this "library" or whatever it is correctly called, has resolution of 8 bits, which can be somewhat limiting.
Is there a chance to "increase" resolution to 9 or 10 bits, or it has to be re-written completely?
It hsa to be done from scratch. Though I doubt it can be a general include file for any PIC chip.
Better use a chip with higher PWM resolution.
Ioannis
Unfortunately, there are no PIC chips with like 8-16-32 independent PWM outputs.
Sure, there are chips like LT8500, with 48 channel PWM output, but they're way too expensive...
More channels is totally a different thing from resolution as you stated on post 1...
Maybe you can do that in assembly. A bit difficult though.
Ioannis
I'm using MIBAM because with 64mhz PIC18 CPU, I can have 48 independent PWM channels. But they're 8 bit. I want 48 channels with 9 or 10 bits resolution (12 - preferable)![]()
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