WO2012000295A1 - Dual-mcu controlling multi-channel analog signal acquisition device - Google Patents

Dual-mcu controlling multi-channel analog signal acquisition device Download PDF

Info

Publication number
WO2012000295A1
WO2012000295A1 PCT/CN2010/080285 CN2010080285W WO2012000295A1 WO 2012000295 A1 WO2012000295 A1 WO 2012000295A1 CN 2010080285 W CN2010080285 W CN 2010080285W WO 2012000295 A1 WO2012000295 A1 WO 2012000295A1
Authority
WO
WIPO (PCT)
Prior art keywords
channel
pin
module
input
microcontroller module
Prior art date
Application number
PCT/CN2010/080285
Other languages
French (fr)
Chinese (zh)
Inventor
邱铁
夏锋
刘大伟
Original Assignee
大连理工大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 大连理工大学 filed Critical 大连理工大学
Publication of WO2012000295A1 publication Critical patent/WO2012000295A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03MCODING; DECODING; CODE CONVERSION IN GENERAL
    • H03M1/00Analogue/digital conversion; Digital/analogue conversion
    • H03M1/12Analogue/digital converters
    • H03M1/1205Multiplexed conversion systems
    • H03M1/121Interleaved, i.e. using multiple converters or converter parts for one channel
    • H03M1/1215Interleaved, i.e. using multiple converters or converter parts for one channel using time-division multiplexing

