Output Compare Register

Abstract

The output compare registers are registers to set the duty ratio for PWM output.

Source Code

The output compare registers are defined in hardware/tools/avr/avr/include/avr/iom328p.h as below.

1
2
3
4
5
6
#define OCR0A _SFR_IO8(0x27)
#define OCR0B _SFR_IO8(0x28)
#define OCR1A _SFR_MEM16(0x88)
#define OCR1B _SFR_MEM16(0x8A)
#define OCR2A _SFR_MEM8(0xB3)
#define OCR2B _SFR_MEM8(0xB4)

They call _SFR_IO8(), _SFR_MEM16() and _SFR_MEM8().

Version

7.3.0-atmel3.6.1-arduino7

Last Update

May 15, 2021

inserted by FC2 system