Fujitsu MB91460 SERIES FR60 User Manual page 875

32-bit microcontroller
Table of Contents

Advertisement

7.11 How do I enable/disable Up/Down Counter's count operation?
Use the count activate bit (UDCS.CSTR).
When the count-up value agrees with the compare value:
To disable Up/Down Counter's count operation
To enable Up/Down Counter's count operation
(To activate count operation)
• How do I start counting?
Timer mode
Up/down count mode
Phase difference count mode
Note that the count operation enable level must be detected, before the ZIN pin's gate function can be
selected.
7.12 How do I know the previous count direction (the current rotation direction)?
Use the up/down flags (UDCS.UDF[1:0]).
"11" indicates that both counting up and down are performed, resulting in no change in the count value.
This flag has nothing to do with interrupts. So, use the count direction change flag (UDCC.CDCF) for interrupt
processing.
7.13 How do I know count direction changes?
Use the count direction change flag (UDCC.CDCF).
"0" indicates that no direction change has been made after clearing the flag.
"1" indicates that a direction change has been made once or more after clearing the flag.
7.14 How do I know that a compare-match has occurred?
Use the compare detection flag (UDCS.CMPF).
"0" indicates that the Up/Down Counter's count value does not agree with the compare value.
"1" indicates that the Up/Down Counter's count value agrees with the compare value.
Regardless of counter operations (counting up/down, or a value being set or reloaded), the compare detection
flags are set to "1" when the count value agrees with the compare value.
Counting starts using the internal clock (See 7.3.)
Counting starts when the edge of an AIN or BIN pin input signal is detected.
(See 7.4.)
Counting starts when a phase difference between AIN and BIN pins is
detected.
Up/down flag (UDF[1:0])
"00" indicates that no counting is performed after resetting.
"01" indicates that counting down is performed.
"10" indicates that counting up is performed.
Count direction change flag (CDCF)
Compare detection flag (CMPF)
Chapter 41 Up/Down Counter
Count activate bits (UDCS.CSTR)
Set the bit to "0".
Set the bit to "1".
7.Q&A
859

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fr60Mb91460 series

Table of Contents