Definitions

  • Control multi-channel analog signal collector belongs to the field of electronic communication, especially involves high-speed variation of analog signal acquisition, and converts it into digital signal for transmission to MCU for processing.
  • A/D analog/digital converter
  • a bus data buffer As a bus data buffer, a CAN bus repeater control system is built, and the dual MCUs are queried by way of inquiry.
  • This document uses general-purpose input/output pins for associativity, but two MCUs Communication between the two MCUs can be affected by the interruption of communication.
  • the application number is 200710140206 and the notice number is 100553149.
  • the invention patent 'Digital Analog Converter and Conversion Method' has announced a digital-to-analog converter based on a single-channel conversion method that does not allow time-division high-speed acquisition and processing of multiple analog signals.
  • the technical problem to be solved by the present invention is that if a conventional signal acquisition method is adopted, multiple analog signals with high speed changes are collected, and the signal cannot be guaranteed to be undistorted. because, After A/D conversion, data is generally subjected to operations such as conversion, data processing, and storage. It is difficult to ensure the real-time performance of high-speed analog signal data acquisition.
  • the multi-channel high-speed analog signal collector is controlled by a hardware complex programmable logic device (hereinafter referred to as CPLD) as a high-speed switching device with multi-channel high-speed processing analog signals, dual MCU
  • CPLD hardware complex programmable logic device
  • the use of interrupt pin connection, flexible control multi-channel high-speed analog signal collector uses high-speed multi-channel switch to achieve time-sharing acquisition of analog signals, fast acquisition speed, to ensure real-time acquisition, to solve the problem of signal distortion.
  • the technical solution adopted by the invention is that the dual MCU controls the multi-channel analog signal collector by the first microcontroller module I and the second microcontroller module II , the first multi-channel A/D converter module III, the second multi-channel A/D converter module IV, the logic NOT gate 1 , the programmable multi-channel selector made with CPLD 2 , the first multi-channel analog input interface 3 and the second multi-channel analog input interface 4 is composed.
  • the data bus DB of III is connected to transmit data of an analog signal sampling point, the interrupt pin INT of the first multi-channel A/D converter module III and the first microcontroller module
  • the interrupt of the first pin INT1 of I is connected, and when the sampling of the first multi-channel A/D converter module III is completed, an interrupt signal is sent to the first microcontroller module I, requesting processing of data; the second microcontroller module II
  • the general-purpose input/output port 0 P0 is connected to the data bus DB of the second multi-channel A/D converter module IV for transmitting the data of the next sampling point of the analog signal, and the second multi-channel A/D converter module IV
  • the interrupt pin INT is connected to the interrupt pin 1 of the second microcontroller module II, INT1, when the second multi-channel A/D converter module IV is sampled, to the second microcontroller module.
  • the second microcontroller module II sends an interrupt signal, requests processing data; the first microcontroller module I's general-purpose input and output port 1 pin 1 is used as the contact signal and the second microcontroller module The II interrupt is connected to the 0th pin INT0, and the second microcontroller module II has the general-purpose input and output port 1 pin 1 as the contact signal and the first microcontroller module.
  • Interrupt 0 of the I pin is connected to INT0; the general-purpose I/O of the first microcontroller module I is connected to the input pin EN_IN of the logic NOT gate 1 as the 0th pin P1.0 of the logic NOT gate 1 Logic NOT gate 1 input signal; logic NOT gate 1 output pin EN_OUT is connected to programmable multi-channel selector 2 multiplex selection switching control pin SEL_SW; programmable multi-channel selector Switching status of 2 1 0th pin SW10 is connected to the analog signal input 0 channel CH0 of the first multi-channel A/D converter module III, and the switching status of the programmable multi-channel selector 2 1 1st pin SW11 is connected to the analog signal input 1 channel CH1 of the first multi-channel A/D converter module III; the switch status of the programmable multi-channel selector 2 2 0th pin SW20 is connected to analog signal input 0 channel CH0 of the second multi-channel A/D converter module IV, programmable multi-channel selector 2 switching state 2 pin 1 SW21 It is connected
  • SW0 is connected to SW10; SW1 is connected to SW11 1 SW0 is connected to SW20; SW1 is connected to SW21.
  • the effect of the invention is to use dual MCUs with A/D
  • the converter and programmable high-speed switch collect and process the data converted by the analog signal, and the multi-way selector made by the programmable logic device has novel structure, high switching speed and fast signal response.
  • Two MCUs Alternately collect and process analog signal data, no need to wait in time, and good real-time performance.
  • the two MCUs communicate with each other, the interface is flexible and convenient, easy to control and expand; has good maintainability, good economy and convenient manufacture. low cost.
  • Figure 1 shows the overall structure of a dual MCU control multichannel analog signal collector .
  • I first microcontroller module, II - second microcontroller module, III - first multi-channel A / D converter module, IV - second multi-channel A / D converter module, 1 - logic non Gate, 2 - Programmable Multi-Channel Selector, 3 - First Analog Input Interface, 4 - Second Analog Input Interface; INT0 - Interrupt 0th Pin, INT1 - Interrupt 1st Pin, INT - Interrupt Pin , P0 - general purpose input and output port 0, P1.0 - general purpose input and output port 1 pin 0, P1.1 - general purpose input and output port 1 pin 1, CH0 - analog signal input 0 channel, CH1 - Analog signal input 1 channel, EN_IN - input pin, EN_OUT - output pin, SEL_SW - multiplex selection switching control pin, SW10 - switch status 1 0th pin, SW11 - switch status 1 1st pin,
  • Figure 2 shows the software control flow of the dual MCU control multi-channel analog signal collector.
  • Dual MCU Control the connection relationship of the multi-channel analog signal collector circuit module, as shown in Figure 1 of the specification. After power-on, the dual MCU controls the software control flow of the multi-channel analog signal collector, as shown in Figure 2 of the specification. Shown.
  • the specific implementation is as follows:
  • Step 1 Define the variable SIG1-2 for the first microcontroller module I, set it to 1, and put the general input and output port 1 1 pin P1.1 is set to 1; variable SIG2-1 is defined for the second microcontroller module II to clear 0, and the general input and output port 1 pin P1.1 is set to 1 .
  • Step 2 The first microcontroller module I obtains the status information of the second microcontroller module II by interrupting the 0th pin INT0, and Determine if SIG1-2 is really equal to 1 . If SIG2-1 is equal to 1, go to the third step. Otherwise, loop in this step and continue to wait for the 0th pin from the interrupt.
  • the interrupt request occurs, and when the interrupt occurs, SIG1-2 is set; the second microcontroller module II acquires the state information of the first microcontroller module I by interrupting the 0th pin INT0, and Determine if SIG2-1 is equal to 1 . If SIG2-1 is equal to 1, go to step 6. Otherwise, loop in this step and continue waiting for interrupt 0 pin INT0.
  • the interrupt request occurs and SIG2-1 is set when the interrupt occurs.
  • Step 3 The first microcontroller module I clears the variable SIG1-2 to 0, and the general-purpose input and output port 1 pin 0 P1.0 is set to 1.
  • the programmable multi-channel selector 2 is controlled for multi-channel switching.
  • the programmable multi-channel selector 2 logic function truth table is as follows:
  • SW0 is connected to SW10; SW1 is connected to SW11 1 SW0 is connected to SW20; SW1 is connected to SW21.
  • the input pin EN_IN input of logic NOT 1 is 1 and the output pin EN_OUT The output is 0, clearing the multi-channel selection switching control pin SEL_SW of the programmable multi-channel selector 2 to switch the programmable multi-channel selector 2 to the first multi-channel A/D converter module.
  • the III is connected so that the first microcontroller module I is in the data acquisition state; at this time, the second microcontroller module II performs data processing.
  • Step 4 The first microcontroller module I performs data acquisition. During the acquisition process, it is judged whether the data acquisition is completed. If the acquisition is completed, The first multi-channel A/D converter module III interrupt pin INT triggers the first microcontroller module I interrupt pin 1 INT1, causing the first microcontroller module I to Interrupt the service and proceed to the fifth step. Otherwise, wait for the acquisition to complete in this step; at this time, the second microcontroller module II performs data processing or waits for data acquisition.
  • Step 5 The first microcontroller module I clears the general-purpose input and output port 1 pin 01.0 to 1.0, as shown in Figure 1 of the specification. As shown, when the input pin EN_IN input of logic NOT gate 1 is 0, the output pin EN_OUT output is 1 , which makes the programmable multi-channel selector 2 multiplex selection switching control pin. Set SEL_SW to 1 to switch programmable multi-channel selector 2 to the second multi-channel A/D converter module IV. The first microcontroller module I will be the general input and output port 1 first Pin P1.1 is cleared to 0. Triggering the second microcontroller module II interrupt. Bit 0 pin INT0 interrupt request occurs, setting SIG2-1 to 1.
  • Step 6 The second microcontroller module II clears the variable SIG1-2 to 0; at this time, the first microcontroller module I Perform data processing or wait for data collection.
  • Step 7 The second microcontroller module II performs data acquisition. During the acquisition process, it is judged whether the data acquisition is completed. If the acquisition is completed, Interrupt pin INT of the second multi-channel A/D converter module IV triggers the second pin of the second microcontroller module II, INT1, for the second microcontroller module II Interrupt the service, enter the eighth step of processing, otherwise wait for the acquisition to complete in this step.
  • Step 8 The second microcontroller module II clears the general-purpose input and output port 1 pin 1 to P1.1.
  • the first microcontroller module I interrupts the 0th pin INT0 interrupt request occurs, sets SIG1-2 to 1 and proceeds to the second step.
  • the dual MCU controls the multi-channel analog signal collector, the first microcontroller module I and the second microcontroller module II performs time-division alternate acquisition and processing of analog signals, and has strong adaptability to high-speed changing analog signals. It can acquire real-time acquisition of multi-channel input analog signals, using dual micro The controller, which collects and processes data, has a short delay time and high efficiency, and can adapt to the acquisition and processing of high-speed analog signals.
  • Programmable Multi-Channel Selector 2 Programmable with CPLD hardware for high switching speeds. Dual MCU With multi-channel A/D converter and programmable multi-channel selector device, it has strong scalability and is easy to transplant to other analog signal data acquisition devices.

Abstract

A dual-MCU controlling multi-channel analog signal acquisition device is composed of the following modules: the first microcontroller module, the second microcontroller module, the first multi-channel A/D converter module, the second multi-channel A/D converter module, logic not gate, programmable multi-channel selector composed of CPLD, the first multi-channel analog input interface and the second multi-channel analog input interface. The general input output P0 port of the first microcontroller module is connected to the data bus DB port of the first multi-channel A/D converter module. The INT pin of the first multi-channel A/D converter module is connected to the INTl pin of the first microcontroller module. The dual-MCU samples the analog signals alternatively with a good performance on real-time and maintainability.

