Board: ItsyBitsy M4
I have an application requiring two pins to be doing synchronous PWM. The duty cycle is the same for both pins but the pulses are equally spaced and complementary. At 100% duty cycle the two pins would have square waves 180° out of phase. I need to be able to vary the frequency and/or pulse width. Clearly the TCC for the ATSAMD51 can do this but I don't see the capability in the pwmio library.
Has anyone done this and, if so, how can it be done in CircuitPython?
Thanks in advance.
Synchronous PWM on two pins
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- mikeysklar
- Posts: 13936
- Joined: Mon Aug 01, 2016 8:10 pm
Re: Synchronous PWM on two pins
The TCC/TC are auto-configured with circuitpython and pwmio. You can build your own CircuitPython to customize them, but even within that there have been reports of initialization order being complicated.
This seems like a good issue to bring up with the CircuitPython github repo as it is a reasonable feature to support in the future.
This seems like a good issue to bring up with the CircuitPython github repo as it is a reasonable feature to support in the future.
Please be positive and constructive with your questions and comments.