the microcomputer of the invention comprises a flip - flop which repeats setting and resetting of a monitor signal . the monitor signal is delivered from an external device in response to a pwm output signal for driving the external device . the flip - flop sets and resets at the front edge , of the monitor signal . the invention detects a failure of the external device according to the presence or absence of inversion of its held value . hence , the failure of the external device operating at high speeds can be reliably detected by the microcomputer of the invention .