Description

双 MCU 控制多通道高速模拟信号采集器 Dual MCU control multi-channel high-speed analog signal collector
技术领域 Technical field
本发明双微控制器(以下简称 MCU )控制多通道模拟信号采集器属于电子通信领域,特别涉及高速变化的模拟信号采集,并转换成数字信号传送给 MCU 进行处理。 Dual microcontroller of the present invention (hereinafter referred to as MCU) Control multi-channel analog signal collector belongs to the field of electronic communication, especially involves high-speed variation of analog signal acquisition, and converts it into digital signal for transmission to MCU for processing.
背景技术 Background technique
数字信号通信稳定、易于控制和处理,是当前应用最多的通信方式。随着信息技术的发展,越来越多的模拟信号需要转换成数字信号。对于一般的低速模拟信号,可以通过一个 MCU 控制一个模拟 / 数字转换器(以下简称 A/D )来实现,但是当模拟信号变化特别快时,很难保证所采集的模拟信号不失真,因此设计一款性能优越的高速模拟信号采集器就显得非常重要了。在文献《单片机与嵌入式系统应用》 2008 年第 9 期上,邱铁发表了'双 MCU 的 CAN 总线中继器设计',文中采用两片 AT89C51 作为主控制单元,以双口 RAM 作为总线数据缓冲区,搭建 CAN 总线中继器控制系统,双 MCU 采用查询的方式进行联络。该文献中采用通用输入 / 输出引脚进行相联,但是,两个 MCU 之间不能采用中断的方式进行通信联络,影响双 MCU 通信效率。申 请 号为 200710140206 ,公 告号为 100553149 的发明专利'数字模拟转换器及转换方法',公告了一种数字模拟转换器,是基于单路的转换方法而提出的,不能对多路模拟信号进行分时高速采集处理。 Digital signal communication is stable, easy to control and process, and is the most widely used communication method. With the development of information technology, more and more analog signals need to be converted into digital signals. For general low-speed analog signals, you can pass one The MCU controls an analog/digital converter (hereinafter referred to as A/D) ), but when the analog signal changes very fast, it is difficult to ensure that the acquired analog signal is not distorted, so it is very important to design a high-speed analog signal collector with superior performance. In the literature "Microcontroller and Embedded System Application" In the 9th issue of 2008, Qiu Tie published the 'Design of CAN Bus Repeater for Dual MCUs'. Two pieces of AT89C51 were used as the main control unit to double-port RAM. As a bus data buffer, a CAN bus repeater control system is built, and the dual MCUs are queried by way of inquiry. This document uses general-purpose input/output pins for associativity, but two MCUs Communication between the two MCUs can be affected by the interruption of communication. The application number is 200710140206 and the notice number is 100553149. The invention patent 'Digital Analog Converter and Conversion Method' has announced a digital-to-analog converter based on a single-channel conversion method that does not allow time-division high-speed acquisition and processing of multiple analog signals.
发明内容 Summary of the invention
本发明要解决的技术难题是如果采用传统的信号采集方法,采集多路高速变化的模拟信号,无法保证信号不失真。因为, A/D 转换后数据一般要进行换算、数据处理和存储等操作,很难保证高速变化的模拟信号数据采集的实时性。而本发明的双 MCU 控制多通道高速模拟信号采集器,是采用硬件复杂可编程逻辑器件(以下简称 CPLD )作为高速开关切换的带有多通道的高速处理模拟信号的装置,双 MCU 之间采用中断引脚相连接,灵活控制多通道高速模拟信号采集器采用高速多路开关来实现分时采集模拟信号,采集速度快,保证采集的实时性,解决了信号不失真问题。 The technical problem to be solved by the present invention is that if a conventional signal acquisition method is adopted, multiple analog signals with high speed changes are collected, and the signal cannot be guaranteed to be undistorted. because, After A/D conversion, data is generally subjected to operations such as conversion, data processing, and storage. It is difficult to ensure the real-time performance of high-speed analog signal data acquisition. And the dual MCU of the present invention The multi-channel high-speed analog signal collector is controlled by a hardware complex programmable logic device (hereinafter referred to as CPLD) as a high-speed switching device with multi-channel high-speed processing analog signals, dual MCU The use of interrupt pin connection, flexible control multi-channel high-speed analog signal collector uses high-speed multi-channel switch to achieve time-sharing acquisition of analog signals, fast acquisition speed, to ensure real-time acquisition, to solve the problem of signal distortion.
本发明采用的技术方案是双 MCU 控制多通道模拟信号采集器由第一微控制器模块 Ⅰ、 第二微控制器模块 Ⅱ ,第一多通道 A/D 转换器模块 Ⅲ ,第二多通道 A/D 转换器模块Ⅳ,逻辑非门 1 ,用 CPLD 制作的可编程多通道选择器 2 、第一多路模拟量输入接口 3 和第二多路模拟量输入接口 4 组成。 The technical solution adopted by the invention is that the dual MCU controls the multi-channel analog signal collector by the first microcontroller module I and the second microcontroller module II , the first multi-channel A/D converter module III, the second multi-channel A/D converter module IV, the logic NOT gate 1 , the programmable multi-channel selector made with CPLD 2 , the first multi-channel analog input interface 3 and the second multi-channel analog input interface 4 is composed.
第一微控制器模块 Ⅰ的 通用输入输出第 0 端口 P0 与 第一多通道 A/D 转换器模块 Ⅲ的数据总线DB相连用来传输一个模拟信号采样点的数据, 第一多通道 A/D 转换器模块 Ⅲ的中断引脚INT与 第一微控制器模块 Ⅰ的中断第1引脚INT1相连,当 第一多通道 A/D 转换器模块 Ⅲ采样完成后向 第一微控制器模块 Ⅰ发中断信号,请求处理数据; 第二微控制器模块 Ⅱ的 通用输入输出第 0 端口 P0 与 第二多通道 A/D 转换器模块Ⅳ 的数据总线DB相连用来传输模拟信号下一个采样点的数据, 第二多通道 A/D 转换器模块Ⅳ 的中断引脚INT与 第二微控制器模块 Ⅱ的中断第1引脚INT1相连,当 第二多通道 A/D 转换器模块Ⅳ 采样完成后向 第二微控制器模块 Ⅱ发中断信号,请求处理数据; 第一微控制器模块 Ⅰ的 通用输入输出第 1 端口第 1 引脚 P1.1 作为联络信号与 第二微控制器模块 Ⅱ的中断第0引脚INT0相连, 第二微控制器模块 Ⅱ的 通用输入输出第 1 端口第 1 引脚 P1.1 作为联络信号与 第一微控制器模块 Ⅰ的中断第0引脚INT0相连; 第一微控制器模块 Ⅰ的 通用输入输出第 1 端口第 0 引脚 P1.0 与逻辑非门 1 的输入引脚 EN_IN 相连, 作为 逻辑非门 1 的输入信号;逻辑非门 1 的输出引脚 EN_OUT 连接到可编程多通道选择器 2 的多路选择切换控制引脚 SEL_SW 上;可编程多通道选择器 2 的开关状态 1 第 0 引脚 SW10 与第一多通道 A/D 转换器模块 Ⅲ的 模拟信号输入 0 通道 CH0 相连,可编程多通道选择器 2 的开关状态 1 第 1 引脚 SW11 与第一多通道 A/D 转换器模块 Ⅲ的 模拟信号输入 1 通道 CH1 相连;可编程多通道选择器 2 的开关状态 2 第 0 引脚 SW20 与第二多通道 A/D 转换器模块Ⅳ 的 模拟信号输入 0 通道 CH0 相连,可编程多通道选择器 2 的开关状态 2 第 1 引脚 SW21 与第二多通道 A/D 转换器模块Ⅳ 的 模拟信号输入 1 通道 CH1 相连,用来实现多路模拟量的分时切换;可编程多通道选择器 2 的多通道选择器输入端第 0 引脚 SW0 与第一模拟量输入接口 3 的模拟量输入第 0 引脚 CH0_COM 相连,可编程多通道选择器 2 的多通道选择器输入端第 1 引脚 SW1 与第二模拟量输入接口 4 的模拟量输入第 1 引脚 CH1_COM 相连。 General-purpose input and output port 0 of the first microcontroller module I P0 and the first multi-channel A/D converter module The data bus DB of III is connected to transmit data of an analog signal sampling point, the interrupt pin INT of the first multi-channel A/D converter module III and the first microcontroller module The interrupt of the first pin INT1 of I is connected, and when the sampling of the first multi-channel A/D converter module III is completed, an interrupt signal is sent to the first microcontroller module I, requesting processing of data; the second microcontroller module II The general-purpose input/output port 0 P0 is connected to the data bus DB of the second multi-channel A/D converter module IV for transmitting the data of the next sampling point of the analog signal, and the second multi-channel A/D converter module IV The interrupt pin INT is connected to the interrupt pin 1 of the second microcontroller module II, INT1, when the second multi-channel A/D converter module IV is sampled, to the second microcontroller module. II sends an interrupt signal, requests processing data; the first microcontroller module I's general-purpose input and output port 1 pin 1 is used as the contact signal and the second microcontroller module The II interrupt is connected to the 0th pin INT0, and the second microcontroller module II has the general-purpose input and output port 1 pin 1 as the contact signal and the first microcontroller module. Interrupt 0 of the I pin is connected to INT0; the general-purpose I/O of the first microcontroller module I is connected to the input pin EN_IN of the logic NOT gate 1 as the 0th pin P1.0 of the logic NOT gate 1 Logic NOT gate 1 input signal; logic NOT gate 1 output pin EN_OUT is connected to programmable multi-channel selector 2 multiplex selection switching control pin SEL_SW; programmable multi-channel selector Switching status of 2 1 0th pin SW10 is connected to the analog signal input 0 channel CH0 of the first multi-channel A/D converter module III, and the switching status of the programmable multi-channel selector 2 1 1st pin SW11 is connected to the analog signal input 1 channel CH1 of the first multi-channel A/D converter module III; the switch status of the programmable multi-channel selector 2 2 0th pin SW20 is connected to analog signal input 0 channel CH0 of the second multi-channel A/D converter module IV, programmable multi-channel selector 2 switching state 2 pin 1 SW21 It is connected to the analog signal input 1 channel CH1 of the second multi-channel A/D converter module IV for time-division switching of multi-channel analog; multi-channel selector input of programmable multi-channel selector 2 is 0 Pin SW0 is connected to the analog input 0 pin CH0_COM of the first analog input interface 3, programmable multi-channel selector 2 multi-channel selector input pin 1 SW1 Connect to the analog input pin 1 of the second analog input terminal 4, CH1_COM.
用 CPLD 制作的可编程多通道选择器 2 逻辑功能真值表如下: Programmable Multi-Channel Selector made with CPLD 2 The logic function truth table is as follows:
SEL_SW 引脚状态 SEL_SW pin status 多通道选择功能描述 Multi-channel selection function description
0 0 SW0 与 SW10 相连接; SW1 与 SW11 相连接 SW0 is connected to SW10; SW1 is connected to SW11
1 1 SW0 与 SW20 相连接; SW1 与 SW21 相连接 SW0 is connected to SW20; SW1 is connected to SW21.
本发明 的效果是 采用 双 MCU 配合 A/D 转换器和可编程高速开关进行采集和处理模拟信号所转换的数据,用可编程逻辑器件制作的多路选择器,结 构新颖、切换速度高,信号响应快。两个 MCU 交替采集和处理模拟信号数据,在时间上无需等待,实时性好 。双 MCU 相互间通信, 接口灵活方便,易与控制和扩展;具有良好的可维护,较好的经济性,制造方便 , 成本低。 The effect of the invention is to use dual MCUs with A/D The converter and programmable high-speed switch collect and process the data converted by the analog signal, and the multi-way selector made by the programmable logic device has novel structure, high switching speed and fast signal response. Two MCUs Alternately collect and process analog signal data, no need to wait in time, and good real-time performance. The two MCUs communicate with each other, the interface is flexible and convenient, easy to control and expand; has good maintainability, good economy and convenient manufacture. low cost.
附图说明 DRAWINGS
图 1 为 双 MCU 控制多通道模拟信号采集器的总体结构图其中, Ⅰ -第一微控制器模块, Ⅱ -第二微控制器模块, Ⅲ -第一多通道 A/D 转换器模块,Ⅳ-第二多通道 A/D 转换器模块, 1 -逻辑非门, 2 -可编程多通道选择器, 3 -第一模拟量输入接口, 4 -第二模拟量输入接口; INT0 -中断第 0 引脚, INT1 -中断第 1 引脚, INT -中断引脚, P0 -通用输入输出第 0 端口, P1.0 -通用输入输出第 1 端口第 0 引脚, P1.1 -通用输入输出第 1 端口第 1 引脚, CH0 -模拟信号输入 0 通道, CH1 -模拟信号输入 1 通道, EN_IN -输入引脚, EN_OUT -输出引脚, SEL_SW -多路选择切换控制引脚, SW10 -开关状态 1 第 0 引脚, SW11 -开关状态 1 第 1 引脚, SW20 -开关状态 2 第 0 引脚, SW21 -开关状态 2 第 1 引脚, SW0 -多通道选择器输入端第 0 引脚, SW1 -多通道选择器输入端第 1 引脚, CH0_COM -模拟量输入第 0 引脚, CH1_COM -模拟量输入第 1 引脚。Figure 1 shows the overall structure of a dual MCU control multichannel analog signal collector . Among them, I - first microcontroller module, II - second microcontroller module, III - first multi-channel A / D converter module, IV - second multi-channel A / D converter module, 1 - logic non Gate, 2 - Programmable Multi-Channel Selector, 3 - First Analog Input Interface, 4 - Second Analog Input Interface; INT0 - Interrupt 0th Pin, INT1 - Interrupt 1st Pin, INT - Interrupt Pin , P0 - general purpose input and output port 0, P1.0 - general purpose input and output port 1 pin 0, P1.1 - general purpose input and output port 1 pin 1, CH0 - analog signal input 0 channel, CH1 - Analog signal input 1 channel, EN_IN - input pin, EN_OUT - output pin, SEL_SW - multiplex selection switching control pin, SW10 - switch status 1 0th pin, SW11 - switch status 1 1st pin, SW20 - Switch Status 2 0th Pin, SW21 - Switch Status 2 1st Pin, SW0 - Multichannel Selector Input 0th Pin, SW1 - Multichannel Selector Input 1st Pin, CH0_COM - Analog Input 0 pin, CH1_COM - Analog input pin 1.
图 2 为双 MCU 控制多通道模拟信号采集器软件控制流程图。 Figure 2 shows the software control flow of the dual MCU control multi-channel analog signal collector.
具体实施方式 detailed description
下面结合说明书附图和技术方案详细说明本发明的具体实施方式: 双 MCU 控制多通道模拟信号采集器电路模块连接关系,如说明书附图 1 所示。 上电后, 双 MCU 控制多通道模拟信号采集器软件控制流程,如说明书附图 2 所示。具体实现如下: The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings and technical solutions: Dual MCU Control the connection relationship of the multi-channel analog signal collector circuit module, as shown in Figure 1 of the specification. After power-on, the dual MCU controls the software control flow of the multi-channel analog signal collector, as shown in Figure 2 of the specification. Shown. The specific implementation is as follows:
第一步:对第一微控制器模块 Ⅰ定义 变量 SIG1-2 ,使其置 1 ,并将 通用输入输出第 1 端口第 1 引脚 P1.1 置 1 ;对第二微控制器模块 Ⅱ定义 变量 SIG2-1 ,使其 清 0 ,并将 通用输入输出第 1 端口第 1 引脚 P1.1 置 1 。 Step 1: Define the variable SIG1-2 for the first microcontroller module I, set it to 1, and put the general input and output port 1 1 pin P1.1 is set to 1; variable SIG2-1 is defined for the second microcontroller module II to clear 0, and the general input and output port 1 pin P1.1 is set to 1 .
第二步:第一微控制器模块 Ⅰ通过 中断第 0 引脚 INT0 来 获取 第二微控制器模块 Ⅱ的状态信息,并 判断 SIG1-2 是否真等于 1 ,如果 SIG2-1 等于 1 ,则进入第三步,否则在本步中循环,继续等待来自 中断第 0 引脚 INT0 的中断请求发生,当中断发生时,将 SIG1-2 置 1 ; 第二微控制器模块 Ⅱ通过 中断第 0 引脚 INT0 来 获取 第一微控制器模块 Ⅰ的状态信息,并 判断 SIG2-1 是否真等于 1 ,如果 SIG2-1 等于 1 ,则进入第六步,否则在本步中循环,继续等待来自 中断第 0 引脚 INT0 的中断请求发生,当中断发生时,将 SIG2-1 置 1 。 Step 2: The first microcontroller module I obtains the status information of the second microcontroller module II by interrupting the 0th pin INT0, and Determine if SIG1-2 is really equal to 1 . If SIG2-1 is equal to 1, go to the third step. Otherwise, loop in this step and continue to wait for the 0th pin from the interrupt. The interrupt request occurs, and when the interrupt occurs, SIG1-2 is set; the second microcontroller module II acquires the state information of the first microcontroller module I by interrupting the 0th pin INT0, and Determine if SIG2-1 is equal to 1 . If SIG2-1 is equal to 1, go to step 6. Otherwise, loop in this step and continue waiting for interrupt 0 pin INT0. The interrupt request occurs and SIG2-1 is set when the interrupt occurs.
第三步:第一微控制器模块 Ⅰ将变量 SIG1-2 清 0 ,同时将 通用输入输出第 1 端口第 0 引脚 P1.0 置 1 。并对可编程多通道选择器 2 进行控制多通道切换,可编程多通道选择器 2 逻辑功能真值表如下: Step 3: The first microcontroller module I clears the variable SIG1-2 to 0, and the general-purpose input and output port 1 pin 0 P1.0 is set to 1. The programmable multi-channel selector 2 is controlled for multi-channel switching. The programmable multi-channel selector 2 logic function truth table is as follows:
SEL_SW 引脚状态 SEL_SW pin status 多通道选择功能描述 Multi-channel selection function description
0 0 SW0 与 SW10 相连接; SW1 与 SW11 相连接 SW0 is connected to SW10; SW1 is connected to SW11
1 1 SW0 与 SW20 相连接; SW1 与 SW21 相连接 SW0 is connected to SW20; SW1 is connected to SW21.
如说明书附图 1 所示,此时逻辑非门 1 的输入引脚 EN_IN 输入为 1 , 则输出引脚 EN_OUT 输出为 0 ,使可编程多通道选择器 2 的多路选择切换控制引脚 SEL_SW 清 0 , 将 可编程多通道选择器 2 切换到与第一多通道 A/D 转换器模块 Ⅲ相连,使 第一微控制器模块 Ⅰ处于数据采集状态;此时 第二微控制器模块 Ⅱ进行数据处理。 As shown in Figure 1 of the specification, the input pin EN_IN input of logic NOT 1 is 1 and the output pin EN_OUT The output is 0, clearing the multi-channel selection switching control pin SEL_SW of the programmable multi-channel selector 2 to switch the programmable multi-channel selector 2 to the first multi-channel A/D converter module. The III is connected so that the first microcontroller module I is in the data acquisition state; at this time, the second microcontroller module II performs data processing.
第四步:第一微控制器模块 Ⅰ 进行数据采集,采集过程中要判断数据采集是否完成,如果采集完成,则由 第一多通道 A/D 转换器模块 Ⅲ的 中断引脚 INT 触发 第一微控制器模块 Ⅰ的 中断第 1 引脚 INT1 ,使 第一微控制器模块 Ⅰ进行 中断服务,并进入第五步处理,否则在本步中等待采集完成; 此时 第二微控制器模块 Ⅱ进行数据处理或等待数据采集。 Step 4: The first microcontroller module I performs data acquisition. During the acquisition process, it is judged whether the data acquisition is completed. If the acquisition is completed, The first multi-channel A/D converter module III interrupt pin INT triggers the first microcontroller module I interrupt pin 1 INT1, causing the first microcontroller module I to Interrupt the service and proceed to the fifth step. Otherwise, wait for the acquisition to complete in this step; at this time, the second microcontroller module II performs data processing or waits for data acquisition.
第五步:第一微控制器模块Ⅰ将通用输入输出第 1 端口第 0 引脚 P1.0 清 0 ,如说明书附图 1 所示,此时逻辑非门 1 的输入引脚 EN_IN 输入为 0 ,则输出引脚 EN_OUT 输出为 1 ,使可编程多通道选择器 2 的多路选择切换控制引脚 SEL_SW 置 1 , 将 可编程多通道选择器 2 切换到与第二多通道 A/D 转换器模块Ⅳ 相连。 第一微控制器模块Ⅰ将通用输入输出第 1 端口第 1 引脚 P1.1 清 0 , 触发 第二微控制器模块 Ⅱ的 中断第 0 引脚 INT0 的中断请求发生,将 SIG2-1 置 1 。 Step 5: The first microcontroller module I clears the general-purpose input and output port 1 pin 01.0 to 1.0, as shown in Figure 1 of the specification. As shown, when the input pin EN_IN input of logic NOT gate 1 is 0, the output pin EN_OUT output is 1 , which makes the programmable multi-channel selector 2 multiplex selection switching control pin. Set SEL_SW to 1 to switch programmable multi-channel selector 2 to the second multi-channel A/D converter module IV. The first microcontroller module I will be the general input and output port 1 first Pin P1.1 is cleared to 0. Triggering the second microcontroller module II interrupt. Bit 0 pin INT0 interrupt request occurs, setting SIG2-1 to 1.
第六步:第二微控制器模块 Ⅱ将变量 SIG1-2 清 0 ; 此时 第一微控制器模块Ⅰ 进行数据处理或等待数据采集 。 Step 6: The second microcontroller module II clears the variable SIG1-2 to 0; at this time, the first microcontroller module I Perform data processing or wait for data collection.
第七步:第二微控制器模块 Ⅱ 进行数据采集,采集过程中要判断数据采集是否完成,如果采集完成,则由 第二多通道 A/D 转换器模块Ⅳ 的 中断引脚 INT 触发 第二微控制器模块 Ⅱ的 中断第 1 引脚 INT1 ,使 第二微控制器模块 Ⅱ进行 中断服务,进入第八步处理,否则在本步中等待采集完成 。 Step 7: The second microcontroller module II performs data acquisition. During the acquisition process, it is judged whether the data acquisition is completed. If the acquisition is completed, Interrupt pin INT of the second multi-channel A/D converter module IV triggers the second pin of the second microcontroller module II, INT1, for the second microcontroller module II Interrupt the service, enter the eighth step of processing, otherwise wait for the acquisition to complete in this step.
第八步:第二微控制器模块 Ⅱ 将通用输入输出第 1 端口第 1 引脚 P1.1 清 0 , 触发 第一微控制器模块Ⅰ 的 中断第 0 引脚 INT0 的中断请求发生,将 SIG1-2 置 1 ,进入第二步处理。 Step 8: The second microcontroller module II clears the general-purpose input and output port 1 pin 1 to P1.1. The first microcontroller module I interrupts the 0th pin INT0 interrupt request occurs, sets SIG1-2 to 1 and proceeds to the second step.
本发明 双 MCU 控制多通道模拟信号采集器,第一微控制器模块Ⅰ和第二微控制器模块 Ⅱ进行分时交替采集和处理模拟信号,对高速变化的模拟信号适应能力强,可以对多通道输入的模拟信号进行实时采集,采用双微 控制器,采集和处理数据延迟时间短,效率高,能够适应高速模拟信号的采集和处理。可编程多通道选择器 2 采用 CPLD 硬件可编程制作,切换速度高。双 MCU 配合多通道 A/D 转换器和可编程多通道选择器装置,具有很强的扩展性强,便于移植到其他模拟信号数据采集装置中。 The dual MCU controls the multi-channel analog signal collector, the first microcontroller module I and the second microcontroller module II performs time-division alternate acquisition and processing of analog signals, and has strong adaptability to high-speed changing analog signals. It can acquire real-time acquisition of multi-channel input analog signals, using dual micro The controller, which collects and processes data, has a short delay time and high efficiency, and can adapt to the acquisition and processing of high-speed analog signals. Programmable Multi-Channel Selector 2 Programmable with CPLD hardware for high switching speeds. Dual MCU With multi-channel A/D converter and programmable multi-channel selector device, it has strong scalability and is easy to transplant to other analog signal data acquisition devices.

