260
CHAPTER 13 8/16-BIT UP/DOWN COUNTER/TIMER
13.1 Overview of 8/16-bit Up/Down Counter Timer
The 8/16-bit up/down counter/timer consists of six event input pins, two 8-bit up/down
counter registers, two 8-bit reload/compare registers, and their control circuits.
■
Major functions of 8/16-bit up/down counter/timer
•
8-bit count register used for counting in a range of 0 to 255 (in the 16 bits x one operation
mode, counting in a range of 0 to 65535 is possible).
•
Four types of count modes can be selected for the count clock.
-
Timer mode
-
Up/down count mode
-
Phase difference decremented mode (two times)
-
Phase difference decremented mode (eight times)
•
In the timer mode, the count clock is selected from two types of internal clocks:
-
Divided by 2 (80ns at internal machine cycle f = 25 MHz)
-
Divided by 8 (320ns at internal machine cycle f = 25 MHz)
•
In the up/down count mode, a detection edge of the external pin input signal may be
selected:
-
Falling edge detection
-
Rising edge detection
-
Both falling and rising edges detection
-
Edge detection prohibited
•
The phase difference count mode is suitable for counting encoder output such as motor,
where encoder output from phases A, B, and Z is used as input, thereby facilitating high-
precision counting of rotation angle and rotations.
•
The ZIN pin is used to select from two types of functions:
-
Counter clear function
-
Gate function
•
Compare and reload functions are provided, where each function or a combination of them
are available. Starting both functions allows up/down counting with any time width.
-
Compare function (an interrupt is issued during compare)
-
Compare function (an interrupt is issued and the counter is cleared during compare)
-
Reload function (an interrupt is issued and reloaded during compare)
-
Compare and reload functions (an interrupt is issued and the counter is cleared during
compare, and an interrupt is issued and reloaded when an underflow occurs)
-
Compare and reload prohibited
•
Interrupt generation is individually controlled during comparison, a reload (underflow), or an
overflow.
•
The count direction flag identifies the count direction of the last counter operation
•
An interrupt occurs when the count direction is switched
Summary of Contents for MB90480 Series
Page 2: ......
Page 4: ......
Page 10: ...vi ...
Page 128: ...106 CHAPTER 4 RESET ...
Page 174: ...152 CHAPTER 6 LOW POWER CONSUMPTION MODE ...
Page 198: ...176 CHAPTER 7 MODE SETTING ...
Page 220: ...198 CHAPTER 9 TIMEBASE TIMER ...
Page 238: ...216 CHAPTER 11 WATCH TIMER ...
Page 280: ...258 CHAPTER 12 16 BIT INPUT OUTPUT TIMER ...
Page 406: ...384 CHAPTER 17 8 10 BIT A D CONVERTER ...
Page 478: ...456 CHAPTER 20 CHIP SELECTION FACILITY ...
Page 494: ...472 CHAPTER 21 ADDRESS MATCH DETECTION FUNCTION ...
Page 498: ...476 CHAPTER 22 ROM MIRROR FUNCTION SELECTION MODULE ...
Page 526: ...504 CHAPTER 23 2M 3M BIT FLASH MEMORY ...
Page 536: ...514 CHAPTER 24 EXAMPLES OF MB90F481B MB90F482B MB90F488B MB90F489B SERIAL PROGRAMMING ...
Page 570: ...548 CHAPTER 25 PWC TIMER ONLY MB90485 SERIES ...
Page 688: ......