Fujitsu F2MC-16LX Hardware Manual page 287

Mb90470 series 16-bit microcontroller
Hide thumbs Also See for F2MC-16LX:
Table of Contents

Advertisement

I Count direction flag, count direction reversal flag
The count direction flag (UDF1, UDF0) indicates whether the last count operation was either an
up-count or down-count if an up- or down-count was performed. By evaluating the count clock
generated by input of both the AIN and BIN pins, a flag is updated at every count operation. If
information on the current rotation direction is required for controlling the motor, it is identified by
checking this flag.
This function is available in all count modes.
Table 13.3-5 Selection of count mode
UDF1, UDF0
00B
01B
11B
The count direction reversal flag (CDCF) is set when the count direction is switched between
counting up and counting down. When this flag is set, an interrupt is generated to the CPU. By
referring to this interrupt and the count direction flag (UDF1, UDF0), changes of direction are
identified. However, note that the direction indicated by the flag may be restored to the original
one after one reversal of direction if the duration of the direction reversal is short and/or occurs
repeatedly.
Table 13.3-6 Count direction reversal flag
CDCF
0B
1B
CHAPTER 13 8/16-BIT UP/DOWN COUNTER/TIMER
Down count (decrement)
Up count (increment)
Up/down simultaneously generated (no count operation performed)
Count direction reversal detection
No direction reversal
Direction reversal (one or more times)
Count direction
271

Advertisement

Table of Contents
loading

Table of Contents