Claims (1)

1 、双 MCU 控制多通道模拟信号采集器, 其特征是, 双 MCU 控制多通道模拟信号采集器由第一微控制器模块( Ⅰ)、 第二微控制器模块( Ⅱ) ,第一多通道 A/D 转换器模块( Ⅲ) ,第二多通道 A/D 转换器模块(Ⅳ),逻辑非门( 1 ),用 CPLD 制作的可编程多通道选择器( 2 )、第一多路模拟量输入接口( 3 )和第二多路模拟量输入接口( 4 )组成;1. The dual MCU controls the multi-channel analog signal collector, wherein the dual MCU controls the multi-channel analog signal collector by the first microcontroller module (I), Second microcontroller module (II), first multi-channel A/D converter module (III), second multi-channel A/D converter module (IV), logic NOT gate (1), CPLD The programmable multi-channel selector (2), the first multi-channel analog input interface (3) and the second multi-channel analog input interface (4) are formed;
第一微控制器模块( Ⅰ)的 通用输入输出第 0 端口 P0 与 第一多通道 A/D 转换器模块( Ⅲ)的数据总线DB相连, 第一多通道 A/D 转换器模块( Ⅲ)的中断引脚INT与 第一微控制器模块( Ⅰ)的中断第1引脚INT1相连; 第二微控制器模块( Ⅱ)的 通用输入输出第 0 端口 P0 与 第二多通道 A/D 转换器模块(Ⅳ) 的数据总线DB相连, 第二多通道 A/D 转换器模块(Ⅳ) 的中断引脚INT与 第二微控制器模块( Ⅱ)的中断第1引脚INT1相连; 第一微控制器模块( Ⅰ)的 通用输入输出第 1 端口第 1 引脚 P1.1 作为联络信号与 第二微控制器模块( Ⅱ)的中断第0引脚INT0相连, 第二微控制器模块( Ⅱ)的 通用输入输出第 1 端口第 1 引脚 P1.1 作为联络信号与 第一微控制器模块( Ⅰ)的中断第0引脚INT0相连; 第一微控制器模块( Ⅰ)的 通用输入输出第 1 端口第 0 引脚 P1.0 与逻辑非门( 1 )的输入引脚 EN_IN 相连, 作为 逻辑非门( 1 )的输入控制信号;逻辑非门( 1 )的输出引脚 EN_OUT 连接到可编程多通道选择器( 2 )的多路选择切换控制引脚 SEL_SW 上;可编程多通道选择器( 2 )的开关状态 1 第 0 引脚 SW10 与第一多通道 A/D 转换器模块( Ⅲ)的 模拟信号输入 0 通道 CH0 相连,可编程多通道选择器( 2 )的开关状态 1 第 1 引脚 SW11 与第一多通道 A/D 转换器模块( Ⅲ)的 模拟信号输入 1 通道 CH1 相连;可编程多通道选择器( 2 )的开关状态 2 第 0 引脚 SW20 与第二多通道 A/D 转换器模块(Ⅳ) 的 模拟信号输入 0 通道 CH0 相连,可编程多通道选择器( 2 )的开关状态 2 第 1 引脚 SW21 与第二多通道 A/D 转换器模块(Ⅳ) 的 模拟信号输入 1 通道 CH1 相连;可编程多通道选择器( 2 )的多通道选择器输入端第 0 引脚 SW0 与第一模拟量输入接口( 3 )的模拟量输入第 0 引脚 CH0_COM 相连,可编程多通道选择器( 2 )的多通道选择器输入端第 1 引脚 SW1 与第二模拟量输入接口( 4 )的模拟量输入第 1 引脚 CH1_COM 相连。The general-purpose input/output port 0 of the first microcontroller module (I) is connected to the data bus DB of the first multi-channel A/D converter module (III). The interrupt pin INT of the first multi-channel A/D converter module (III) is connected to the interrupt pin 1 of the first microcontroller module (I), INT1; the general-purpose input and output of the second microcontroller module (II) 0th Port P0 is connected to the data bus DB of the second multi-channel A/D converter module (IV), and the interrupt pin INT of the second multi-channel A/D converter module (IV) is connected to the second microcontroller module ( II) Interrupt pin 1 is connected to INT1; the first microcontroller module (I) is general-purpose I/O port 1 pin P1.1 as the contact signal and the second microcontroller module ( II) Interrupt pin 0 is connected to INT0, and the second microcontroller module (II) is general-purpose I/O port 1 pin P1.1 as the contact signal and the first microcontroller module ( I) interrupt is connected to pin 0 of INT0; the first microcontroller module (I) is general-purpose input and output port 1 bit 0 pin P1.0 and logic NOT gate (1) input pin EN_IN Connected as the input control signal of the logic NOT gate (1); the output pin EN_OUT of the logic NOT gate (1) is connected to the multi-selection switching control pin of the programmable multi-channel selector (2) SEL_SW; switch state of programmable multi-channel selector ( 2 ) 1 0 pin SW10 and analog input of the first multi-channel A/D converter module ( III) 0 channel CH0 is connected, the switch status of the programmable multi-channel selector ( 2 ) 1 1st pin SW11 and the analog input of the first multi-channel A/D converter module ( III) 1 channel CH1 Connected; programmable multi-channel selector (2) switch status 2 0th pin SW20 and 2nd multi-channel A/D converter module (IV) analog signal input 0 channel CH0 Connected, programmable multi-channel selector (2) switch status 2 1st pin SW21 and 2nd multi-channel A/D converter module (IV) analog signal input 1 channel CH1 Connected; programmable multi-channel selector (2) multi-channel selector input 0 pin SW0 and first analog input interface (3) analog input 0th pin CH0_COM Connected, programmable multi-channel selector (2) multi-channel selector input 1st pin SW1 and 2nd analog input interface (4) analog input 1st pin CH1_COM Connected.
PCT/CN2010/080285 2010-06-30 2010-12-27 Dual-mcu controlling multi-channel analog signal acquisition device WO2012000295A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2010102170511 2010-06-30
CN2010102170511A CN101908885A (en) 2010-06-30 2010-06-30 Dual-MCU control multichannel high speed analog signal collector

