Question.7
The given code is used to generate a PWM signal of 200Hz. What will be the duty cycle of the PWM signal generated on Pin 3 after the execution of the following code in Arduino UNO?
Code
#define OUTPUT_PIN 3
void setup() {
pinMode(OUTPUT_PIN, OUTPUT);
// Configure Timer2 for Fast PWM, Inverting Mode, with 1024 prescaler
TCCR2A = (1 << WGM21) | (1 << WGM20) | (1 << COM2B1) | (1 << COM2B0);
TCCR2B = (1 << WGM22) | (1 << CS22) | (1 << CS21) | (1 << CS20);
OCR2A = 77;
OCR2B = 19;
}
void loop() {
}