beautypg.com

32 tccr4b - timer/counter4 control register b, Atmega128rfa1 – Rainbow Electronics ATmega128RFA1 User Manual

Page 287

background image

287


8266A-MCU Wireless-12/09

ATmega128RFA1

Register Bits

Value

Description

0x5

Fast PWM, 8-bit

0x6

Fast PWM, 9-bit

0x7

Fast PWM, 10-bit

0x8

PWM, Phase and frequency correct, TOP =
ICRn

0x9

PWM, Phase and frequency correct, TOP =
OCRnA

0xA

PWM, Phase correct, TOP = ICRn

0xB

PWM, Phase correct, TOP = OCRnA

0xC

CTC, TOP = OCRnA

0xD

Reserved

0xE

Fast PWM, TOP = ICRn

0xF

Fast PWM, TOP = OCRnA

18.11.32 TCCR4B – Timer/Counter4 Control Register B

Bit

7

6

5

4

3

2

1

0

NA ($A1)

ICNC4

ICES4

Res

WGM43 WGM42

CS42

CS41

CS40

TCCR4B

Read/Write

RW

RW

R

RW

RW

RW

RW

RW

Initial Value

0

0

0

0

0

0

0

0

Bit 7 – ICNC4 - Input Capture 4 Noise Canceller

Timer/Counter4 has only limited functionality. It is not connected to any Input Capture
Pin. Therefore this bit has no meaningful function.

Bit 6 – ICES4 - Input Capture 4 Edge Select

Timer/Counter4 has only limited functionality. It is not connected to any Input Capture
Pin. Therefore this bit has no meaningful function.

Bit 5 – Res - Reserved Bit

This bit is reserved for future use. A read access always will return zero. A write access
does not modify the content.

Bit 4:3 – WGM41:40 - Waveform Generation Mode

Combined with the WGM41:0 bits found in the TCCR4A Register, these bits control the
counting sequence of the counter, the source for maximum (TOP) counter value, and
what type of waveform generation to be used. Modes of operation supported by the
Timer/Counter unit are: Normal mode (counter), Clear Timer on Compare match (CTC)
mode, and three types of Pulse Width Modulation (PWM) modes. For more information
on the different modes see section "Modes of Operation". Note that Timer/Counter4 has
only limited functionality. It cannot be connected to any I/O pin.

Table 18-22 WGM4 Register Bits

Register Bits

Value

Description

0x0

Normal mode of operation

0x1

PWM, phase correct, 8-bit

0x2

PWM, phase correct, 9-bit

WGM41:40

0x3

PWM, phase correct, 10-bit