Two-Phase Capture Input Timing (Timer 4); Panasonic - Panasonic MN10285K User Manual

Panax series microcomputer
Table of Contents

Advertisement

Ignore the flags when calculat-
ing the signal width, even when
TM3CA is the larger value.
Panasonic Semiconductor Development Company
To service the interrupts and calculate the signal width:
1.
Run the interrupt service routine. The routine must determine the interrupt
group, then clear the interrupt request flag.
2.
Calculate the number of cycles the TM4IA signal stays high. Save the con-
tents of TM4CA and TM4CB to the data registers, then subtract the contents
of TM4CA from the contents of TM4CB. Since TM4LP is set to 0, the dif-
ference will be the correct value even if TM4CA is greater than TM4CB.
Timer 4 can input a two-phase capture signal. You must select up counting. Timer 4
does not operate in STOP mode, when B
must be synchronized to B
OSC
TM4CA captures the count on the rising edge of TM4IA, and TM4CB captures
the count on the rising edge of TM4IB. A timer 4 capture B interrupt occurs
when TM4CB captures the count, and the contents of TM4CA and TM4CB are
read during the interrupt service routine.
In the example timing chart shown in figure 4-38, x'000A' – x'0007' = x'0003',
or 3 cycles. The calculation is correct even when TM4CA is the larger value. The
flags are ignored, so for instance, x'0003' – x'FFFE' = x'0005'.
TM4EN
TM4BC
0
0
1
2
3
BOSC/4
TM4CA
0
0
TM4CB
TM4IA
TM4IB
Interrupt
Figure 4-38 Two-Phase Capture Input Timing (Timer 4)
110

Panasonic

16-Bit Timer Setup Examples
is off. If you use an external clock, it
OSC
.
4
5
6
7
8
9
A
B
A-7=3
B
MN102H75K/F75K/85K/F85K LSI User Manual
Timers
C
D
E
F
10 11 12
7
A

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mn102f75kMn102f85kMn102h75kMn102h85k

Table of Contents