Patent ID: 8204674

Claim:
An apparatus for controlling an engine having a crankshaft and a camshaft, the apparatus comprising: an input unit configured to input a crank signal as an input signal to an input path, the crank signal having a level that repetitively changes in a predetermined direction each time the crankshaft rotates by a first unit angle; a multiplication clock generating unit configured to generate a first multiplication clock including a train of clock pulses whose clock cycle is determined by dividing, by a first multiplication number, the input signal; a count unit configured to count in synchronization with the first multiplication clock generated by the multiplication clock generating unit, a count value of the count unit corresponding to a rotational position of the crankshaft; an event generating unit configured to generate at least one event associated with control of the engine according to a crankshaft's rotational position identified by the count value of the count unit; a monitoring unit configured to monitor a level change of the input signal inputted through the input path; an abnormality determining unit configured to determine whether the crank signal is abnormal by comparing the monitored level change of the input signal with a normal level change of the input signal; an input switching unit configured to switch the input signal to be inputted to the input path from the crank signal to a cam signal when it is determined that the crank signal is abnormal, the cam signal having a level that repetitively changes in a predetermined direction each time the camshaft rotates by a second unit angle; and an event signal generating unit configured to generate a crank-input event signal while it is determined that the crank signal is abnormal by the abnormality determining unit, the crank-input event signal having a level that repetitively changes in a predetermined direction, each level change of the crank-input event signal being synchronized with a corresponding level change of the crank signal, the monitoring unit being configured to monitor a level change of the crank-input event signal while it is determined that the crank signal is abnormal by the abnormality determining unit.