Timeline for Generate 1.7 Mhz with PWM in Uno?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 26, 2022 at 19:12 | comment | added | Edgar Bonet |
@Olivier'Ölbaum'Scherler: In this mode (Waveform Generation Mode 7) the register OCR2A is used to set the pulse period (via the "TOP" value). You cannot use the same register to set the pulse length. If you set the pulse length with OCR2B , then the PWM signal can only be output on pin OC2B.
|
|
Apr 26, 2022 at 13:18 | comment | added | Olivier 'Ölbaum' Scherler | That’s a great answer, thank you, and I could follow the process in the ATmega328P datasheet. However, I don’t understand why it’s not possible to output the frequency on the OC2A pin. Indeed, there seems to be the same mode for OC2A in table 17-3: Clear OC2A on compare match, set OC2A at BOTTOM, (non-inverting mode). I tried and it doesn’t work, as you said, but I can’t find the part of the docs that say why. | |
Oct 16, 2020 at 14:10 | comment | added | ocrdu | Ditto for SAMD21-based Arduinos; a built-in PLL lets you run a timer at 96MHz. | |
Apr 28, 2017 at 10:52 | history | edited | Edgar Bonet | CC BY-SA 3.0 |
F_CPU / 1
|
Apr 28, 2017 at 10:15 | history | answered | Edgar Bonet | CC BY-SA 3.0 |