A microprocessor-based device has been designed to control oxygen saturation (SaO2) in neonates by adjusting the inspired air-oxygen mixture (FiO2) delivered by a mechanical blender. The user sets a target SaO2 which the controller attempts to maintain. Alarms are actuated if the neonate's SaO2 is outside predefined limits. SaO2 levels are extracted from a commercial pulse oximeter and analyzed by an eight-bit microprocessing unit (MPU). Delivered percentages of FiO2 are adjusted by a motorized air-oxygen blender. The controller has a menu-driven user interface and can graphically present four-hour trends of the SaO2, FiO2, or blender setting. Sixteen hours of collected data can be stored and later downloaded to a personal computer. A real-time multi-tasking operating system forms the nucleus of the controller's software. Major tasks that share MPU time are control, filtering, user display, data collection, data archiving, alarm monitoring, and user input. Analog SaO2 levels are read and converted to digital values, which are then filtered to extract noise. A differential control algorithm is used to determine the required FiO2 blender setting. The blender is then adjusted to the new setting, after which the controller waits to repeat the process of sampling SaO2 and adjusting FiO2. System response time and blender increments are adjustable to allow a user to tune the controller to the patient's needs. Alarm conditions of concern within the device are SaO2 and FiO2 sensor disconnection, blender disconnection, and SaO2 limiting errors. In preliminary trials, for a target of 92.0% SaO2, a prototype controller maintained an average of 91.6% with a standard deviation of 5.0% over a one-hour period. Under manual control for one hour, the average SaO2 was 94.0%, SD 6.8%.