摘要 |
PROBLEM TO BE SOLVED: To detect malfunction of both a main and an interruption routine by outputting a specific value inputted to data by the main routine, by the interruption routine a specific time later, and resetting the data. SOLUTION: The main routine after initializing a count value TC and data DT to 0 inputs the reset code of a watchdog timer circuit 2 to the data DT. Further, when the interruption routine is executed, the count value TC is increased one by one, and when it reaches a specific value, the current value of the data DT is outputted to the watchdog timer circuit circuit 2, the count value TC and data DT are put back to 0, and the main routine is executed. Therefore, if such malfunction that return from the interruption routine to the main routine is not made occurs, the watchdog timer circuit 2 is not reset even a specific time later, so the malfunction can be detected. |