摘要 |
PROBLEM TO BE SOLVED: To monitor fluctuation and transition of a supply voltage by using an A/D converter as a detection circuit of the supply voltage. SOLUTION: A constant-voltage generation circuit 3 is installed. A constant voltage generated by the constant-voltage generation circuit 3 is applied to an analog input channel 5 of the A/D converter 1, and the supply voltage is connected to AVREF 4 which is a reference voltage of the A/D converter 1 to execute A/D conversion, and the A/D conversion result is housed in an A/D conversion result register 8. In the A/D conversion result housed in an A/D conversion result register 8, the applied voltage to the analog input channel 5 is constant, and therefore the supply voltage can be acquired by back calculation. The analog input channel 5 to which the constant voltage generated by the constant-voltage generation circuit 3 is applied is selected periodically by a CPU from among plural analog input channels 7 by a selector 6 for selecting one analog input channel from among the plural analog input channels, and subjected to the A/D conversion, to thereby enable to acquire the supply voltage continuously and to monitor fluctuation and transition of the supply voltage.
|