PURPOSE: To count many pulses by storing once the count of a counter in a storage device and adding the value counted newly by the counter after clearing the counter to the contents of the storage device so as to rewrite the storage device.
CONSTITUTION: A pulse of a phase A from an encoder 4 and a pulse of a phase B with a delay are inputted to a decoder 5 and an up-count pulse is fed to a terminal U/D of a counter 25. When the counter 25 counts the maximum value, a counter 26 starts counting afterward. Data (n+2) from the counters 25, 26 is latched by using a latch signal from a microprocessor at a prescribed time and the counters are cleared by using a signal being the inverted latch signal. Then a gate signal GT is fed from the processor and the data (n+2) is given to the bus and written in the storage device. The processor reads the count stored in advance by the repetition of the operation and adds it to the new count to be sent. The result is stored in the preceding storage location of the storage device with overwriting.
AKITA TADASHI