摘要 |
<p>PURPOSE:To reduce the number of external parts or the number of circuits by providing this microcomputer with a clock generating means for executing oscillation corresponding to voltage to be measured, a set time counting means for counting a value corresponding to the number of clocks, a means for comparing a count value with a reference value, and a means for obtaining the voltage to be measured from a compared result. CONSTITUTION:The microcomputer is provided with the clock generating means 7 for executing oscillation corresponding to voltage to be measured, the set time counting means 9 for counting a value corresponding to the number of clocks, the means 11 for comparing the count value of the means 9 with the reference value, and the means 15 for obtaining the voltage to be measured from the compared result of the means 11. For instance, frequency oscillated from a crystal oscillator 8 is divided to form a fixed period, the number of clock pulses corresponding to the voltage to be measured in the period is counted and the count value is compared with the reference value to measure the voltage. Consequently, the number of external parts, the number of IC exter nally lead-out terminals, etc., can be reduced and the use of a normal voltage comparator can be made unnecessary.</p> |