I would enable the OC4B (Timer4 PWM) on the PD2 (Pin 2) on the ATMega 328PB
The default timer is the OC3B .
How change this alternate pin function ?
I would enable the OC4B (Timer4 PWM) on the PD2 (Pin 2) on the ATMega 328PB
The default timer is the OC3B .
How change this alternate pin function ?
What is the 328PB board package do you use?
In this package the default is OC4B:
It is not an alternate pin function. TIMER3 and TIMER4 share 1 output pin. Both OC3B and OC4B share PD2. See Section 22 in the Atmega328PB datasheet about the "Output Compare Modulator" (OCM). By activating both OC3B and OC4B at the same time, you will activate the OCM and be able to generate a modulated PWM signal on top of a carrier frequency.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.