when the first detection portion 26 detects a left leading edge of a tooth 51 at step 205 the cpu 42 judges whether or not the counter value c is set at one if the counter value c is not set at one the cpu 42 proceeds to step 206 and adds one to the sensor value s in an incremental manner the sensor value s increases in an incremental manner each time the first detection portion 26 detects the left edge of a tooth 51 if the counter value c is a value other than one the cpu 42 resets the sensor value s at zero when the sensor value s reaches three if the counter value c is set at one the sensor value s is reset to zero when the sensor value s reaches fifteen corresponding to 30 u00b0 ca if the teeth 51 are formed at equal intervals the counter value c is increased in an incremental manner every 30 u00b0 ca this is carried out to judge whether or not the crank rotor 50 is rotating forward or rearward within a range of 30 u00b0 ca from the start the cpu 42 then proceeds to step 207 and judges whether or not the sensor value s indicates three if the sensor value s does not indicate three the cpu 42 returns to step 200 if the sensor value s indicates three the cpu 42 resets the sensor value s in this case the cpu 42 resets the sensor value s and proceeds to step 209 to add one to the counter value c in an incremental manner afterwards the cpu 42 proceeds to step 210 at step 210 the cpu 42 judges whether or not the counter value c indicates twelve.