I need 32 bit pwm...
I imagine there should be a simple IC for this.. like spi in, pwm out.. can anyone recommend one?
perhaps there is a way to do it with timers and interrupts on Arduino.. i think i heard mention of chaining 2 16bit timers once.. anyone have knowledge of this stuff?
before you get all "you cant possibly need that" or "arduino cant reach those frequencies"
Im controlling an AC servo, "virtual gearing" gives it super high resolution.. meaning i need to send it like 100s of khz, closer to 1mhz, pwm to get close to top speed (super quiet and smooth this way)
I am using my own code at present, and it works, but when i get to lower end of the resolution (from duty cycle of 10 to 9) the speed increments are larger and larger.. so accelerations and deceleration is bumpy to say the least.
basically i don't need a duty cycle in the nanoseconds(gigahertz), but i do want a duty-cycle with resolution of at bare minimum100ns( 0.1mhz).. preferably more like 10ns or even smaller
in short my current custom code (resolution of like 1us or so) still needs to be able to step from 9us to 9.9us or 9.99us duty cycle.. not just jump straight to 10us.. i want smooth acceleration
bare in mind this mcu also needs to listen to its serial hardware and receive commands... so any chaining 2 16bit timer solution might not be feasible as there is is plenty of other functionallity running concurrently.. so im thinking an external dedicated pwm IC is my best option.. just having trouble finding any ICs
at present I'm considering using an rp2040 with isolating level shifters, one core listens on spi for incoming settings from arduino, one core uses software to flip-flop the pwm to the servo... but there has got to be a cheaper easier simple IC solution.. right?.... right??
help much appreciated.
P.S. yes I know my AC servo controller probably has speed settings in the docs.. but i have plenty of external sensors,, and I do this kind of project frequently now.. I really want to control all the stepping manually...
and I don't want to decrease the controller "micro stepping" resolution.. Iove this smooth quiet high resolution