Design of human-computer interface for medical data acquisition system based on ARM

Publisher:颐真阁Latest update time:2011-06-10 Keywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

0 Introduction

The medical data acquisition system can provide medical staff with first-hand data of patients in a timely and effective manner, which helps to strengthen the hospital's modern information management and improve work efficiency. In terms of home health care, it can meet people's needs to know the health status of themselves and their families in a fast-paced work and life in a timely and accurate manner. In the daily use of the equipment, a good human-machine interface design will also save a lot of time and provide great convenience for equipment users. This article mainly takes LM3S3748 as the core, uses TFT liquid crystal as the display device of the system, and uses touch screen and handle controller as the control device of the system, and introduces the design method of its human-machine interface.

1 System hardware design

The system human-machine interface mainly includes TFT liquid crystal, touch screen and handle controller, and its structural block diagram is shown in Figure 1. Among them, TFT liquid crystal has good brightness, high contrast, strong layering and bright colors. Therefore, without considering power consumption, TFT liquid crystal is a good choice. The touch screen uses the analog-to-digital conversion chip ADS7843 to sample the data of the touch screen, and then the sampled output value is calibrated to obtain the physical coordinates of the touch screen. The handle controller uses the Modbus protocol and controls the core board through the serial port.



1.1 Control Unit

The control unit of this system can use TI's LM3S3748, which supports the ARM Codex-M3 core with a main frequency of 50 MHz and 128 KByte FIASH, 64 KByte SRAM. At the same time, it integrates USB HOST/DEVICE/OTG, sleep module, orthogonal encoder, ADC, dead zone deletion, temperature sensor, analog comparator, UART, SSI, general timer, I2C, CCP, DMA controller and other peripherals. In addition, the chip also has a driver library solidified inside, which can better meet the system requirements.

1.2 LCD interface circuit

The LCD can use a 3.2-inch TFT (240×320) 260,000 color screen touch module, which supports SD card and DATAFLASH, and supports 16-bit/8-bit mode. The module can realize 180-degree arbitrary rotation of the display screen, and has a touch screen and touch control chip. The module defaults to i8080 16-bit parallel interface, and an 8-bit parallel interface mode can be selected. Its LCD interface circuit is shown in Figure 2.



1.3 Touch screen control

circuit The ADS7843 used in the touch screen control chip is a 4-wire resistive touch screen conversion interface chip produced by TI. It is a 12-bit sampling analog-to-digital converter with a synchronous serial interface. The ADS7843 has two auxiliary inputs (IN3, IN4) that can be set to 8-bit or 12-bit mode. [page]

ADS7843 can input the touch signal to the A/D converter by connecting the touch screen X+, turn on the Y+ and Y- drivers at the same time, and then digitize the voltage of X+ to obtain the measurement result of the current Y position. Similarly, the logical coordinates of the X coordinate can also be obtained. After obtaining the logical coordinates of X and Y, the data is transmitted to LM3S3748 through the SPI interface for data processing. The external circuit of ADS7843 is shown in Figure 3.



1.4 RS232 serial communication circuit

The RS232 serial port is mainly used for communication between the handle controller and the core board, which is similar to the keyboard interface in the human-machine interface. They communicate with each other through the Modbus protocol. The RS232 serial communication circuit is shown in Figure 4.



2 System software design

2.1 Touch screen software design

ADS7843 has two working modes, namely single-ended reference mode and differential reference mode. At the same time, it can also be selected for 12-bit or 8-bit conversion mode. This design uses the differential reference mode and 12-bit conversion mode, namely:

WriteCharTo7843 (0xD0); ∥ send control word 10010000,
that is, use differential mode + 12-bit conversion mode to read the X coordinate;
...
WriteCharTo7843 (0x90); ∥ send control word 11010000,
that is, use differential mode + 12-bit conversion mode to read the Y coordinate;


The CPU uses the interrupt mode to read the coordinates. When the screen is not touched, the pin PENIRQ of ADS7843 is a high-level output. When the screen is touched, the pin PENIRQ becomes a low-level output. Whenever the CPU detects the falling edge of this pin, the system enters the interrupt to read the coordinates. The process of reading the coordinate value is shown in Figure 5. When the CPU obtains the logical coordinates each time, it actually reads the X and Y coordinates 11 times respectively, and then stores the read logical coordinate values ​​into two arrays respectively, and then performs bubble sorting on the values ​​in the two arrays so that they are arranged in order from small to large. Then, the two largest and smallest values ​​are removed, and the middle value is used as the benchmark. The remaining values ​​are calculated by the absolute value of the difference with the benchmark value. A threshold value can be set in the design (this threshold value can be set to 5 according to the experiment). If the absolute value is greater than the threshold value, this value is discarded. Finally, the remaining values ​​are summed and averaged, and used as the final logical coordinate value. This is the function completed by "data processing" in the flowchart.



The main program flowchart of the system is shown in Figure 6. The touch screen calibration process adopts a more general calibration algorithm. Since resistive touch screens have a common feature that the voltage is linearly evenly distributed, the conversion between logical coordinates and physical coordinates can be realized by only finding the proportional coefficient between logical coordinates and physical coordinates. First, 5 physical coordinate points can be determined. They are displayed on the screen in turn with "+", and their coordinate values ​​are saved in the array Set_x[4] (taking the X coordinate as an example). The logical coordinate values ​​read during the calibration process are stored in the array Read_X[3]. Finally, the proportional coefficient between the logical coordinates and the physical coordinates is calculated:



