| With the development of electronic technology, the automation and intellectualization of diagnostic instrument is highly demanded more and more. On the one hand, because the automatic equipment can spare lots of repeated manipulation, avoid miss operation and improve the detection efficiency; on the other hand, the complexity and precision of medical diagnosis instrument is higher and higher as well. The microcontrollers such as the conventional single-chip are found more and more difficult to be used directly to achieve the automatic and intelligent of large medical diagnosis instruments, especially developing the high-performance medical instruments such as the full-automatic Chemiluminescence Immunoassay Analyzer. Therefore, it is very important to use the embedded real-time operating system. The management of complicated multi-tasks is set to the operating system and consequently, program designs are simplified, the real-time performance of the single-chip and reliability of the instrument are improved. As the single-chip technology advances, the working frequency and memory has been improved greatly so that the single-chip has the capability of operating system Transplantation.On the basis of study of the single-chip MC9S12XS128 that is the series of the S12XS of Freescale, andμC/OS-Ⅱembedded real-time operating system, the program of transplanting theμC/OS-Ⅱoperating system into S12XS microcontroller is put forward in this paper. It has not only realizes the coordinating and controlling of mechanical transmission and positioning system of step motor, but also has been applied in the automatic control of adding reagent system in Chemiluminescence Immunoassay Analyzer.The research is made from two aspects hardware and software. In hardware, it designed a work circuit of MC9S12XS128 and step motor driver chip THB6128. Because Step motor uses 24V high voltage, in order to avoiding step motor's short-circuit burns the single-chip, photocoupler isolation circuit is designed. In software,μC/OS-Ⅱembedded real-time operating system is transplanted into single-chip MC9S12XS128; the work style of each module in the single-chip is configured; the speed control scheme and control process of the step motor is designed; the workflow of stepping motor in adding reagent systems is analyzed and the detailed control procedures are given.Considering the reasonable circuit design and software programming, this paper realized the fixed goal. The actual test indicates thatμC/OS-Ⅱembedded real-time operating system based on S12XS microcontroller realizes the automatic control of the adding reagent system in Chemiluminescence Immunoassay Analyzer, and the result indicates its good efficiency. The paper also lays a foundation for the automatic control of the Chemiluminescence Immunoassay Analyzer. |