Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
35 Interrupt Function and Pulse Catch Function
801
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
31
Applied Instructions
(Data Transfer 3)
32
Applied Instructions
(High Speed
Processing 2)
33
Applied Instructions
(Extension File
Register Control)
34
Applied Instructions
(FX
3U
-CF-ADP)
35
Interrupt Function
and Pulse Catch
Function
A
Relationships
between devices
and addresses
B
Applied
Instruction List
35.3 Input Interrupt (Interrupt Triggered by External Signal) [Without Delay Function]
3) When counting the number of times of input generation (in the same way as single phase high speed
counter)
In the program example shown below, external inputs are counted.
4) When catching a short pulse
In the program example shown below, the ON status is held for a certain period of time after a short pulse
turns ON.
EI
EN ENO
M8000
RUN
monitor
Interrupts are enabled by EI instruction.
The main program is described.
When X002 turns ON, "1" is added to the value of D0.
INC instruction executes increment in every operation
cycle, but the interrupt routine is executed only once
by an input signal.
Accordingly, it is not necessary to use INCP (pulse
operation type) instruction.
INC
EN ENO
d
D0
When the rising edge
of X002 is detected
[Main program]
[Interrupt program]
(Event: I201)
Pulse input
X003
M0
ON ON
TO TO
EI
EN ENO
M0
Interrupts are enabled by EI instruction.
The period of time to hold M0 is specified.
When X003 turns ON and the interrupt routine is
executed, M0 is set to ON unconditionally.
OUT_T
EN ENO
TCoil
TValue
RST
EN ENO
d
SET
EN ENO
d
M8000
RUN
monitor
M0
M0
T0
After the timer time, M0 is reset.
TCo
K10
M0
When the rising edge
of X003 is detected
[Main program]
[Interrupt program]
(Event: I301)
Preparation for measurement