PURPOSE: To execute the detection of a pulse signal to generate a reference signal through one system for realizing cost reduction by judging whether a cylinder pressure signal is a peak pressure signal or not at the time of judging a starting cycle, and setting up an angular signal at the time of the detection of the cylinder pressure peak as a reference position.
CONSTITUTION: During the operation of an engine, whether the operation of an engine is a starting cycle or not is first judged on the basis of the existance of a cranking signal C generated by a start switch 22 in a control device 3A, and when judgment is YES, a starting cycle judging signal H is generated for a fixed term from the starting of the engine. The judging signal H actuates a cylinder pressure peak detecting means 34 to judge whether a cylinder pressure signal P sent from a cylinder pressure sensor 21 is for the peak or not. When the cylinder pressure being the peak is judged, a reference position setting up means 31A having an angular signal θ inputted from a signal angle detecting means 1A is made to send a reference position signal T with the angular signal θ at the time of the detection of the cylinder pressure peak taken as the reference position, and the reference position signal T is made to be useful for setting up an ignition control time Ta in an ignition timing setting up means 32.