摘要 |
PURPOSE:To detect the runaway and the abnormal state of an external device in a wide range by providing the first flag whose state is changed in accordance with an input signal and the second flag whose state is changed when in accordance with the state of this first flag or the execution of a specific instruction. CONSTITUTION:A runaway/abnormality detecting circuit 37 consists of an input buffer 41 to which the signal inputted to a state input terminal 39 is supplied, a flag register 42 whose state is controlled in accordance with the output signal of the input buffer 41, a flag register 43 whose state is controlled by set and rest instructions, and an OR gate 44. The runaway of a microcomputer itself or the abnormal state of an external device 38 is detected on a basis of a control signal outputted from an instruction decoder 33 the reset signal outputted from a reset generator 36, and a signal corresponding to the operation state of the external device 38, and the detection signal is supplied to the reset generator 36 to initialize the operation as a system. |