Hitachi NJI-350B Video Game Controller User Manual


 
Chapter 8 High-speed counter, PWM / Pulse train output and Analogue I/O
8-7
Others
7] The user program can switch from using a counter as an up counter to a down counter, as well as from a down
counter to an up counter while the counter is operating (using FUN142).
* The counter output does not turn on unless the control output flag (R7FC to R7FF) is turned on.
(2) Preload input operation
When a preload signal is entered, the current counter value is reset to the preload value.
The counter output is controlled only when the on-preset value or off-preset value is exceeded by the progress of the
counter value. Because of this, the counter output maintains its status before the preload input when the on-preset or off-
preset value is exceeded due to the preload value (when jumping from the Off area to the On area, or vice versa). Also,
the status of the counter output is reflected in the data memory at the timing of the refresh process. Therefore, it should be
noted that the status monitored by peripheral units, etc. and the actual output status may be different (by a delay of one
scan).
Figure 8.6 Preload input operation of high-speed counter (single-phase)
(3) Strobe input operation
When a strobe signal is entered, the current counter progress value is stored in the strobe storage area (WRF07A to 7D)
of the special internal output.
(4) Current value clear instruction operation
When the current value clear instruction (FUN144) is executed, the current counter value is reset (cleared) to zero.
The counter output is controlled only when the on-preset value or off-preset value is exceeded by the progress of the
counter value. Because of this, the counter output maintains its status before the execution of the current value clear
instruction when either the on-preset or off-preset value is exceeded due to the execution of the current value clear
instruction (when jumping from the Off area to the On area, or vice versa).
Figure 8.7 Current value clear instruction operation of high-speed counter (single-phase)
FFFFH
0000H
ON
OFF
Coincidence
output
On preset
Preload value
Off preset
Preload in
p
utPreload in
p
ut
Preload in
p
utPreload in
p
ut
FFFFH
0000H
ON
OFF
Coincidence
output
On preset
Current value clear
Off preset
Current value clear