beautypg.com

47 tccr5b - timer/counter5 control register b, Atmega128rfa1 – Rainbow Electronics ATmega128RFA1 User Manual

Page 296

background image

296



8266A-MCU Wireless-12/09

ATmega128RFA1

Register Bits

Value

Description

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.47 TCCR5B – Timer/Counter5 Control Register B

Bit

7

6

5

4

3

2

1

0

NA ($121)

ICNC5

ICES5

Res

WGM53 WGM52

CS52

CS51

CS50

TCCR5B

Read/Write

RW

RW

R

RW

RW

RW

RW

RW

Initial Value

0

0

0

0

0

0

0

0

Bit 7 – ICNC5 - Input Capture 5 Noise Canceller

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

Bit 6 – ICES5 - Input Capture 5 Edge Select

Timer/Counter5 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 – WGM51:50 - Waveform Generation Mode

Combined with the WGM51:0 bits found in the TCCR5A 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/Counter5 has
only limited functionality. It cannot be connected to any I/O pin.

Table 18-28 WGM5 Register Bits

Register Bits

Value

Description

0x0

Normal mode of operation

0x1

PWM, phase correct, 8-bit

0x2

PWM, phase correct, 9-bit

0x3

PWM, phase correct, 10-bit

0x4

CTC, TOP = OCRnA

0x5

Fast PWM, 8-bit

WGM51:50

0x6

Fast PWM, 9-bit