Open cinderblock opened 11 months ago
Hey, this could be a nice addition, would you be interested to do a PR for this?
Yes, I'm interested. But I won't have time to look much at this for the next 2, maybe 6+ weeks! (Moving offices, Burning Man, traveling to a wedding) So if anyone else wants to get started, be my guest!
To be sure, would this (new) code live in this repo or in the drivers repo?
From my point of view it would be one of the PWM drivers in the main repository, or a modification to one of the existing AVR drivers…
Yep, I agree. This would go the the main library inside the file atmega32u4_mcu.cpp
.
I am going to try to provide you with a starting point @cinderblock, maybe even implement it completely, if I manage to get the time. Otherwise, don't hesitate to contact us when you start implementing it if you need some assistance.
I'd like to use some existing ATmega32u4 based driver boards. Theses are wired up to the 6-channel PWM output that is unique to the ATmega32u4's
10-bit High Speed Timer/Counter4
.Looking at the sources in
atmega32u4_mcu.cpp
, it's clear that the code is only set up for a couple dedicated pins that don't fully overlap with the Timer 4 hardware outputs.I realize this is an older IC but is there any interest in supporting this mode?
My very old implementation: https://github.com/cinderblock/3-Phase-Controller/blob/master/src/ThreePhase/Driver.cpp
PS, great to meet you at OpenSauce!