136
7734Q–AVR–02/12
AT90PWM81/161
12.25.4
OCRnSBH and OCRnSBL - Output Compare SB Register
12.25.5
OCRnRBH and OCRnRBL - Output Compare RB Register
Note: n = 0 to 2 according to PSC number.
The Output Compare Registers RA, RB, SA and SB contain a 12-bit value that is continuously
compared with the PSC counter value. A match can be used to generate an Output Compare
interrupt, or to generate a waveform output on the associated pin.
The Output Compare Registers RB contains also a 4-bit value that is used for the flank width
modulation.
The Output Compare Registers are 16-bit and 12-bit in size. To ensure that both the high and
low bytes are written simultaneously when the CPU writes to these registers, the access is per-
formed using an 8-bit temporary high byte register (TEMP). This temporary register is shared by
all the other 16-bit registers.
12.25.6
PCNF2 - PSC 2 Configuration Register
The PSC n Configuration Register is used to configure the running mode of the PSC.
Bit 7 - PFIFTYn: PSC n Fifty
Writing this bit to one, set the PSC in a fifty percent mode where only OCRnRBH/L and OCRn-
SBH/L are used. They are duplicated in OCRnRAH/L and OCRnSAH/L during the update of
OCRnRBH/L. This feature is useful to perform fifty percent waveforms.
Bit 6 - PALOCKn: PSC n Autolock
When this bit is set, the Output Compare Registers RA, SA, SB, the Output Matrix POM2 and
the PSC Output Configuration PSOCn can be written without disturbing the PSC cycles. The
update of the PSC internal registers will be done at the end of the PSC cycle if the Output Com-
pare Register RB has been the last written.
When set, this bit prevails over LOCK (bit 5).
Bit
76543210
––––OCRnSB[11:8]
OCRnSBH
OCRnSB[7:0]
OCRnSBL
Read/Write
WWWWWWWW
Initial Value
00000000
Bit
76543210
OCRnRB[15:12]
OCRnRB[11:8]
OCRnRBH
OCRnRB[7:0]
OCRnRBL
Read/Write
WWWWWWWW
Initial Value
00000000
Bit
7
6
5
4
3210
PFIFTY2
PALOCK2
PLOCK2
PMODE21 PMODE20 POP2
PCLKSEL2 POME2
PCNF2
Read/Write
R/W
Initial Value
0
0000