Portable high-precision data acquisition system with LCD human-computer interaction function

Publisher:幸福之路Latest update time:2012-02-01 Source: 电子设计应用 Keywords:MSC1210Y5 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In many traditional industries, high-precision temperature data acquisition systems are indispensable. In recent years, with the continuous decline in the price of high-precision ADCs and the continuous improvement of their functions, it has become possible to develop inexpensive multi-channel, fast, and high-precision temperature acquisition systems. The MSC1210 microprocessor with a 24-bit ADC launched by Texas Instruments (TI) is particularly suitable for measuring weak signals output by high-precision temperature and pressure sensors. This paper uses MSC1210 as the core of measurement, signal processing, and communication, and designs a high-precision temperature acquisition system module. The system's measurement channels are easy to expand, the measurement accuracy is high, and high-precision data can be measured quickly.

System overall design

The hardware part of this system mainly consists of front-end data acquisition and processing circuits and back-end data processing and LCD circuits. The two parts communicate through the RS-232 serial interface. The overall scheme of the system is shown in Figure 1.


Figure 1 System overall structure

Software and hardware design of data acquisition part

Hardware circuit design

The core device of the data acquisition part is MSC1210Y5. This is mainly because the microprocessor has a 24-bit ADC, and its effective accuracy is higher than 22 bits. It contains a complete forward channel (including input buffer, analog switch circuit, programmable gain amplifier and ADC and digital filter part) and a backward channel - DAC, which are all necessary parts to complete the measurement and control system. In addition, the processor sets the internal channel function by changing the command register. The instructions can select the input buffer, set the amplification gain, control the channel switch switching, perform offset correction, etc., which is very convenient to use. The circuit structure schematic diagram of the data acquisition part is shown in Figure 2.

The two core chips MSC1210Y5 and MAX3223 in this system have very low power consumption. Therefore, in the design, the power supply (3.3V) on the board is provided by the back-end system through the RS-232 interface. In addition to the wiring of the RS-232 interface and the signal lines (8 AIN lines, REF and common ground) connected to the J1 and J2 sockets, the hardware part of this system does not need other connections, which is very convenient to use. In addition, a part of the interface lines are reserved in the circuit for future expansion of system functions, including the second serial port and four spare interface lines that can be configured as SPI interface, interrupt input and I/O port.

Figure 2 Data acquisition circuit structure schematic diagram

Software Design

In the application of high-precision temperature measurement module based on this circuit, MSC1210Y5 completes the functions of weak signal multi-channel switching, signal buffering, programming amplification, 24-bit ADC, digital filtering, data processing, signal calibration and serial communication. MSC1210Y5 contains 2 serial ports. One of the serial ports is selected in this design to communicate with the back-end human-computer interaction system, which is responsible for receiving the control commands and control parameters sent by the back-end and sending the data collected and processed by the front-end. The main tasks of the data acquisition circuit program are: controlling the measurement process of the internal ADC and reading the converted data; communicating with the back-end (S3C44B0X system), reading the commands and related control parameters of the host computer, and transmitting the converted data to the host computer. The program control flow of the data acquisition circuit is shown in Figure 3.

When the serial port starts to receive commands and data from the host computer, the control word of the 2-byte serial code (temporarily stored in R6, R7) of the back-end system is read in sequence and transmitted to the internal registers ADCON1 and ADCON0 of MSC1210Y5, thereby realizing the writing of ADC control commands. Subsequently, the corresponding commands and parameter values ​​are written into the internal registers of ADCON3, ADCON2, ADMUX and PDCON, thereby completing the setting and startup of the ADC in MSC1210Y5. When sending data to the back-end system, since the ADC is 24-bit precision, the conversion data must be divided into 3 bytes for transmission, that is, the ADC conversion results of registers 1, 2, and 3 are sent in sequence through SBUF. At the same time, this process also includes the sending of synchronization characters, CRC check and other processes.

Figure 3 Program control flow of data acquisition circuit

Overview of Embedded GUI Application System

The hardware part of the system backend is mainly composed of three major blocks: a system board with S3C44B0X as the core, an auxiliary board integrating JTAG debugging circuit, system power supply, LCD interface circuit, and LCD screen.

The back-end software also consists of three parts: system boot loader, embedded real-time multitasking operating system mC/OS-II, and applications based on mC/OS-II. According to the needs of system applications, the applications based on mC/OS-II mainly include serial port communication programs and graphical user interface programs based on mC/GUI.

The serial port in the system is used by the S3C44B0X controller to send control commands and control parameters to the front-end data acquisition part, and receive the collected data sent by the front end in real time, and send it to the controller for processing and LCD display. When the operating system mC/OS-II is started, the serial port is automatically initialized. Since the application is a multi-task system, in order to monitor the serial port information in real time, a serial port scanning task is opened in the system during design, so as to ensure that the information is not lost.

Since mC/GUI provides source code, when developing an application, users can first include the core files, LCD driver files and required font files in their own project, and then develop according to the actual needs of the hardware such as memory devices, input devices, space and window management. The development steps are as follows.

(1) Customize your own mC/GUI development environment according to actual needs. This includes filtering the mC/GUI directory and the files in the directory;
(2) Specify the address of the hardware device and write the interface driver code. Here you need to modify the LCDConf.h file;
(3) Compile, link, and debug the subroutine;
(4) Modify the subroutine and test it to add the required functions;
(5) If you develop a multi-tasking application, you need to modify the GUI_MAXTASK and GUI_OS macros to realize the integration of mC/GUI and the operating system;
(6) Write your own application.

Since mC/GUI does not support the ARM7 processor S3C44B0X, to port mC/GUI to the system platform, you need to complete various drivers of mC/GUI on the system hardware platform yourself, including the correct initialization of the built-in LCD controller in S3C44B0X, and the writing of LCD driver functions such as drawing dots, drawing lines, and filling.

LCD controller initialization: The correct initialization on the S3C44B0X LCD controller includes the correct configuration of various control registers and the correct setting and mapping of the video memory. The mapping of the video memory is to set the source address of the S3C44B0X dedicated LCD DMA to the video memory start address value, which is configured in rLCDSADDR1. In addition, the LCD controller also needs to program other programmable registers in REGBANK to control the corresponding register values ​​and determine the vertical/horizontal pixels, data width of the data interface, interface time and refresh rate, etc.

LCD driver function programming: In the LCD driver function, the lowest level driver functions are the point drawing function and the point fetching function. Displaying characters and graphics in mC/GUI is related to these two functions, which communicate directly with the video memory. In order to display characters and bitmaps, you must also refer to LCDMemC.c of uC/GUI, write DrawBitLine1BPP, DrawBitLine2BPP and DrawBitLine4BPP functions, and configure the constants in GUIConf.h and LCDConf.h. After completing the above driver functions, you can use the Demo program of mC/GUI to test the transplanted mC/GUI.

Conclusion

The high-precision data acquisition system developed using TI's microcontroller MSC1210Y5 has high acquisition accuracy and strong anti-interference ability. It has high application and promotion value.

Keywords:MSC1210Y5 Reference address:Portable high-precision data acquisition system with LCD human-computer interaction function

Previous article:Research and development of embedded systems based on ARM controller LPC2214
Next article:Design of intelligent traffic signal light system based on ARM

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号