172
CHAPTER 8 PULSE WIDTH COUNT TIMER (PWC)
MB89620 series
8.
6
Operation of Pulse Width Measurement Function
This section describes the operations of the pulse width measurement function of the
pulse width count timer.
n
Operation of Pulse Width Measurement Function
Figure 8.6a shows the settings required to operate as the pulse width measurement function.
Figure 8.6a Pulse Width Measurement Function Settings
When counter operation is enabled, the counter starts counting-down from “FF
H
” when a
measurement start edge is detected on the pulse input to the PWC pin. (For “H” width
measurement, the counter starts measurement from the next rising edge if the input is already
“H”.)
On detection of the measurement completion edge, the current down-counter value is
transferred to the PWC reload buffer register (RLBR), the measurement completion interrupt
request flag bit (PCR1: IR) and buffer-full flag bit (PCR1: BF) are both set to “1”, and counter
operation is re-enabled. (The function supports continuous pulse width measurement and so
can be used like an input capture.)
Figure 8.6b shows the operation when the measured pulse selection bits (PCR2: W1, W0) are
set to “00
B
” (“H” width measurement).
Figure 8.6b Example of “H” Width Measurement Using Pulse Width Measurement Function
Check: •
If the previous RLBR register value has not been read during continuous pulse width
measurement, the PWC leaves the BF bit set to “1” and maintains the previous measurement
value. In this case, the new measurement value is lost.
•
Do not modify the PCR2 register during pulse width measurement (PCR1: EN = “1”).
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
DDR3
×
×
0
×
×
×
×
×
PCR1
EN
TOE
IE
—
—
UF
IR
BF
1
×
PCR2
FC
RM
TO
—
C1
C0
W1
W2
1
×
×
PLBR
Holds the pulse width measurement value.
: Used bit
: Used to
measure long
pulse widths
×
: Unused bit
1 : Set “1”.
0 : Set “0”.
Input pulse
(input waveform to the PWC pin)
Counter value
FF
H
EN bit
IR bit
BF bit
“H” width
Counter operation
Time
Cleared by the program
Data transferred from down-
counter to RLBR
RLBR read
Summary of Contents for F2MC-8L MB89620 Series
Page 8: ......
Page 10: ...MB89620 series ...
Page 11: ...vi MB89620 series ...
Page 17: ...xii MB89620 series ...
Page 18: ...xvi MB89620 series ...
Page 30: ...MB89620 series CHAPTER 1 OVERVIEW 9 Memo ...
Page 34: ...MB89620 series CHAPTER 1 OVERVIEW 13 Memo ...
Page 42: ...MB89620 series CHAPTER 1 OVERVIEW 21 Memo ...
Page 49: ...28 CHAPTER 1 OVERVIEW MB89620 series ...
Page 62: ...MB89620 series CHAPTER 3 CPU 41 Memo ...
Page 78: ...MB89620 series CHAPTER 3 CPU 57 Memo ...
Page 82: ...MB89620 series CHAPTER 3 CPU 61 Memo ...
Page 86: ...MB89620 series CHAPTER 3 CPU 65 Memo ...
Page 90: ...MB89620 series CHAPTER 3 CPU 69 Memo ...
Page 96: ...MB89620 series CHAPTER 3 CPU 75 Memo ...
Page 122: ...MB89620 series CHAPTER 4 I O PORTS 101 Memo ...
Page 144: ...MB89620 series CHAPTER 5 TIMEBASE TIMER 123 Memo ...
Page 149: ...128 CHAPTER 5 TIMEBASE TIMER MB89620 series ...
Page 157: ...136 CHAPTER 6 WATCHDOG TIMER MB89620 series ...
Page 174: ...MB89620 series CHAPTER 7 8 BIT PWM TIMER 153 Memo ...
Page 177: ...156 CHAPTER 7 8 BIT PWM TIMER MB89620 series ...
Page 202: ...MB89620 series CHAPTER 9 16 BIT TIMER COUNTER 181 Memo ...
Page 217: ...196 CHAPTER 9 16 BIT TIMER COUNTER MB89620 series ...
Page 220: ...MB89620 series CHAPTER 10 8 BIT SERIAL I O SERIAL I O 1 AND SERIAL I O 2 199 Memo ...
Page 228: ...MB89620 series CHAPTER 10 8 BIT SERIAL I O SERIAL I O 1 AND SERIAL I O 2 207 Memo ...
Page 245: ...224 CHAPTER 10 8 BIT SERIAL I O SERIAL I O 1 AND SERIAL I O 2 MB89620 series ...
Page 266: ...MB89620 series CHAPTER 13 A D CONVERTER 245 13 Memo ...
Page 283: ...262 CHAPTER 13 A D CONVERTER MB89620 series ...
Page 289: ...268 CHAPTER 14 CLOCK MONITOR FUNCTION MB89620 series ...
Page 306: ...MB89620 series APPENDIX 285 APPEND Memo ...
Page 319: ...298 APPENDIX MB89620 series Memo ...
Page 321: ...2 ...
Page 354: ......