Data system using daisy chain and multiplexer and acquisition method thereof
By connecting several chips on the daisy chain and using multiplexers, the problem of insufficient number of chip sampling channels in the prior art is solved, efficient data acquisition and integration is achieved, and the efficiency and accuracy of data processing are improved.
Patent Information
- Application Number
- CN202510597757.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-09-05
AI Technical Summary
In the prior art, multiplexers have problems in register data acquisition where the chip sampling channel is insufficient in the register data collection, and it is impossible to efficiently collect and integrate sufficient number of register data.
A daisy-chain topology is used to connect several chips, and a multiplexer (such as TMUX4051 or TMUX4052) is used to connect the chip and data registers. The number of output terminals of the multiplexer is greater than the number of sampling target channels of the data register, and the number of input terminals is greater than the number of sampling channels of the chip. The efficient transmission and integration of data is achieved through dynamic switching.
It realizes efficient connection between the sampling chip on the daisy chain and the multiplexer, improves the processing efficiency and accuracy of data acquisition, and dynamically adjusts the data flow direction to achieve efficient transmission and integration.
Smart Images

Figure CN120596414A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of chip data acquisition methods, in particular to a data system using a daisy chain and a multiplexer and an acquisition method thereof. Background Art
[0002] In embedded systems, multiplexers are often used to connect and switch channels between sampling chips and registers in a daisy-chain, enabling the MCU to collect data from different registers. The multiplexer switches between registers, allowing the MCU to connect to different registers and collect their data. Existing methods for using multiplexers to control register data collection rely on a physical correspondence between the number of multiplexers and the number of registers. This can lead to insufficient chip sampling channels, making it impossible to collect data from a sufficient number of registers. This also poses challenges in data integration and efficient transmission. Summary of the Invention
[0003] To address the problems raised in the above background technology, the present invention provides a data system using a daisy chain and multiplexers, comprising a plurality of multiplexers, a plurality of chips, and a plurality of data registers. The chips are provided with a plurality of sampling channels, and the data registers are provided with a plurality of sampling target channels. Each sampling channel of the chip is respectively connected to an input end of the multiplexer, and an output end of the multiplexer is respectively connected to a respective sampling target channel. The number of output ends of the multiplexer is greater than or equal to the number of sampling target channels of the data register, and the number of input ends of the multiplexer is greater than or equal to the number of sampling channels of the chip.
[0004] There are at least three chips, and each chip is connected in a daisy chain topology.
[0005] The multiplexer is connected to the decoder or the controller line.
[0006] The multiplexer adopts the model TMUX4051 or TMUX4052.
[0007] The multiplexer is provided with a plurality of drain pins and source pins, the input end of the multiplexer is the drain pin, and the output end of the multiplexer is the source pin.
[0008] A data acquisition method for a daisy chain and multiplexer system includes the following steps: S1, initialization: setting the initial channel number to 0, the circuit board number to 0, setting the multiplexer output terminal n to the number of multiplexer connection methods actually used, and the number of sampling chips m included in the data system to the number of sampling chips actually used; S2, channel number determination: determining whether the current channel number is less than or equal to the number of multiplexer input terminals n; if the determination is yes, continuing to execute subsequent steps; if the determination is no, determining that data acquisition work for all channels is completed and the process stops; S3, channel position acquisition: switching the multiplexer according to the current channel number to the position of the channel; S4, data reading: read the data in the chip connected to the channel; S5, circuit board number judgment: judge whether the current circuit board number is less than or equal to the number m of sampling chips contained in the system; if it is judged to be yes, continue to execute the subsequent steps, if it is judged to be no, it is judged that the chip collection on the current circuit board is completed, the channel number is incremented by 1, and the next channel is entered for data collection; S6, data collection: save the sampling chip data corresponding to the current circuit board number to the corresponding array; S7, circuit board number increment operation: the circuit board number is incremented by 1 to collect data for the next chip.
[0009] Compared with the existing technology, the present invention realizes the connection of sampling chips on the daisy chain to the multiplexer, and connects and switches multiple sampling channels through the multiplexer to obtain sampling data, controls the flow of data, and dynamically adjusts to achieve efficient transmission and integration of data, thereby improving the efficiency and accuracy of data acquisition and processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 This is a structural diagram of a data system embodiment 1; Figure 2 This is a flow chart of a collection method according to a first embodiment of the data system; Figure 3 This is a structural diagram of the second embodiment of the data system. DETAILED DESCRIPTION
[0011] The present invention will be further described below with reference to the accompanying drawings. Example 1
[0012] like Figure 1A data system using a daisy chain and multiplexers includes several multiplexers, several chips and several data registers. The chips are provided with several sampling channels, and the data registers are provided with several sampling target channels. The sampling channels of the chips are respectively connected to the input ends of the multiplexers, and the output ends of the multiplexers are respectively connected to the sampling target channels. The number of output ends of the multiplexers is greater than or equal to the number of sampling target channels of the data registers, and the number of input ends of the multiplexers is greater than or equal to the number of sampling channels of the chip.
[0013] There are at least three chips, and two chips are connected in a daisy chain topology.
[0014] The multiplexer is connected to the decoder or controller line.
[0015] The multiplexer used is model TMUX4052, which is a 4:2, 2-channel multiplexer.
[0016] like Figure 2 A data acquisition method for a daisy chain and multiplexer system includes the following steps: S1, initialization: setting the initial channel number (Channel_Number) to 0, the board number (Board_Number) to 0, setting the multiplexer output terminal n to the actual number of multiplexer connection modes used, 4, and the number of sampling chips included in the data system, m, to the actual number of sampling chips used; S2, channel number judgment: judging whether the current channel number is less than or equal to the number of multiplexer input terminals, 4. The TMUX4052 multiplexer has four open states, corresponding to four connection modes. In each connection mode, the sampling chip can collect data from two channels, so one sampling chip can collect data from a total of eight channels. If the judgment is yes, continue to execute the subsequent steps. If the judgment is no, it is determined that the data acquisition work of all channels is completed and the process stops; S3, channel position acquisition: according to the current channel number, switch the multiplexer to the position of the channel; S4, data reading: read the data in the chip connected to the channel; S5, circuit board number judgment: judge whether the current circuit board number is less than or equal to the number m of sampling chips contained in the system; if the judgment is yes, continue to execute the subsequent steps. If the judgment is no, it is determined that the chip acquisition on the current circuit board is completed, and the channel number is incremented by 1 to enter the next channel for data acquisition; S6, data acquisition: save the sampling chip data corresponding to the current circuit board number to the corresponding array; S7, circuit board number increment operation: add 1 to the circuit board number to perform data acquisition for the next chip. Example 2
[0017] This embodiment only describes the differences from the first embodiment, and the similarities are not repeated.
[0018] The difference between this embodiment and the first embodiment is that the multiplexer adopts the model TMUX4051, which is an 8:1, 1-channel multiplexer.
[0019] A data acquisition method for a daisy chain and multiplexer system includes the following steps: S1. Initialization: setting an initial channel number (Channel_Number) to 0, a circuit board number (Board_Number) to 0, setting the multiplexer output terminal n to the number of multiplexer connection modes actually used (8), and setting the number of sampling chips m included in the data system to the number of sampling chips actually used; S2. Channel number determination: determining whether the current channel number is less than or equal to the number of multiplexer input terminals (8). The TMUX4051 multiplexer has eight on states, corresponding to eight connection modes. In each connection mode, the sampling chip can acquire data from one channel, so one sampling chip can acquire data from a total of eight channels. If the judgment is yes, then continue to execute the subsequent steps. If the judgment is no, then it is determined that the data acquisition work of all channels is completed and the process stops; S3, channel position acquisition: according to the current channel number, switch the multiplexer to the position of the channel; S4, data reading: read the data in the chip connected to the channel; S5, circuit board number judgment: judge whether the current circuit board number is less than or equal to the number m of sampling chips contained in the system; if the judgment is yes, then continue to execute the subsequent steps. If the judgment is no, then it is determined that the chip acquisition on the current circuit board is completed, and the channel number is incremented by 1 to enter the next channel for data acquisition; S6, data acquisition: save the sampling chip data corresponding to the current circuit board number to the corresponding array; S7, circuit board number increment operation: perform a circuit board number increment operation by 1 to perform data acquisition for the next chip.
Claims
1. A data system using a daisy chain and a multiplexer, comprising a plurality of multiplexers, a plurality of chips, and a plurality of data registers, characterized in that: The chip is provided with a plurality of sampling channels, and the data register is provided with a plurality of sampling target channels. Each sampling channel of the chip is respectively connected to the input end of the multiplexer, and the output end of the multiplexer is respectively connected to each sampling target channel. The number of output ends of the multiplexer is greater than or equal to the number of sampling target channels of the data register, and the number of input ends of the multiplexer is greater than or equal to the number of sampling channels of the chip.
2. The data acquisition method using a daisy chain and a multiplexer according to claim 1, wherein: There are at least three chips, and each chip is connected in a daisy chain topology.
3. The data acquisition method using a daisy chain and a multiplexer according to claim 1, wherein: The multiplexer is connected to the decoder or the controller line.
4. The data acquisition method using a daisy chain and a multiplexer according to claim 1, wherein: The multiplexer adopts the model TMUX4051 or TMUX4052.
5. The data acquisition method using a daisy chain and a multiplexer according to claim 1, wherein: The multiplexer is provided with a plurality of drain pins and source pins, the input end of the multiplexer is the drain pin, and the output end of the multiplexer is the source pin.
6. A data acquisition method using a daisy chain and a multiplexer according to any one of claims 1 to 5, comprising the following steps: S1. Initialization: Set the initial channel number to 0 and the circuit board number to 0, set the multiplexer output terminal n to the number of multiplexer connection methods actually used, and set the number of sampling chips m contained in the data system to the number of sampling chips actually used; S2. Channel number judgment: Judge whether the current channel number is less than or equal to the number of multiplexer input terminals n; if the judgment is yes, continue to execute the subsequent steps; if the judgment is no, it is judged that the data acquisition work of all channels is completed and the process stops; S3. Channel position acquisition: According to the current channel number, switch the multiplexer to the position of the channel; S4. Data reading: Read the data in the chip connected to the channel; S5. Circuit board number judgment: Judge whether the current circuit board number is less than or equal to the number of sampling chips m contained in the system; If the judgment is yes, continue to execute the subsequent steps. If the judgment is no, it is determined that the chip acquisition on the current circuit board is completed, the channel number is incremented by 1, and the next channel is entered for data acquisition; S6, data acquisition: the sampling chip data corresponding to the current circuit board number is saved in the corresponding array; S7, circuit board number increment operation: the circuit board number is incremented by 1 to perform data acquisition for the next chip.