Skip to content

Maybe use TC4 for millis() on 328PB? #375

@WestfW

Description

@WestfW

I wanted to note that it's probably possible to use TC4 for the millisecond interrupt on the ATmega328PB, and "trivially" achieve an exact 1ms clock tick by interrupting on compare to an appropriate value, rather than overflow.
TC4 on a 328PB is otherwise of somewhat limited use in the Arduino context, since for PWM OC4B appears on the same pins as OC3B, and OC4A appears on PD1 (which is essentially reserved for Serial TX0 use.)

This would mean having special case code for the 328pb in wiring.c and wiring_analog.c :-(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions