Fujitsu F2MC-8FX Hardware Manual page 266

F2mc-8fx 8-bit microcontroller
Hide thumbs Also See for F2MC-8FX:
Table of Contents

Advertisement

CHAPTER 16 8/16-BIT COMPOSITE TIMER
PWM timer functions (variable-cycle)
The 8/16-bit composite timer 00 data register (T00DR) and 8/16-bit composite timer 01 data register
(T01DR) are used to set "L" pulse width timer and cycle, respectively. When the timer starts operation
(T00CR1/T01CR1:STA = 1), the value of each register is transferred to the latch in the 8-bit comparator
and two counters start counting from timer output "L". When the T00DR value held in the latch matches
the timer 00 counter value, the timer output becomes "H" and the counting continues until the T01DR value
held in the latch matches the timer 01 counter value. When the T01DR value held in the latch of the 8-bit
comparator matches the timer 01 counter value, the values of these registers are transferred again to the
latch and the next PWM cycle of counting is performed continuously.
The current count value can be read from this register.
In 16-bit operation, set the upper data and lower data to T01DR and T00DR, respectively. And, write and
read T01DR and T00DR in this order.
PWC timer function
The 8/16-bit composite timer 00/01 data register (T00DR/T01DR) is used to read PWC measurement
results. When PWC measurement is completed, the counter value is transferred to this register and the BF
bit is set to "1".
When the 8/16-bit composite timer 00/01 data register is read, the BF bit is set to "0". Transfer to the 8/16-
bit composite timer 00/01 data register is not performed with the BF bit containing "1".
As the exception, when the H-pulse and cycle measurement (T00CR0/T01CR0:F3, F2, F1, F0 = 1001
selected, the H-pulse measurement result is transferred to the 8/16-bit composite timer 00/01 data register
with the BF bit set to "1", but the cycle measurement result is not transferred to the 8/16-bit composite
timer 00/01 data register with the BF bit set to "1". For cycle measurement, therefore, the H-pulse
measurement result must be read before the cycle is completed. Note also that the result of H-pulse
measurement or cycle measurement is lost unless read before the completion of the next H pulse.
When reading the 8/16-bit composite timer 00/01 data register, be careful not to clear the BF bit
unintentionally.
Writing to the 8/16-bit composite timer 00/01 data register updates the stored measurement data with the
write value. Therefore, do not perform a write operation. In 16-bit operation, the upper data and lower data
are transferred to T01DR and T00DR, respectively. Read T01DR and T00DR in this order.
Input capture function
The 8/16-bit composite timer 00/01 data register (T00DR/T01DR) is used to read input capture results.
When a specified edge is detected, the counter value is transferred to the 8/16-bit composite timer 00/01
data register.
Writing a value to the data register updates the measurement data stored there with that value. Therefore,
do not write to the 8/16-bit composite timer 00/01 data register. In 16-bit operation, the upper data and
lower data are transferred to T01DR and T00DR, respectively. Read T01DR and T00DR in this order.
252
") is
B

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mb95170j series

Table of Contents