Design of multi-parameter monitor based on bidirectional transparent serial port expansion technology

Publisher:sjjawx831Latest update time:2010-03-26 Keywords:Embedded Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The embedded multi-parameter monitoring system generally includes multiple independent hardware acquisition modules. Each hardware acquisition module completes the acquisition of physiological parameters such as human electrocardiogram, respiratory rate, body temperature, blood pressure and blood oxygen saturation, receives control information from the HOST end through its serial port, and sends the collected data to the HOST end at regular intervals.

The embedded multi-parameter monitor uses the AT91RM9200 processor on the HOST side, which has four universal synchronous/asynchronous receivers/transmitters (USARTs), one of which is a DEBUG serial port, but they are all time-division multiplexed [1]. In order for the HOST side to better communicate with each acquisition module, the problem of serial port expansion must be solved.

There are two common serial port expansion solutions. One is implemented through hardware, using a multi-serial port ARM/MCU or a dedicated serial port expansion chip. Available serial port expansion chips include the 16C55X series serial port expansion chips developed by TI and the GM812X series serial port expansion chips developed by Guoteng. TI's 16C55X series chips use parallel ports to expand serial ports. They are powerful and have high communication speeds, but they are complex to control and are expensive. They are mainly used for PC serial port expansion. The other serial port expansion solution is implemented through software, but there are disadvantages to using software to simulate serial ports: (1) The sampling frequency is low, generally only 2 times/bit, so the correctness of the data is difficult to guarantee; (2) High baud rate communication cannot be achieved. Software simulated serial ports generally cannot achieve baud rates higher than 4,800 b/s [2-3].

Regardless of whether hardware or software solutions are used, most serial port expansion products are almost one-way transmission and lack transparency [4-7]. Based on the needs of the multi-parameter monitor project in which we participated, this paper proposes a bidirectional transparent serial port expansion design solution, which has been verified by experiments.

1 Hardware Design

1.1 Serial port expansion module topology diagram

In the design, the serial port expansion module can be connected to 4 user devices. Each user device can perform bidirectional data transmission with the HOST end, using time-division multiplexing technology, that is, at any time, only one serial port is connected to the HOST end, and the serial port expansion module is responsible for switching/selecting the 4 channels. Both parties arbitrate through hardware and software mechanisms. As shown in Figure 1.

1.2 Hardware Design

The serial port expansion module mainly consists of two parts: the single-chip microcomputer AT89C2051 and the analog switch CD4052, a dual 4-channel analog switch.

The topological structure diagram of the serial port expansion module is shown in FIG2 , wherein the dotted frame is the main part of the serial port expansion module.

[page]

2 Communication Protocol Design

2.1 Data is sent from the user device to the HOST

Since each module is time-division multiplexed, in order to avoid competition between user devices, AT89C2051 is required to arbitrate the four user device channels. This article adopts the following solution.

Each of the four user devices is connected to the P1.0~P1.3 pins of AT89C2051 with an I/O port line, and is also connected to a 4-input NOR gate. One or several I/O port lines are set to a high level and pass through the 4-input NOR gate to trigger an interrupt, notifying AT89C2051 that a user device has requested to send data to the HOST terminal, and at the same time AT89C2051 queries the user device number. After receiving the request signal, AT89C2051 first determines whether the data transmission between the HOST terminal and other user devices has ended. If it has ended, according to the arbitration mechanism, the P1.4~P1.7 pins connected to each user device are set high to give a response signal. At the same time, AT89C2051 sets the P3.4 and P3.5 pins according to the user device number queried by the interrupt to control the CD4052 analog switch to select the corresponding channel. The user device starts to send data after receiving the response signal; if it has not ended, the interrupt is masked until the data transmission is completed. When the user device finishes sending data, an interrupt will be triggered through a 4-input NOR gate to notify the AT89C2051 that the data transmission is completed. When responding to data transmission requests, multiple user device requests will be involved, so the AT89C2051 needs to perform arbitration. The arbitration mechanism is as follows: the ECG and blood oxygen modules send data at a 50 ms interval, while the blood pressure module needs the HOST to send a start measurement command before sending blood pressure data to the HOST. Therefore, the request for the blood pressure module to send data needs to be set to a higher priority to ensure that the blood pressure data is correctly and timely sent to the HOST, while the ECG and blood oxygen modules are set to low priority and send in turn.

2.2 Data is sent from the HOST to the user device

In order to send the data from the HOST end to each user device in a timely and accurate manner, it is necessary to define a communication protocol between the HOST end and the AT89C2051. The protocol is as follows.

