Chapter 3 Counter function of the PI918
6F8C1370
22
3.3.1. Application as a slave cycle counter
Theslavecyclecountercanmeasuretheinterruptcycleofthemaster
counterbasedontheinternalreferencepulses. Inversely,itcanbe
usedtomeasurethefrequencyoftheinputpulsesappliedtothe
master'scounter.
Condition:
Parameter
setting
EP AL SP SV
0 0 0 1
External
input
Pulseinput Gateinput
Notrequired Invalid
Operation:
(1) Thecounterisresetwhenthegateconditionofthemaster
becomes"Permission."
(2 Theinterruptstatusisinversedasynchronouslywhenanoverflow
oftheslavecounteroccursduringgatepermissionofthemaster.
(3) Thecountvalueistransferredtotheholdregisterandthecount
valueisresetto"0"whenaninterruptoccursinthemaster.
(4) Thecountvalueistransferredtotheholdregisteratthegate
prohibitionconditionofthemaster.
Figure 3.3.1. Example of slave cycle counter operation
0
Mastercounter
(autoreset
Slavecounter
Xm
Slaveholdvalue
0
A
B
C
D
E
F
Masterinterrupt
status
Mastergate
condition
A
0
B
Masterholdvalue
Slaveinterruptstatus
Xs
Overflow
G
C
D
E
F
G
(Permission
)
(Asynchronou
sinversion)