1 Introduction
With the rapid development of China's economy, the accelerating urbanization process, and the accelerating pace of people's lives, more and more people are beginning to feel that their health is getting worse and worse, and many people will not understand until the illness suddenly. According to reports, most people in China are in a sub-health state. With the development of modern electronic technology and the widespread use of 16/32-bit CPUs, the CPU system of traditional physiological signal monitors is gradually developing from 8-bit CPUs to higher-order processors. With the powerful function of the monitor, the requirements for data processing speed are getting higher and higher, which makes the development of 8-bit CPU limited. The 16/32-bit CPU can work normally at the clock frequency much higher than the 8-bit CPU. The one-time throughput is large, the price of the processor is declining, and the 16/32-bit CPU is widely used in physiological signal monitors.
The monitoring system uses the LPC2292 embedded microprocessor in the ARM7 series chip, which is mainly used to measure physiological parameters of the human body, such as: electrocardiogram, blood pressure, blood oxygen saturation, body temperature and so on. Because the system needs to collect and process a large amount of data information, it is difficult or even impossible to process the data information on the CPU with single-task software. Therefore, the μC/OS-II operating system that can handle multitasking at the same time is selected in the design. It provides a secure and reliable operating system platform that shortens the development cycle.
2 system hardware design
The minimum system of the ARM 7 series chip LPC2292 is shown in Figure 1:
The overall structural block diagram of the system is shown in Figure 2.
It can be seen from Fig. 2 that the whole system is based on the ARM 7 series chip LPC2292, and some peripheral circuits are extended in the periphery, thereby realizing the safety check on human physiological parameters: electrocardiogram, blood pressure, blood oxygen saturation and body temperature. The system collects the physiological parameters of the human body through the ECG module, the blood pressure module, the blood oxygen saturation module, the body temperature module, and the conditioning circuit to filter and amplify these signals. The LPC2292's own A/D converter converts the transmitted analog signals into Digital signals, and finally the parameters of the human body are displayed on the LCD.
2.1 ARM system module
The ARM system is the control center of this system, which mainly completes operations, control, management, etc., and is the core module of the system work. The system uses the ARM 7 series chip LPC2292, which is based on a 16/32-bit CPU that supports real-time emulation and tracking, with a 256 kb embedded high-speed FLASH memory. The 128-bit wide memory interface and unique acceleration structure allow 2-bit code to run at maximum clock rates. Applications that have tight control over code size can use 16-bit Thumb mode to reduce code size by more than 30% with minimal performance loss. The LPC2292's 144-pin package, extremely low power consumption, multiple 32-bit timers, eight 10-bit ADCs, two PWM channels, and up to nine external interrupts make them ideal for medical systems, automotive, and industrial control applications. And a fault tolerant maintenance bus.
2.2 LCD display module
The LCD display module mainly performs functions such as data display, synchronization of output data and display data. Since there is no functional module of the liquid crystal controller in the LPC2292, if there is no liquid crystal controller inside the selected liquid crystal screen, then in order for the CPU to control the liquid crystal, it is necessary to design a liquid crystal drive control circuit. Therefore, the LCD screen HLM6323 with its own controller is selected in this system. He is a 5-inch pseudo-color LCD screen, the pixel is 320 & TImes; 240 dot matrix, each point requires RGB three-color data, each color requires 1 byte data representation. The design requirements require continuous viewing of the image, 25 frames per second according to the standard, then at least 25 & TImes; 8 & TImes; 320 & TImes; 240 = 15 360 000 bits of data per second, if serial transmission is required, 4.6 The serial transmission speed of Mb/s, but unfortunately, no serial standard transmission is greater than this speed, so it is necessary to select parallel data transmission.
2.3 Alarm Module
When the measured physiological parameters, such as electrocardiogram, blood pressure, blood oxygen saturation, and body temperature exceed the preset normal value, an alarm is generated to remind the patient to quickly perform treatment or the medical personnel need to perform rescue measures.
2.4 FLASH data memory and USB interface
This module was designed to ensure the preservation and extraction of real-time data. In this system, the memory chip of the NAND08GW3D2 series is selected. Because the chip has the same pin density for different memory density devices, the system can be upgraded to a high-capacity memory device without any changes to the circuit. A USB device interface is extended by the USB device interface chip ISP1161A1. Through the USB interface, data recorded by the monitoring system can be uploaded to the PC, and the PC can also download the program to the memory of the LPC2292 processor through the interface.
2.5 system power supply
Power supply design is a key part of a system design, and a stable, power-hungry power supply and reasonable power management are essential for the entire system. The system has the following power supplies: CPU core digital and analog power supply voltage +1.8 V, CPU I / O port digital and analog power supply voltage +3.3 V, bus isolated power supply, LCD drive power, LCD backlight inverter Power supply, other peripheral power supply voltage +5 V and other power supplies.
3 software design
The software design of this system mainly includes two basic parts: the development of ARM application and the transplantation of μC/OS-II operating system. ARM applications mainly include LCD display programs, FLASH storage programs, USB communication programs, keyboard scanners, A/D programs, and alarm programs. The μC/OS-II operating system coordinates the task management and scheduling of the LPC2292 program. The software flow chart of the whole system is shown in Figure 3.
3.1 LCD driver software design ideas
The function of the LCD driver software is to complete the final output display of the data. The main software flow includes data transmission and reception, key reading on the LCD, and LCD scanning. The data is sent and received in order to complete the data transmission with the CPU and the LCD liquid crystal display. The CPU transmits data to the LCD through the driving chip, and the LCD returns the response data to the CPU. In order to enhance the readability of the human-machine interface, several buttons are set on the LCD. When there is a button reaction, the corresponding response should be sent to the CPU, and the display interface setting of the LCD and other system parameters can be set by pressing the button. . The scanning of the LCD is to ensure that the display does not appear to be noticeably interrupted, and that no blooming occurs, and an accurate error response can be performed in the presence of a blooming phenomenon. The button design does not use hardware interrupt for each button, because in this system, the priority of the LCD display driver is the highest in the application, the button uses a hardware external interrupt, and then the software is used to interrupt the button. Arrange, determine the software priority; another reason is that because there are more buttons, there is not enough hardware interrupt to set the button interrupt. If it is set to interrupt extension, in addition to hardware expansion, software expansion will be wasted, which will waste a lot of resources.
In this design, the LCD driver needs to write two files, one of which is a C language file and the other is a C language header file. The C language file is a communication interface protocol file and needs to exchange data with other modules. The header file is designed to design some basic LCD parameters, which are basically unchanged during system operation.
3.2 USB communication software design ideas
The USB communication software designed by this system is realized by interrupt response. The purpose of this is that the CPU can perform other work when there is no USB device or does not need a USB device, saving resources of the CPU and the operating system. It helps protect the CPU.
3.3 FLASH read and write operation software design ideas
The entire program file includes the chip erase, chip write and read, data validation and other parts. Erase is for the memory to be reused without replacing the chip; the writing and reading of the chip is the center of the entire file, responsible for writing the data of the memory, and reading the data when appropriate; the effect is to ensure the correct data. , an alarm is required when an error occurs.
In this design, the memory has three memory address entries, and all the data needs to go through the three address entries. Therefore, it must be ensured that the three address entries do not intersect with other addresses at any time.
3.4 μC/OS-II operating system migration
The μC/OS-II real-time operating system is a portable, curable, croppable and deprived multitasking real-time kernel (RTOS) suitable for use in a variety of microprocessors and microcontrollers. Its performance is comparable to that of a variety of commercial cores and performs better in some respects. All code is written in ANSI C language, so it has good portability.
Unlike other real-time operating systems, μC/OS-II provides a standard API function to the user. The developer uses the API functions provided by the operating system to develop the application. To develop an application on the μC/OS-II core, the program developer needs to build his own real-time operating system based on the real-time kernel. First, port μC/OS-II to its own hardware target board, write the corresponding driver and user graphical interface, etc.; above these interface functions, plus the user's own application, it constitutes the embedded software. .
The migration condition of μC/OS-II is: processor C compiler can generate reentrant code; processor supports interrupt and can generate timed interrupt; C language can be used to turn on and off interrupt; processor supports a certain amount of data The hardware stack is stored; the processor has five requirements for reading out the stack pointer and other CPU registers and saving the instructions to the stack or memory. The Philips LPC2292 chip and the ADS1.2 C compiler can meet the above five conditions, so this design is completely portable operating system to improve the system's functions.
The architecture of μC/OS-II software is shown in Figure 4:
Although most of the source code of μC/OS-II is written in C language, some code related to the processor must be implemented in assembly language. Register read and write can only be achieved through assembly language storage and load instructions.
To migrate μC/OS-II to a new architecture, you need to modify the following three files:
(1) c language header file OS-CPU.H;
(2) C language source file OS-CPU.C;
(3) Assemble the source file program OS-CPU-A.ASM.
4 Conclusion
The human physiological parameter monitoring system is implemented on a hardware platform based on the ARM7 microprocessor, and adopts the current popular μC/OS-II real-time multitasking operating system to detect the user's ECG, blood pressure, blood oxygen saturation and body temperature in real time. And it can be used for data analysis. When an abnormality occurs, the user can be automatically alerted to get timely treatment. The system has high scalability and can be directly extended on the system according to needs, so that it has a remote human physiological parameter monitor with GPS, GPRS and CDMA functions.
Our company specializes in the production and sales of all kinds of terminals, copper terminals, nose wire ears, cold pressed terminals, copper joints, but also according to customer requirements for customization and production, our raw materials are produced and sold by ourselves, we have their own raw materials processing plant, high purity T2 copper, quality and quantity, come to me to order it!
Cable Terminals
Taixing Longyi Terminals Co.,Ltd. , https://www.longyicopperlugs.com