Cylinder judgment signals are output from cam sensors at every uneven crank
angle interval. The number of cylinder judgment signals output per cam
sensor during a time period between a previous output and a present output
of cylinder judgment signals from the other cam sensor, is counted up, to
judge a specific cylinder based on the number of outputs. As a result,
cylinders other than the specific cylinder are judged based on the
judgment result and the cylinder judgment signals. Simultaneously, a time
period from the previous cylinder judgment to the present cylinder
judgment is calculated, to judge erroneous detection of cylinder judgment
signal due to noise based on a ratio between a previous calculation value
and a present calculation value of the time period. When the erroneous
detection is judged, the cylinder judgment result based on the cylinder
judgment signals is canceled.