Operation Of Pulse Width Measurement Mode - Fujitsu F2MC-16LX Hardware Manual

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

Advertisement

CHAPTER 15 PWC TIMER
15.3.6

Operation of Pulse Width Measurement Mode

Operation of pulse width measurement mode is described.
Single Measurement and Continuous Measurement
Pulse width measurement modes include a mode to perform only one-time measurement and a mode to
perform continuous measurements. Each mode is selected by the PWCSR S/C bits (see "15.3.3 Count
Clock Selection and Operation Mode selection").
One-time measurement mode
When the first measurement termination edge is input, the timer counter stops and the measurement
termination flag (EDIR) in the PWCSR is set not to perform measurement anymore (however, when the
restart occurs at the same time, the measurement start is waited).
Continuous measurement mode
When the measurement termination edge is input, the timer counter stops and the measurement termination
flag (EDIR) in the PWCSR is set to stop the count until the measurement start edge is again input. When
the measurement start edge is again input, the measurement is started after the timer is cleared to 0000
the measurement termination, the measured result in the timer is transferred to the PWCR.
Note:
Always change the measurement mode selection when the timer stops.
Data of Measurement Result
Measured results, the timer value handling, and the PWCR function are different between the single
measurement mode and the continuous measurement mode. The measurement result in both modes is as
follows:
One-time measurement mode
• When the PWCR is read during the operation, the timer value in the measurement is acquired.
• When the PWCR is read after the measurement termination, the measured result data is acquired.
Continuous measurement mode
• At the measurement termination, the measured result in the timer is transferred to the PWCR.
• When the PWCR is read, the last measurement result is acquired and the previous measurement result is
held even in the measurement operation. The timer value under the measurement cannot be read.
When the next measurement is terminated before reading the measured result in the continuous
measurement mode, the previous measurement result is erased by a new measurement result. In this case,
the gill in PWCSR-Flag (ERR) is set. Error flag (ERR) is automatically cleared when reading the PWCR.
376
. At
H

Advertisement

Table of Contents
loading

Table of Contents