Introduced the MCU STM8S105C4’s basic framework,main function modules and corresponding technical parameters.Based on this MCU, With the crankshaft signal and camshaft signal, the throttle valve position signal, intake manifold pressure signal, and other signals for the treatment plan,the injection control and ignition control,we developed a corresponding control program flow charts and software implementation,to make sure the control of the four-cylinder gasoline engine’s operation correct. Simulation results show that,the design of the control system reach the expected goals,that makes the gasoline engine start and running steadily.