341
5
5 High-speed Input 5.1.3 Pulse Capture
Turn on "Enable Global Interrupts"
Set "Enable Pulse Capture”
Generate the pulse capture ag and process pulse events
Clear the pulse capture ag
EI
M8080
X00
M8090
X01
Enable Global Interrupts
Enable Pulse Capture at X00
Pulse capture
flag
Clear the pulse
capture flag
X00 input pulse width should be
greater than the high-speed filter
time (D8021*0.25 us)
In this program, turn on the "Enable Global Interrupts", and set Enable Pulse Capture M8080 to ON at X00.
When the external X00 input switches from OFF to ON, set the pulse capture ag M8090 interrupt to ON.
Process pulse capture events based on the status of M8090, and then reset the pulse capture ag in the
program to facilitate the next pulse capture response.
• To successfully use the pulse capture function, the corresponding input signal pulse width must be greater than
the high-speed lter time. That is, the pulse width must be greater than D8021*0.25 us.
5
.
2
High
-
speed Pulse Comparison Instructions of H
3
U Standard Model
Main instructions:
Instruction Function
HSCS (High-speed counter) Comparison setting
HSCR (High-speed counter) Comparison reset
HSZ (High-speed counter) Range comparison
SPD Pulse density detection
The program starts running Enable Pulse Capture at X0
Pulse capture ag bit at X0
Pulse capture ag bit at X0