摘要 |
PURPOSE:To simplify an interface circuit between a signal source and a microcomputer, by measuring a frequency by means of a microcomputer without the use of a counter, a timer circuit and the like. CONSTITUTION:When a program starts, in a counter 14 of an RAM11, the number of repetitions of a loop, which produces a set time, is set. A signal selecting code is then outputted from an interface circuit 12, and an oscillating signal from a signal source 4a selected and assigned by a signal source selecting circuit 3 is inputted to a microcomputer 1. A microporcessor (MPU)9 determines the presence of a rise in data, and if a rise signal is produced, a counter 13 of the RAM11 counts +1. If the counter 14, counting -1 at each determining loop, is brought to ''0'', the MPU9 computes and determines a frequency F of the signal source 4a, based on a number N counted by the counter 13 and a measuring time T asigned by the counter 14, by operating a Formula F=N/T. |