
178
CHAPTER 6 8/16-BIT UP/DOWN COUNTER/TIMER
6.4
Selection of Counting Mode
This timer/counter has four counting modes. The CMS1 and CMS0 bits of the CCR
register can be used to select these counting modes.
■
Selecting counting mode
Table 6.4-1 "Selecting timer counting mode" lists the count modes that can be selected by the
CMS1 and CMS0 bits.
■
Timer mode [down count]
In timer mode, the output of the internal prescaler is used for counting down. For the internal
prescaler, either two machine cycles or eight machine cycles can be selected with the CLKS bit
of the CCRH register.
■
Up/down counting mode
In up/down counting mode, counting up/down is performed by counting the input through
external pin AIN and BIN. The input through the AIN pin controls counting up and the input
through the BIN pin controls counting down.
The inputs through the AIN pin and BIN pin are subject to edge-detected. The edge detection
can be selected by the CES1 and CES0 bits of the CCRH register.
■
Phase difference counting mode (two multiplication/four multiplication)
In phase difference counting mode, to count the phase difference between phase A and phase
B of the output signal, detect the input level of the BIN pin at input edge detection of the AIN pin
and detect the input level of the AIN pin at input edge detection of the BIN pin.
For the phase difference between AIN pin input and BIN pin input in two multiplication or four
Table 6.4-1 Selecting timer counting mode
CMS1, CMS0
Counting mode
00
B
Timer mode [down count]
01
B
Up/down counting mode
10
B
Phase difference counting mode, 2 multiplication
11
B
Phase difference counting mode, 4 multiplication
Table 6.4-2 Selecting the detection edge
CES1, CES0
Detection edge
00
B
Disables the edge detection.
01
B
Detects rising edge.
10
B
Detects falling edge.
11
B
Detects both falling and rising edges.
Summary of Contents for MB91150 Series
Page 1: ......
Page 2: ......
Page 3: ...FUJITSU LIMITED FR30 32 BIT MICROCONTROLLER MB91150 Series HARDWARE MANUAL ...
Page 4: ......
Page 10: ...vi ...
Page 112: ...96 CHAPTER 3 MEMORY SPACE CPU AND CONTROL UNIT ...
Page 178: ...162 CHAPTER 5 I O PORTS ...
Page 214: ...198 CHAPTER 7 16 BIT RELOAD TIMER ...
Page 240: ...224 CHAPTER 8 PPG TIMER ...
Page 310: ...294 CHAPTER 13 8 10 BIT A D CONVERTER ...
Page 318: ...302 CHAPTER 14 8 BIT D A CONVERTER ...
Page 362: ...346 CHAPTER 15 UART ...
Page 420: ...404 CHAPTER 19 PERIPHERAL STOP CONTROL ...
Page 428: ...412 CHAPTER 20 CALENDAR MACROS ...
Page 503: ...487 INDEX INDEX The index follows on the next page This is listed in alphabetic order ...
Page 510: ...494 INDEX ...
Page 512: ......