Fujitsu F2MC-16LX Hardware Manual page 312

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

Advertisement

CHAPTER 14 PWC TIMER
I Selection of input pin
The PWC timer provides three channels, PWC0, PWC1, and PWC2, that are used as input pins
for pulse width measurement. Each of these channels can therefore be used independently.
Combining PWC0 and PWC1 with PIS1 and PIS0 in PWCSR0 enables the time between each
input waveform's rising and falling edges to be measured. Note that the PWC register used in
this case is PWC0.
Figure 14.3-5 "Input waveform and internal measurement waveform" shows the relationship
between input waveform and internal measurement.
Figure 14.3-5 Input waveform and internal measurement waveform
PWC0
input waveform
PWC1
input waveform
PWC internal measurement
waveform when PIS1
and PIS0 = "01"
PWC internal measurement
waveform when PIS1
and PIS0 = "10"
Note:
In comparing two inputs, start counting from PWC0 regardless of whether rising or falling
edges are detected and stop with PWC1.
If necessary, change the detection mode of rising and falling edges after measurement ends.
I Measurement mode and counter operation
The measurement mode is selected from among five types depending on which portions of the
input pulse are to be measured. For a high precision measurement of a high frequency pulse
width, a dedicated mode is provided to arbitrarily divide the input pulse for interval
measurement. Table 14.3-6 "List of measurement modes" shows a list of the measurement
modes.
Table 14.3-6 List of measurement modes
Measurement
MOD2
mode
"H"-level pulse
width
1
measurement
296
MOD1
MOD0
Measurement items (W: pulse width to be measured)
0
1
Measures the width of the "H" pulse.
Start of counting (measurement): When rising edge is detected
End of counting (measurement): When falling edge is detected
The time between rising/falling
edges can be obtained by
measuring the width of "H" within t
his internal measurement waveform.
W
Start of
Stop of
counting
counting
W
Start
Stop

Advertisement

Table of Contents
loading

Table of Contents