Fujitsu FR81S 사용자 설명서
CHAPTER 27: UP/DOWN COUNTER
2. Features
FUJITSU SEMICONDUCTOR LIMITED
CHAPTER : UP/DOWN COUNTER
FUJITSU SEMICONDUCTOR CONFIDENTIAL
FUJITSU SEMICONDUCTOR CONFIDENTIAL
4
2. Features
This section explains the features of the up/down counter.
· Counter mode: You can select one of the following two:
· 8-bit up/down counter (8-bit mode)
· 16-bit up/down counter (16-bit mode)
· 16-bit up/down counter (16-bit mode)
· Operating mode: You can select one of the following three (four types):
· Timer mode
The time is counted down in synchronization with the count clock.
As the count clock, the internal clock is used which is generated by dividing the peripheral clock
(PCLK) by 2 or 8 using the prescaler.
(PCLK) by 2 or 8 using the prescaler.
· Up/down count mode
Signals entered from the two external signal input pins are counted up or down. The edge to be counted
can be selected from among the rising edge, falling edge, and both edges.
can be selected from among the rising edge, falling edge, and both edges.
· Phase difference count mode
The phase difference of signals entered from the two external signal input pins are counted up or down.
The phase difference count mode is suitable for counting of encoders such as motors. This mode enables
high-precision counting of rotation angles, number of rotations and the like, by inputting outputs of
phases A, B, and Z of the encoder.
high-precision counting of rotation angles, number of rotations and the like, by inputting outputs of
phases A, B, and Z of the encoder.
There are two types of phase difference count mode: the two-time multiplication mode and four-time
multiplication mode. The counting differs between the two mode types.
multiplication mode. The counting differs between the two mode types.
Table 2-1 lists the up/down counter operating modes.
Table 2-1 Up/Down Counter Operating Modes
Operation mode
Count timing
Count
direction
Timer mode
Internal clock
Count down
Up/down count mode
External clock
Count up/Count down
Phase difference count mode
(multiply-by 2/ multiply-by 4)
Phase of the input signal from an
external signal input pin
Count up/Count down
· Reload compare function: You can select one of the following three:
·
Compare function
The compare function clears the counter and continues counting when counting reaches the preset value.
· Reload function
The reload function loads the reload value and continues counting if an underflow occurs.
· Reload compare function
Both the compare function and reload function can be combined for use.
MB91520 Series
MN705-00010-1v0-E
1011