I have a project in which I need to control a small 3 phase motor with something like an Uno, and I from the research I've done I understand that I probably need something like a L6234 to drive the coils. However, here the current to the three phases is controlled by PWM, and I understand that PWM output is 8 bit on the Arduino (16 bits for one pin?) and I need finer control. Is there a straight-forward way that I can write to 3 pins with 16-bit PWM signal? Ideally I would have some room left over to read from an encoder for feedback.
I thought about using a 16-bit DAC as an intermediary (like AD5667), but each of these would eat up 3 pins, and the moreover, this just controls the voltage, not the current. Digital electronics is obviously not my strong point, so please excuse my ignorance. Any suggestions as to how to approach this would be appreciated.
Further reading suggests that I can try to bit bang 3 pins with DigitalWrite, though this would pretty much lock up the controller making it unavailable for feedback loop stuff.
It also seems to be suggested that I use something like a 12-channel 16-bit PWM LED driver, and talk to it over SPI.
Finally, the atmega32u4 seems to have 3 channel 16-bit PWM, though I can't confirm that right now. Here's an answer from SE purporting to have 3 channel 16-bit PWM using register manipulation. This seems to be the most sane option right now.