ATMEGA48V_11 ATMEL [ATMEL Corporation], ATMEGA48V_11 Datasheet - Page 119

no-image

ATMEGA48V_11

Manufacturer Part Number
ATMEGA48V_11
Description
8-bit Atmel Microcontroller with 4/8/16K Bytes In-System Programmable Flash
Manufacturer
ATMEL [ATMEL Corporation]
Datasheet
16.8.1
16.9
2545T–AVR–05/11
Modes of operation
Compare output mode and waveform generation
Figure 16-5. Compare match output unit, schematic.
The general I/O port function is overridden by the Output Compare (OC1x) from the Waveform
Generator if either of the COM1x1:0 bits are set. However, the OC1x pin direction (input or out-
put) is still controlled by the Data Direction Register (DDR) for the port pin. The Data Direction
Register bit for the OC1x pin (DDR_OC1x) must be set as output before the OC1x value is visi-
ble on the pin. The port override function is generally independent of the Waveform Generation
mode, but there are some exceptions. Refer to
and
The design of the Output Compare pin logic allows initialization of the OC1x state before the out-
put is enabled. Note that some COM1x1:0 bit settings are reserved for certain modes of
operation.
The COM1x1:0 bits have no effect on the Input Capture unit.
The Waveform Generator uses the COM1x1:0 bits differently in normal, CTC, and PWM modes.
For all modes, setting the COM1x1:0 = 0 tells the Waveform Generator that no action on the
OC1x Register is to be performed on the next compare match. For compare output actions in the
non-PWM modes refer to
page
page
A change of the COM1x1:0 bits state will have effect at the first compare match after the bits are
written. For non-PWM modes, the action can be forced to have immediate effect by using the
FOC1x strobe bits.
The mode of operation, that is, the behavior of the Timer/Counter and the Output Compare pins,
is defined by the combination of the Waveform Generation mode (WGM13:0) and Compare Out-
Table 16-3 on page 131
COMnx1
COMnx0
FOCnx
130, and for phase correct and phase and frequency correct PWM refer to
131.
clk
I/O
See “Register description” on page 130.
Waveform
generator
Table 16-1 on page
for details.
D
D
D
PORT
DDR
OCnx
Table 16-1 on page
130. For fast PWM mode refer to
Q
Q
Q
ATmega48/88/168
1
0
130,
Table 16-2 on page 130
Table 16-2 on
Table 16-3 on
OCnx
pin
119

Related parts for ATMEGA48V_11