Abstract: An electronic control unit includes a microcomputer and an input interface circuit. The microcomputer has square wave input ports, a reference square wave input port, a serial communication port, and an output port. Square wave signals are inputted from sensors to four channels of the input interface circuit. A channel selector included in the input interface circuit the selects square wave signals in orderly sequence for capturing. The microcomputer performs a comparison between a time at which the square wave is captured and a time at which the selected square wave signal is captured for diagnosing operation of an input capturing function.