A system was designed for controlling fuel injection and ignition timing for use on a port fuel injected, gas-fueled engine. Inputs required for the system include manifold absolute pressure, manifold air temperature, a once per revolution crankshaft pulse, a once per cycle camshaft pulse, and a relative encoder pulse train to determine crank angle. A prototype card installed in the computer contains counters and discrete logic which control the timing of ignition and injection events. High current drivers used to control the fuel injector solenoids and coil primary current are optically isolated from the computer by the use of fiber optic cables. The programming is done in QuickBASIC running in real time on a 25 MHz 80486 personal computer.The system was used to control a gas-fueled spark ignition engine at various conditions to map the torque versus air-fuel ratio and ignition timing. Each surface was mapped for a given fuel flow and speed. At constant fuel flow, fuel composition, and engine speed, thermal efficiency is proportional to torque. Therefore, the air-fuel ratio and ignition timing for best torque is also that for best thermal efficiency. NOx and HC maps were also measured to determine the tradeoffs between efficiency and emissions. Natural gas, propane, and propylene were used to determine the effect of different fuels. The results show that changing composition could have an effect on optimum air-fuel ratio and ignition timing. The engine used for the experiments was an inline four cylinder Volkswagen 1.7 liter spark ignition engine with gaseous sequential port fuel injection.