Publications (1)

Publication Number Publication Date
WO2012000295A1 true WO2012000295A1 (en) 2012-01-05

Family

ID=43264223

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/080285 WO2012000295A1 (en) 2010-06-30 2010-12-27 Dual-mcu controlling multi-channel analog signal acquisition device

Country Status (2)

Country Link
CN (1) CN101908885A (en)
WO (1) WO2012000295A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106681240A (en) * 2017-03-16 2017-05-17 安庆师范大学 Multi-channel data acquisition system based on Modbus
CN113311222A (en) * 2021-05-21 2021-08-27 中国科学院微小卫星创新研究院 Satellite analog signal acquisition system

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101908885A (en) * 2010-06-30 2010-12-08 大连理工大学 Dual-MCU control multichannel high speed analog signal collector
CN104077892A (en) * 2014-07-24 2014-10-01 刘振鹏 Household gas monitoring device
CN108036872A (en) * 2017-11-23 2018-05-15 中国航空工业集团公司西安航空计算技术研究所 A kind of multi-channel high-accuracy temperature acquisition method
CN111726052A (en) * 2019-03-20 2020-09-29 广东美的制冷设备有限公司 Drive control circuit and air conditioner

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5930737A (en) * 1996-12-26 1999-07-27 Ando Electric Co., Ltd. Measurement system using double CPU modules for human machine interface control and measurement module control
US6981176B2 (en) * 1999-05-10 2005-12-27 Delphi Technologies, Inc. Secured microcontroller architecture
CN2779518Y (en) * 2004-12-13 2006-05-10 中国农业大学 Multi-functional data collector
CN101119117A (en) * 2006-08-03 2008-02-06 联发科技股份有限公司 Digital to analog converter and conversion method
CN101469990A (en) * 2008-09-11 2009-07-01 哈尔滨工程大学 Dual-CPU embedded navigation computer
CN101908885A (en) * 2010-06-30 2010-12-08 大连理工大学 Dual-MCU control multichannel high speed analog signal collector

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101692606A (en) * 2009-10-16 2010-04-07 北京联合大学生物化学工程学院 Serial A/D converter circuit shared by two singlechips
CN101718562B (en) * 2009-11-20 2011-04-20 电子科技大学 Method for real-time correcting error of multi-channel high-speed parallel alternative acquisition system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5930737A (en) * 1996-12-26 1999-07-27 Ando Electric Co., Ltd. Measurement system using double CPU modules for human machine interface control and measurement module control
US6981176B2 (en) * 1999-05-10 2005-12-27 Delphi Technologies, Inc. Secured microcontroller architecture
CN2779518Y (en) * 2004-12-13 2006-05-10 中国农业大学 Multi-functional data collector
CN101119117A (en) * 2006-08-03 2008-02-06 联发科技股份有限公司 Digital to analog converter and conversion method
CN101469990A (en) * 2008-09-11 2009-07-01 哈尔滨工程大学 Dual-CPU embedded navigation computer
CN101908885A (en) * 2010-06-30 2010-12-08 大连理工大学 Dual-MCU control multichannel high speed analog signal collector

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
QIU,TIE ET AL.: "DESIGN OF DUAL-MCU BASED CAN BUS RELAYER", MICROCONTROLLER & EMBEDDED SYSTEMS, no. 9, 30 September 2008 (2008-09-30), pages 71 - 73 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106681240A (en) * 2017-03-16 2017-05-17 安庆师范大学 Multi-channel data acquisition system based on Modbus
CN113311222A (en) * 2021-05-21 2021-08-27 中国科学院微小卫星创新研究院 Satellite analog signal acquisition system

