Chapter 3 Counter function of the PI918
6F8C1370
18
3.2. Operation of the speed counter
Thespeedcountercontinuouslycountsinputpulses,andtransfersthe
countvaluetotheholdregisteratcertaincycles. Thecountstarts
from"0."
Whenexternalinputpulsesareused,itcanbeusedasafrequency
counter. Becausecountingisdonecontinuously,theabsolutevalueof
inputpulsecountcanbemeasured.
Wheninternalinputpulsesareused,itcanbeusedasaselfdiagnosis
counter.
Theinterruptstatusfunctionsetwiththealarmfunctioncanbeused.
Interruptsduetothealarmvaluesettingofthespeedcounteroccurin
synchronizationwiththedataupdatecycleoftheholdregister.
Forthespeedcounter,gatecontrolwithgateinputandcommandis
invalid.
Someexampleapplicationsofthespeedcounterareprovidedbelow.