摘要 |
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:An oscillating signal of a signal source 4a selected and assigned by a signal source selecting circuit 3 is inputted to a microcomputer 1 through a gate circuit 15. A microprocessor unit (MPU)9 determines the presence of a rise in a data from an interrupting control line 5, an interrupting demaned bit and an interrupting mask bit are cleared by an intitial rise, and a counter of an RAM11 starts counting. A determining loop is repeated by means of a succeeding rise until an interrupting bit attains ''1'', and a counter adds 1 each time the repetition takes place. A return address is set at a program counter by an interrupting demand due to a succeeding rise, and the MPU9 frequency F of the signal source 4a, based on a content N of the counter and a period Tl of a loop, by operating a Formula F=1/N.Tl. |