Also Published As

Publication number Publication date
CN101908885A (en) 2010-12-08

Similar Documents

Publication Publication Date Title
WO2012000295A1 (en) Dual-mcu controlling multi-channel analog signal acquisition device
CN104020691B (en) It is applicable to the signals collecting board of multibus agreement, many expansion interfaces
JPS5474311A (en) Key telephone switching system
CN101969378B (en) Switchboard based extensible DSPEED-DSP (Digital Signal Processor)_Q6474 signal processing board
CN108667706B (en) Ethernet serial server with dynamically adjustable serial number and data transmission method thereof
CN115509970A (en) FPGA multichannel high-speed signal acquisition and processing module
CN111106841A (en) 5G signal processing device of multichannel high rate
CN202563495U (en) Direct memory access (DMA) transmission device
CN212660229U (en) Matrix switching device and audio and video matrix intercommunication system
CN206258865U (en) A kind of signal processor ASIC frameworks of restructural
CN102202431B (en) Increase the apparatus and method of 3G communication module and Application Processor Interface flexibility
CN210666764U (en) Communication equipment and communication device based on I3C bus
CN103647573B (en) Multichannel ADC synchronized sampling intermediate-frequency receiver
CN201374716Y (en) Exchange device based on PCI-E bus communication
CN202524481U (en) Micro multi-channel wireless image audio transmission system
CN205427839U (en) Computer USB interface data collection system
WO2014206181A1 (en) Patent monitor and multi-mcu memory data exchange device for same
CN110166051A (en) The multi-channel sampling method of multi-sampling circuit, infrared touch frame and infrared touch frame
CN215678546U (en) Distributed multi-channel voltage detection device
CN214376919U (en) Multi-channel analog signal collector and bus type multi-channel analog signal collector
JPS58168129A (en) Bus coupling system
JP2564550B2 (en) Integrated exchange
CN201041694Y (en) Intelligent house controller
CN1251104C (en) Buses between control chip groups and arbitration methods
CN216561775U (en) Equipment system for realizing PC control MCU low-speed IO by using UART

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10853998

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10853998

Country of ref document: EP

Kind code of ref document: A1