K1=(Read_x[1]-Read_x[0])/Set_X[1]-Set_x[0]);

K2=(Read_X[3]-Read_X[2])/Set_X[3]-Set_x[2]);

KX=(K1+K2)/2; ∥Average the values ​​of the two operations to get the final X scale factor



After obtaining the scale factor, the fifth point is set as the reference point (Set_X[4]), so that the physical coordinates of any touch point can be obtained:

X=(ReadX-Read_X[5])/KX+Set_X[4];

Similarly, the physical coordinates of the Y axis can also be obtained.

2.2 Modbus communication protocol

This system uses Modbus as the communication protocol between the handle controller and the core board. Modbus communication uses master-slave technology, that is, only one device (master device) can initiate transmission (query), and other devices (slave devices) respond accordingly based on the data provided by the master device query. The message structure of the host query and the slave reply is shown in Figure 7. The master device can communicate with the slave device alone or with all slave devices in broadcast mode. If communicating alone, the slave device returns a message as a response; if it is queried in broadcast mode, no response is made. The Modbus protocol establishes a master device query format, including the device (or broadcast) address, function code, and all data error detection fields to be sent. The slave device response message is also composed of the Modbus protocol, including the field to confirm the action to be taken, any data to be returned, and the error detection field. If an error occurs during the message reception process, or the slave device cannot execute its command, then the slave device will create an error message and send it out as a response.



The Modbus protocol has two transmission modes, ASCII and RTU, but all devices on the same Modbus network must select the same transmission mode and serial port parameters. This design uses the RTU mode, that is, each 8-bit byte in the message contains two 4-bit hexadecimal characters, so at the same baud rate, more data can be transmitted than the ASCII mode. The message structure of the RTU mode is shown in Figure 8. When the handle controller detects that a key is pressed, the key code of the pressed key is sent to the core board through the serial port according to the structure of the RTU message frame. After the core board receives the information sent by the handle controller, it first performs a CRC check. After the check is correct, the core board will perform the corresponding operation according to the key code and respond to the handle controller. If the CRC check fails, the core board will respond to the handle controller with an error message. After completing one communication, the system will wait for the next communication.

3 Conclusion

The human-machine interface designed in this paper has been proven to be stable and reliable in communication and simple and convenient to operate through actual use, which can fully meet the requirements of the medical data acquisition system. In addition, the design has strong portability and can be improved according to the complexity of the system used. Therefore, it has a fairly wide range of uses.

Keywords:ARM Reference address:Design of human-computer interface for medical data acquisition system based on ARM

Previous article:FPGA driver design based on ARM9 and Linux
Next article:Design and implementation of high-definition digital set-top box software system based on ARM-Linux

Recommended ReadingLatest update time:2024-11-16 21:41

Intel X86 and ARM's battle for the "architecture king"
In 1968, Gordon Moore, Noyce and others who "left" Fairchild Semiconductor spent $15,000 to buy the right to use the Intel name from IN-TELCO, and Intel Corporation was officially born. Intel's development direction at the beginning was memory, and a new memory product code-named 3101 helped the company achieve profit
[Mobile phone portable]
Booting Linux under ARM - bootloader
       In order to start the Linux system on the ARM board, a small program called bootloader needs to be run before starting the kernel. The bootloader initializes various devices and then calls the kernel and passes it some parameters;        In short, the bootloader must complete the following functions:        (1)
[Microcontroller]
A brief discussion on the determining factors of different performance of ARM core MCU
Electronics Fan Network: This article briefly describes the main factors that determine the performance and power consumption of ARM core MCUs. After ARM launched the Cortex-M0+ core, its 32-bit MCU cores increased to 4. Not long ago, NXP also announced that it had obtained the Cortex-M0+ processor license, be
[Analog Electronics]
A brief discussion on the determining factors of different performance of ARM core MCU
WITTENSTEIN joins Arm Functional Safety Partner Program
WITTENSTEIN High Integrity Systems (WHIS) ​​and Arm have jointly announced the integration of WHIS into the Arm Functional Safety Partner Program. With WHIS joining the program, the two companies will collaborate to deliver highly optimized software packages for safety critical environments. According to WHIS, the c
[Embedded]
ARM-JTAG-SWD-schematic
[Microcontroller]
ARM-JTAG-SWD-schematic
ARM Notes: U-Boot Porting
U-Boot transplantation: System: Ubuntu 12.04 Development board: JZ2440 Virtual machine: VM10.04 U-Boot: U-BOOT-1.1.6 Steps: 1. Unzip U-BOOT-1.1.6 tar jxvf U-BOOT-1.1.6.tar.bz2 2. Support both S3C2410 and S3C2440: (1) Create a corresponding directory and file for the development board. In the board directory, copy smdk
[Microcontroller]
Detailed explanation of request_irq() and free_irq() in ARM interrupt implementation in Linux kernel
Definition of the Request_irq() call: int request_irq(unsigned int irq, void (*handler)(int irq, void *dev_id, struct pt_regs *regs), unsigned long irqflags, const char * devname, void *dev_id); irq is the hardware interrupt number to be requested. For specific values, see the blog post http://blog.csdn.net/song
[Microcontroller]
Design of airborne voice warning system based on ARM microprocessor
The aircraft voice warning system is an essential onboard equipment for new aircraft. Its function is to inform the pilot of the aircraft's current working status, dangerous conditions, or combat mission commands obtained through data links in real time by voice . During the flight of the aircraft, the pilot general
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号