AT89C2051 always monitors the information sent by the HOST terminal. Once it receives the serial port selection command sent by the HOST terminal, as shown in Table 1, it immediately sets the P3.4 and P3.5 pins to control the CD4052 analog switch to select the corresponding channel and control the corresponding LED light for indication. After the serial port is selected, the HOST terminal needs to delay a certain time according to the AT89C2051 instruction execution and analog switch switching time before starting to send data/commands to the corresponding user device. When the HOST end sends data, the user device at the receiving end sends an interrupt end signal to AT89C2051, and its end processing is the same as the end processing of data sent from the user device to the HOST end. If a user device requests AT89C2051 to send data to the HOST end at the same time, the HOST end's request to send data/commands will be responded to first, that is, the HOST end's request to send data/commands has the highest priority.

In this design, the TXD pin of the HOST end is connected to the RXD pin of AT89C2051, so that the serial port receive interrupt of AT89C2051 can communicate with the HOST end. When the HOST end sends data/commands, it first sends the serial port selection command word, and then sends data/commands to control the data collection of the user device, such as the gain size, whether to start blood pressure measurement and other commands.

3. Software Design

The software design is divided into four parts: main function, serial port interrupt service routine, external interrupt 0 and 1 service routine, as shown in Figure 3.

In many cases, serial port expansion is required to meet the needs of system integration of multiple serial port devices. There are many expansion methods, each with its own advantages and disadvantages. The solution proposed in this paper is to use the single-chip microcomputer AT89C2051 to expand the serial port of AT91RM9200. It is based on the low price and small size of the single-chip microcomputer, which can completely replace the general dedicated interface chip. As a truly programmable interface, it can realize two-way communication and make the serial port expansion module transparent. This solution is flexible to use and has better applicability to external user devices than general interface chips. It has been verified by experiments that the design goal has been achieved. Using the single-chip microcomputer as an ordinary interface chip is a new idea with certain enlightenment and practical reference value.

Keywords:Embedded Reference address:Design of multi-parameter monitor based on bidirectional transparent serial port expansion technology

Previous article:Design of remote ECG medical signal monitoring system
Next article:Design of wireless multi-bed ECG monitor based on ARM9

Recommended ReadingLatest update time:2024-11-16 20:33

Interpretation of six major precautions for maintenance and care of LED displays
LED backlight LCD monitors have experienced a blowout development this year. The market has gradually become richer with LED backlight LCD monitors. Coupled with the continuous decline in prices, more and more consumers have turned their purchase targets to LED backlight products. However, with the
[Power Management]
LG releases new gaming monitor: 4K resolution supports AMD FreeSync
LG recently launched a new ultra-high-definition gaming monitor, model 32UN650-W, which is equipped with a 31.5-inch LG IPS display panel and supports 4K UHD resolution of 3840 x 2160 pixels. It also features up to 95% DCI-P3 wide color gamut, 1.07 billion colors, and HDR10 support. For gaming, this monitor suppor
[Mobile phone portable]
Design of Voice Fee Display Based on SST89V58 and ISD1760
0 Introduction The voice fee display is an electromechanical device used in ordinary and highway toll lanes to display information such as vehicle model and toll amount to vehicles and personnel who should pay. It is usually installed on the side of the entrance and exit of the toll lane, and can display vehicl
[Microcontroller]
Design of Voice Fee Display Based on SST89V58 and ISD1760
LG releases new UltraGear monitor: 34-inch ultra-wide curved screen priced at nearly 7,000 yuan
LG has launched a new gaming monitor under its UltraGear series. The UltraGear was announced at CES 2020 alongside the UltraWide and UltraFine Ergo monitors, and the device has the model number “34GP83-A”. The monitor is similar to the LG 27GN950-B released in July. This gaming monitor is equipped with a 34-inch ult
[Mobile phone portable]
How to implement stack protection in IAR Embedded Workbench development tools to improve code security
As more and more embedded products are connected to external networks, people are paying more and more attention to the information security of embedded products. This includes direct connection to external networks, such as through Wi-Fi connection, and indirect connection to external networks, such as the ECU in t
[Industrial Control]
How to implement stack protection in IAR Embedded Workbench development tools to improve code security
LCD display TTL interface LCD panel example
1. Single channel 6bit TTL interface LCD panel The single-channel TTL 6-bit interface is generally only used in small-size, low-resolution LCD panels. The following takes the 12.1-inch LCD panel LB12151-A2 produced by LO-PHILIPS as an example. LB121S1-A2 is a single-channel 6-bit TTL interface LCD panel wi
[Power Management]
LCD display TTL interface LCD panel example
Embedded Design Scheme for Displaying Characters and 65,536 Color Graphics on Liquid Crystal Display
     This paper introduces an embedded design scheme that uses a high-performance 8-bit single-chip microcomputer C8051F120 as the core processor to receive and process the operation information of the PC keyboard and touch screen, and convert it into dot matrix data that can be displayed on the liquid crystal display
[Microcontroller]
Embedded Design Scheme for Displaying Characters and 65,536 Color Graphics on Liquid Crystal Display
Latest Medical Electronics Articles
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号