Untangling Timer 4 on the ATmega32U4

Here are some ATtiny’s with similar timers.

Now, there are plenty of cheaper Arm Cortex-M..-based microcontrollers with even higher PWM clock speeds and Arduino support (and are cheaper), but I looked at the timer control registers and nearly choked.

I also looked at Raspberry Pi’s RP2040, and even contacted the organisation, but it has no dead-band generator for power supply use and, I was told, the PIO processors cannot fulfil that function. Its PWM do have a phase-sift facility which looks promising, but again… choke.

The other thing is, I happen to have an Arduino Micro on the desk next to me (and a Pro Micro, but it omits an important PWM pin: /OC4A or /OC4D).

So I have been looking through the data sheet, but seem to be running into treacle here too – maybe I should revisit those Cortex-M..s.

I have just found a University of Pennsylvania website which at least bundles the registers up to view differently.

Just in case you are interested, it is here.

Read more here: Source link