EasyManuals Logo

Atmel AVR AT90CAN32 User Manual

Atmel AVR AT90CAN32
428 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #136 background imageLoading...
Page #136 background image
136
7679H–CAN–08/08
AT90CAN32/64/128
Bit 7:6 – COMnA1:0: Compare Output Mode for Channel A
Bit 5:4 – COMnB1:0: Compare Output Mode for Channel B
Bit 3:2 – COMnC1:0: Compare Output Mode for Channel C
The COMnA1:0, COMnB1:0 and COMnC1:0 control the Output Compare pins (OCnA, OCnB
and OCnC respectively) behavior. If one or both of the COMnA1:0 bits are written to one, the
OCnA output overrides the normal port functionality of the I/O pin it is connected to. If one or
both of the COMnB1:0 bit are written to one, the OCnB output overrides the normal port func-
tionality of the I/O pin it is connected to. If one or both of the COMnC1:0 bit are written to one,
the OCnC output overrides the normal port functionality of the I/O pin it is connected to. How-
ever, note that the Data Direction Register (DDR) bit corresponding to the OCnA, OCnB or
OCnC pin must be set in order to enable the output driver.
When the OCnA, OCnB or OCnC is connected to the pin, the function of the COMnx1:0 bits is
dependent of the WGMn3:0 bits setting. Table 13-1 shows the COMnx1:0 bit functionality when
the WGMn3:0 bits are set to a Normal or a CTC mode (non-PWM).
Table 13-2 shows the COMnx1:0 bit functionality when the WGMn3:0 bits are set to the fast
PWM mode.
Note: 1. A special case occurs when OCRnA/OCRnB/OCRnC equals TOP and
COMnA1/COMnB1/COMnC1 is set. In this case the compare match is ignored, but the set or
clear is done at TOP. See “Fast PWM Mode” on page 128. for more details.
Table 13-1. Compare Output Mode, non-PWM
COMnA1/COMnB1/
COMnC1
COMnA0/COMnB0/
COMnC0
Description
00
Normal port operation, OCnA/OCnB/OCnC
disconnected.
0 1 Toggle OCnA/OCnB/OCnC on Compare Match.
10
Clear OCnA/OCnB/OCnC on Compare Match (Set
output to low level).
11
Set OCnA/OCnB/OCnC on Compare Match (Set
output to high level).
Table 13-2. Compare Output Mode, Fast PWM
(1)
COMnA1/COMnB1/
COMnC1
COMnA0/COMnB0/
COMnC0
Description
00
Normal port operation, OCnA/OCnB/OCnC
disconnected.
01
WGMn3=0: Normal port operation,
OCnA/OCnB/OCnC disconnected.
WGMn3=1: Toggle OCnA on Compare Match,
OCnB/OCnC reserved.
10
Clear OCnA/OCnB/OCnC on Compare Match
Set OCnA/OCnB/OCnC at TOP
11
Set OCnA/OCnB/OCnC on Compare Match
Clear OCnA/OCnB/OCnC at TOP

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atmel AVR AT90CAN32 and is the answer not in the manual?

Atmel AVR AT90CAN32 Specifications

General IconGeneral
BrandAtmel
ModelAVR AT90CAN32
CategoryMicrocontrollers
LanguageEnglish

Related product manuals