WO2018045687A1 - Plug module recognition circuit and method - Google Patents
Plug module recognition circuit and method Download PDFInfo
- Publication number
- WO2018045687A1 WO2018045687A1 PCT/CN2016/113373 CN2016113373W WO2018045687A1 WO 2018045687 A1 WO2018045687 A1 WO 2018045687A1 CN 2016113373 W CN2016113373 W CN 2016113373W WO 2018045687 A1 WO2018045687 A1 WO 2018045687A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- module
- plug
- identification unit
- detection
- detected
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
- G06F13/4081—Live connection to bus, e.g. hot-plugging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
Definitions
- the present invention belongs to the field of communications technologies, and in particular, to a plug-in module identification circuit and method.
- a universal bus such as a serial port, USB or I2C requires two or more signal lines; second, it is necessary to power on the inserted module so that at least a part of the inserted module is in a working state to complete the bus. Communication; Third, each different module needs a separate IO port and cable to implement the host to plug and unplug the module.
- the object of the present invention is to provide a plug-in module identification circuit and method, which can quickly realize connection identification of a host and a plug-in module by means of a simple detection and identification circuit and a single signal line.
- an aspect of the present invention provides a plug-in module identification circuit, including a to-be-detected identification unit disposed on a plug-and-pull module, wherein the to-be-detected identification unit includes an electronic component to be tested, and the plug-in of different models
- the basic attribute parameter values of the electronic components to be tested of the module to be detected of the extracted module are different.
- the detection and identification unit is disposed on the host, and is configured to detect insertion of the plug-in module and identify a model of the plug-in module by detecting a basic attribute parameter value of the tested electronic component.
- the detection and identification unit and the to-be-detected identification unit are connected by inserting the plug-in module into the host.
- the plug-in module identification circuit comprises a detection unit to be detected disposed on the plug-in module and a detection and identification unit provided on the host, and different types of circuits.
- the basic attribute parameter values of the electronic component to be tested set on the identification unit to be detected are different, and are passed when the plug-in module is inserted into the host.
- the detection and identification unit measures the parameter value of the identification unit to be detected to identify the model of the plug-in module; solves the problem that multiple signal lines are required for module identification, and the plug-in module needs to be powered on; the requirements for the device are lower, and the use is lower. More extensive.
- the detecting and identifying unit and the to-be-detected identifying unit that implement the connection are connected by a signal transmission line between the plugging module and the host.
- the electronic component to be tested is a capacitor, and capacitances of the identification unit to be detected of the plug-in module of different models are different in capacitance.
- the detection and identification unit includes a DC power supply, a pull-up resistor, a current limiting voltage dividing resistor, a first interface, a main controller, and a timer provided in the main controller, wherein the main controller is provided with a detection pin;
- One end of the pull-up resistor is connected to the DC power source, and the other end of the pull-up resistor is respectively connected to one end of the first interface and the current limiting resistor;
- the other end of the current limiting resistor is connected to the detection pin.
- the to-be-detected identification unit further includes a pull-down resistor and a second interface
- the anode of the capacitor is connected to the second interface, and the cathode of the capacitor is grounded;
- One end of the pull-down resistor is connected to the second interface, and the other end of the pull-down resistor is grounded;
- the first interface and the second interface are connected when the detection and identification unit is connected to the to-be-detected identification unit.
- the capacitor detecting technology used in the plug-in module identification circuit uses a circuit in which the measured capacitor and the pull-down resistor are connected in parallel and connected to the detecting pin through the current limiting resistor and the detecting pin.
- the pull-down resistor pulls down the level of the detection pin to trigger the capacitance detection function, and integrates the insertion detection function, so that the capacitance detection circuit is suitable for the detection and identification of the pluggable module.
- the level of the charge and discharge of the measured capacitor affects the level of the sense pin, and the level of the sense pin indirectly triggers the operation of the timer, enabling the capacitance detection to detect the plug-in module.
- the timer includes a first timer and a second timer; the first timer is configured to define a charging time of the capacitor; and the second timer is configured to measure the discharging of the capacitor to the detecting lead The high and low level of the foot determines the discharge time of the threshold.
- the capacitance detection technology adopted by the plug-in module identification circuit provided by the present invention represents the capacitance value of the capacitor by the capacitance discharge time measured by the second timer, and the plug-in module is correspondingly obtained.
- the model does not require the use of specific data acquisition interfaces such as analog-to-digital converters and data acquisition cards. It is only necessary to determine whether the detection pin is high or low to implement the capacitance detection function.
- the resistance of the pull-up resistor is greater than 10 times the resistance of the pull-down resistor, and the resistance of the pull-down resistor is greater than 10 times the resistance of the current limiting resistor.
- the current limiting voltage dividing resistor acts as a current limiting function when the main controller charges the capacitor.
- the first timer presets a charging time greater than 10 times the maximum charging time of the capacitor.
- the preset time of the first timer is greater than 10 times of the maximum charging time of the capacitor, thereby eliminating the influence of errors and environmental factors of each device, and ensuring that the first timer ends.
- the capacitor is fully charged.
- the discharge time is in the range of 0.1 ms to 10 ms.
- selecting a discharge time range of 0.1 ms to 10 ms is advantageous for good detection of the main controller; meanwhile, when the plug-in module is selected, the capacitance value of the capacitor can be selected to be wide.
- another aspect of the present invention provides a method for identifying a plug-in module, including the following steps:
- the detection and identification unit Detecting, by the detection and identification unit, the detected identification unit of the inserted and removed module to be detected, thereby acquiring a parameter value of a basic attribute of the electronic component to be tested; wherein the detecting The identification unit and the identification unit to be detected realize connection in response to insertion of the plug-in module;
- mapping table Determining, according to the pre-stored mapping table, a model number of the plug-in module corresponding to the parameter value; wherein the mapping table stores basic attribute parameters of the tested electronic component of the to-be-detected identification unit in different types of plug-in modules Correspondence between the value and the model of the pluggable module.
- the plug-in module identification method acquires the parameter value of the basic attribute of the electronic component to be tested of the to-be-detected identification unit of the inserted plug-in module by detecting the identification unit, thereby identifying the plug-in module
- the model solves the shortcomings of the circuit structure in which the existing pluggable module identification method requires multiple signal lines and the limitation that the pluggable module needs to be powered on to realize the identification.
- responding to any of the plug-in module insertions includes:
- the high level state is a preset level state in which the detection pin initially in the high resistance mode is pulled to a high level by a pull-up resistor.
- the electronic component to be tested is a capacitor
- the basic attribute parameter value is a capacitance value
- the capacitance value is represented by a discharge time at which the capacitor is discharged to a high and low determination threshold of the detection pin in a fully charged state.
- detecting the to-be-detected identification unit of the inserted plug-in module by detecting the identification unit comprises the following steps:
- the detection pin is set to a high impedance mode by the main controller, and the second timer is started to bring the capacitor into a discharge state;
- the plug-and-pull module identification method uses the capacitor discharge time to represent the capacitance value, and the detection identification unit measures the discharge time of the inserted capacitor of the plug-in module to identify the model of the plug-in module.
- a specific data acquisition interface such as a digital converter and a data acquisition card can be realized only by judging whether the detection pin is high or low.
- FIG. 1 is a block diagram showing the structure of an embodiment of a plug-in module identification circuit according to the present invention
- FIG. 2 is a schematic diagram showing the circuit structure of another embodiment of a plug-and-pull module identification circuit according to the present invention.
- FIG. 3 is a schematic flow chart of an embodiment of a method for identifying a pluggable module according to the present invention
- FIG. 4 is a schematic flow chart of another embodiment of a method for identifying a pluggable module according to the present invention.
- FIG. 1 is a structural block diagram of an embodiment of a plug-in module identification circuit according to the present invention.
- the plug-in module identification circuit provided by the embodiment includes a detection and identification unit 1 and an identification unit 2 to be detected.
- the detection and identification unit 1 is disposed on the host 3.
- the detection unit 2 to be detected is disposed on the plugging and unplugging module 4,
- FIG. 1 when the plug-in module 4 is inserted into the host 3 , the detection and identification unit 1 and the to-be-detected identification unit 2 are connected; specifically, the detection and identification unit 1 and the to-be-detected identification unit 2 are connected between the plug-in module 4 and the host 3 The signal transmission line is connected.
- the to-be-detected identification unit 2 includes the electronic component 21 to be tested, and the identification unit 2 of the plug-in module 4 of different models to be detected
- the basic attribute parameter values of the electronic component 21 to be tested are different.
- the detection/recognition unit 1 prestores a mapping table on the correspondence relationship between the basic attribute parameter values of the different electronic components 21 to be tested and the model number of the plug-in module 4.
- the detection and identification unit 1 is configured to detect the insertion of the insertion/removal module 4 by detecting the detection unit 2 to be detected after the connection with the identification unit 2 to be detected; and to detect and acquire the input after the insertion of the insertion/removal module 4 is confirmed
- the basic attribute parameter values of the electronic component 21 to be tested in the detection unit 2 are detected, and the model number of the plug-in module 4 corresponding to the parameter value is found according to the correspondence relationship of the mapping table.
- the plugging and unplugging module 4 is connected to the host 3, and the signal line connection between the plugging and unplugging module 4 and the host 3 is realized; the detecting and identifying unit 1 and the to-be-detected identifying unit 2 are connected between the plugging and unplugging module 4 and the host 3.
- the signal lines are connected to form a plug-in module 4 identification circuit.
- the circuit principle and the overall structure of the detection and identification between the plug-in module 3 and the host 4 are simple, and the connection between the detection and identification unit 1 and the to-be-detected identification unit 2 is established, and only a single signal line is needed.
- the module 4 has no power-on request, and the plug-and-play recognition system based on the circuit principle structure provided by the embodiment has simple operation, high recognition efficiency and low cost.
- FIG. 2 is a schematic diagram of a circuit structure of another embodiment of a plug-and-pull module identification circuit according to the present invention.
- the plug-in module identification circuit is composed of a detection and identification unit 1 and an identification unit to be detected.
- the detection and identification unit 1 is disposed on the host 3, and the to-be-detected identification unit 2 is disposed on the plug-in module 4.
- the detection and identification unit 1 includes a DC power source VCC, a pull-up resistor R1, a current limiting voltage dividing resistor Rs, a first interface 101, a main controller 11, and first and second timers provided in the main controller 11.
- the main control unit 11 is further provided with a detection pin 111.
- One end of the pull-up resistor R1 is connected to the DC power source VCC, and the other end of the pull-up resistor R1 is connected to one end of the first interface 101 and the current limiting resistor Rs, respectively; the other end of the current limiting resistor Rs is connected to the detecting pin 111.
- the first timer and the second timer are controlled by the main controller 11, the first timer is used to define the charging time of the capacitor C, and the second timer is used to measure the discharging of the capacitor C to the high and low determination threshold of the detecting pin 111. Discharge time.
- the detection unit 2 to be detected includes a capacitor C as the electronic component 21 to be tested, a pull-down resistor R2 and a second interface 102; the anode of the capacitor C is connected to the second interface 102, and the cathode of the capacitor C is grounded; one end of the pull-down resistor R2 is connected to the second At the interface 102, the other end of the pull-down resistor R2 is grounded.
- the plug-in module 4 When the plug-in module 4 is inserted into the host 3, the first interface 101 and the second interface 102 are connected, and the signal lines of the two interfaces are connected. At this time, the detection and identification unit 1 and the to-be-detected identification unit 2 are connected through a common signal line. .
- the resistance of the pull-up resistor R1 is greater than 10 times the resistance of the pull-down resistor R2; in order to ensure that the capacitor C is a reliable high level after the charging is completed, the resistance of the pull-down resistor R2 is greater than the current limit.
- the resistance of the voltage dividing resistor Rs is 10 times.
- the capacitor C is reliably fully charged during charging, and the preset charging time of the first timer is greater than 10 times of the maximum charging time of the capacitor C.
- the value of the pull-down resistor R2 and the capacitor C determines the discharge time of the capacitor C.
- the capacitance values set by the capacitor C in the identification unit 2 of the plug-in module of different models are different, so that the detection and identification unit 1 is detected according to the detection.
- the discharge time of the identification unit 2 identifies the model of the corresponding plug-in module.
- the discharge time of the capacitor C is controlled within the range of 0.1 ms to 10 ms, and the range of capacitance values of the selectable capacitor C is determined by the discharge time range.
- the detecting pin 111 is grounded through the pull-down resistor R2, the level is pulled to a low level, and the main controller 11 reads the low level, which is regarded as a plug-in module. Access. Then, the main controller 11 pulls the detection pin 111 to a high level and starts the first timer to fully charge the capacitor C. After the first timer expires, the main controller 11 is triggered to set the detection pin 111 to a high resistance. The mode starts the second timer, and the capacitor C is continuously discharged until the main controller 11 reads the detection pin 111 to the low state and stops the second timer. The obtained count value is the discharge time of the capacitor C, and the corresponding plug-in module model is identified by the discharge time of the capacitor C.
- the preferred embodiment of the plug-in module identification circuit provided by the invention is based on the capacitance detection technology and integrates the insertion detection function, so that the detection and identification process is automatically started after the plug-in module is accessed and automatically completed after completion, without specific data acquisition.
- the interface only needs to judge whether the detection pin is high level or low level; the identification detection of the plug-in module requires only a single signal line and no power-on requirement, and the circuit structure is simple and the implementation difficulty is low.
- An embodiment of the method for identifying a plug-and-pull module of the present invention is based on the circuit structure of the preferred embodiment of the plug-and-pull module of FIG. 1.
- the specific steps of the preferred embodiment of the plug-in module identification method are as follows:
- FIG. 3 is a schematic flowchart diagram of an embodiment of a method for identifying a pluggable module according to the present invention. The method includes the steps of:
- the detection and identification unit 2 of the plug-in module 4 is detected by the detection and identification unit 1 of the host 3, and the connection with the identification unit 2 to be detected is confirmed, so that the host 3 acquires the plug-in module 4
- the information thus initiates further detection by the detection identification unit 1 to detect the identification unit 2.
- the detection identification unit 1 and the detection identification unit 2 are connected when the plug-in module 4 is inserted into the host 3.
- the mapping table has been preset in the detection and identification unit 1 , and the mapping table stores the basic attribute parameter values of the electronic component 21 to be tested and the plug-in module 4 of the module 2 to be detected in the plug-in module 4 of different models. Correspondence of the model.
- the plug-in module identification circuit detects the model value of the plugged-out module by detecting the parameter value of the tested electronic component by detecting the identification unit when the plug-in module is inserted into the host; and solving the module identification requires multiple signal line connections, Improve the lack of power for plugging and unplugging modules; lower requirements for equipment and wider use.
- Another embodiment of the plug-and-pull module identification method of the present invention is based on the circuit structure of another embodiment of the plug-and-pull module of FIG. 2, and the specific steps of the plug-in module identification method are as follows:
- FIG. 4 is a schematic flowchart of a main controller in the preferred embodiment.
- the main controller 11 of the detecting unit 1 detects that the pull-down resistor R2 of the plug-in module of the detecting pin 111 is pulled from the preset high state to the low state.
- the detection pin is set to the high-impedance mode by the main controller 11, so that the detection pin 111 is pulled down by the pull-up resistor R1. To a high state.
- the detection pin 111 is set to the high level mode by the main controller 11, and the first timer is started at the same time. At this time, the current passing through the detection pin 111 in the high state state flows through the current limiting voltage dividing resistor Rs to charge the capacitor C, so that the potential of the capacitor C and the pull-down resistor R2 rises, and when the first timer expires, the capacitor C, pull-down resistor R2 and sense pin 111 are both in a high state.
- the detection pin 111 is set to the high impedance mode, and the second timer is started, so that the capacitor C starts to pass.
- the pull-down resistor R2 is discharged; at the same time, the state of the detection pin 111 is continuously read by the main controller 11.
- the main controller 11 reads the detection pin 111 to a high state before the potential of the capacitor C falls to the high and low level determination threshold of the detection pin 111.
- the second timer is stopped, and the count value of the second timer is acquired, and the count value is the discharge time of the capacitor C.
- the magnitude of the resistance of the capacitor C is represented by the length of the discharge time of the capacitor C.
- the model of the plug-in module 4 corresponding to the discharge time of the capacitor C is determined by the main controller 11 according to the pre-stored mapping table.
- the mapping table stores the correspondence between the discharge time of the capacitor C of the identification unit 2 to be detected and the model of the plug-in module in the plug-in module 4 of different models.
- the pull-down resistor R2 that is connected to the pin 111 is pulled to a low state, so that the main controller 11 reads the low level of the detection pin 111 to trigger a response to the plug-in module 4 access.
- the level mode of the detection pin 111 is controlled by the main controller 11 and the timing of the capacitor C in the plug-in module 4 is obtained by using the first timer and the second timer; the discharge time of the capacitor C is obtained.
- the preferred embodiment of the plug-and-pull module identification method provided by the present invention automatically starts and automatically ends the detection and identification process of the plug-in module that is accessed; the required circuit structure is simple, the signal line is small; and the plug-in module has no power-on Restricted, it can be applied to plug-in modules that do not have bus communication function.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Details Of Connecting Devices For Male And Female Coupling (AREA)
- Coupling Device And Connection With Printed Circuit (AREA)
Abstract
A plug module recognition circuit and method, said circuit comprising a unit to be detected and recognized (2) provided on a plug module (4), and a detection and recognition unit (1) provided on a main body (3); said unit to be detected and recognized (2) comprising a tested electronic component (21), a basic attribute parameter value of the tested electronic component (21) of the unit to be detected and recognized (2) of various models of said plug module (4) varying accordingly; said detection and recognition unit (1) and said unit to be detected and recognized (2) being connected by being plugged into said main body (3) by means of said plug module (4). Said method comprises said detection and recognition circuit detecting the insertion of said plug module (4), and recognizing the model of said plug module (4) by detecting the basic attribute parameter value of said tested electronic component (21). By means of said plug module recognition circuit and method, a detection and recognition process can begin and end automatically, while only a single signal line is required for detection and recognition, without requiring powering up. The circuit has a simple structure, is low-cost, and offers a wide application range.
Description
本发明属于通信技术领域,具体地,涉及一种插拔模块识别电路和方法。The present invention belongs to the field of communications technologies, and in particular, to a plug-in module identification circuit and method.
一个通用接口兼容多个可插拔模块时,主机往往需要识别插入模块的类型,以便选择不同的控制策略,如时序、供电、使能某些端口等。通行的做法是:When a common interface is compatible with multiple pluggable modules, the host often needs to identify the type of plug-in module in order to select different control strategies, such as timing, power supply, enabling certain ports, and so on. The usual practice is:
1、通过如串口、USB或I2C等通用总线进行握手识别;1. Handshake recognition through a universal bus such as serial port, USB or I2C;
2、通过将主机的一个检测口拉低/拉高来识别。2. Identify by pulling down/raising one of the detection ports of the host.
上述做法所存在的缺点:一是如串口、USB或I2C等通用总线需要两根或以上信号线;二是需要对插入的模块上电,使插入的模块至少一部分电路处在工作状态才能完成总线通讯;三是每个不同模块都需要一个独立的IO口和连接线来实现主机对插拔模块的检测。The shortcomings of the above methods are as follows: First, a universal bus such as a serial port, USB or I2C requires two or more signal lines; second, it is necessary to power on the inserted module so that at least a part of the inserted module is in a working state to complete the bus. Communication; Third, each different module needs a separate IO port and cable to implement the host to plug and unplug the module.
发明内容Summary of the invention
本发明的目的在于提供一种插拔模块识别电路和方法,借助结构简单检测识别电路和单根信号线,就能够快速实现主机和插拔模块的连接识别。The object of the present invention is to provide a plug-in module identification circuit and method, which can quickly realize connection identification of a host and a plug-in module by means of a simple detection and identification circuit and a single signal line.
为了实现上述目的,本发明一方面提供一种插拔模块识别电路,包括设于插拔模块上的待检测识别单元,所述待检测识别单元包括被测电子元器件,不同型号的所述插拔模块的待检测识别单元的被测电子元器件的基本属性参数值不同。In order to achieve the above object, an aspect of the present invention provides a plug-in module identification circuit, including a to-be-detected identification unit disposed on a plug-and-pull module, wherein the to-be-detected identification unit includes an electronic component to be tested, and the plug-in of different models The basic attribute parameter values of the electronic components to be tested of the module to be detected of the extracted module are different.
设于主机的检测识别单元,用于检测所述插拔模块的插入并通过检测所述被测电子元器件的基本属性参数值识别所述插拔模块的型号。The detection and identification unit is disposed on the host, and is configured to detect insertion of the plug-in module and identify a model of the plug-in module by detecting a basic attribute parameter value of the tested electronic component.
所述检测识别单元和所述待检测识别单元通过所述插拔模块插入所述主机实现连接。The detection and identification unit and the to-be-detected identification unit are connected by inserting the plug-in module into the host.
与现有USB、I2C等总线检测技术相比,本发明提供的插拔模块识别电路,包括设于插拔模块上的待检测识别单元和设于主机的检测识别单元两部分电路,不同型号的待检测识别单元上设置的被测电子元器件的基本属性参数值不同,在所述插拔模块插入所述主机时通过
检测识别单元测量到待检测识别单元的参数值从而识别插拔模块的型号;解决了模块识别时需要多根信号线连接,同时插拔模块需上电的不足;对设备的要求更低,用途更广泛。Compared with the existing USB, I2C and other bus detection technologies, the plug-in module identification circuit provided by the present invention comprises a detection unit to be detected disposed on the plug-in module and a detection and identification unit provided on the host, and different types of circuits. The basic attribute parameter values of the electronic component to be tested set on the identification unit to be detected are different, and are passed when the plug-in module is inserted into the host
The detection and identification unit measures the parameter value of the identification unit to be detected to identify the model of the plug-in module; solves the problem that multiple signal lines are required for module identification, and the plug-in module needs to be powered on; the requirements for the device are lower, and the use is lower. More extensive.
进一步地,所述实现连接的所述检测识别单元和所述待检测识别单元通过所述插拔模块与所述主机之间的信号传输线实现连接。Further, the detecting and identifying unit and the to-be-detected identifying unit that implement the connection are connected by a signal transmission line between the plugging module and the host.
进一步地,所述被测电子元器件为电容,不同型号的所述插拔模块的待检测识别单元的电容的容值不同。Further, the electronic component to be tested is a capacitor, and capacitances of the identification unit to be detected of the plug-in module of different models are different in capacitance.
进一步地,所述检测识别单元包括直流电源、上拉电阻、限流分压电阻、第一接口、主控制器以及设于主控制器的计时器,所述主控器设有检测引脚;Further, the detection and identification unit includes a DC power supply, a pull-up resistor, a current limiting voltage dividing resistor, a first interface, a main controller, and a timer provided in the main controller, wherein the main controller is provided with a detection pin;
所述上拉电阻的一端连接所述直流电源,所述上拉电阻的另一端分别连接所述第一接口和所述限流分压电阻的一端;One end of the pull-up resistor is connected to the DC power source, and the other end of the pull-up resistor is respectively connected to one end of the first interface and the current limiting resistor;
所述限流分压电阻的另一端连接到所述检测引脚。The other end of the current limiting resistor is connected to the detection pin.
进一步地,所述待检测识别单元还包括下拉电阻和第二接口;Further, the to-be-detected identification unit further includes a pull-down resistor and a second interface;
所述电容的正极连接所述第二接口,所述电容的负极接地;The anode of the capacitor is connected to the second interface, and the cathode of the capacitor is grounded;
所述下拉电阻的一端连接所述第二接口,所述下拉电阻的另一端接地;One end of the pull-down resistor is connected to the second interface, and the other end of the pull-down resistor is grounded;
所述检测识别单元和所述待检测识别单元连接时,所述第一接口和所述第二接口连接。The first interface and the second interface are connected when the detection and identification unit is connected to the to-be-detected identification unit.
与现有的电容检测技术相比,本发明提供的插拔模块识别电路所采用的电容检测技术,利用被测电容与下拉电阻并联再通过限流分压电阻与检测引脚连接的电路结构,一方面使得插拔模块与主机连接时,下拉电阻拉低检测引脚的电平从而触发电容检测功能,整合了插入检测功能,使电容检测电路适用于可插拔模块检测、识别这一应用场合;另一方面,使得被测的电容充放电的电平高低影响检测引脚的电平高低,检测引脚的电平高低间接触发计时器的运行,实现了电容检测在检测到插拔模块的插入后的自动开始,完成后的自动结束。Compared with the existing capacitance detecting technology, the capacitor detecting technology used in the plug-in module identification circuit provided by the present invention uses a circuit in which the measured capacitor and the pull-down resistor are connected in parallel and connected to the detecting pin through the current limiting resistor and the detecting pin. On the one hand, when the plug-in module is connected to the host, the pull-down resistor pulls down the level of the detection pin to trigger the capacitance detection function, and integrates the insertion detection function, so that the capacitance detection circuit is suitable for the detection and identification of the pluggable module. On the other hand, the level of the charge and discharge of the measured capacitor affects the level of the sense pin, and the level of the sense pin indirectly triggers the operation of the timer, enabling the capacitance detection to detect the plug-in module. The automatic start after insertion, the automatic end after completion.
进一步地,所述计时器包括第一计时器和第二计时器;所述第一计时器用于限定所述电容的充电时间;所述第二计时器用于测量所述电容放电到所述检测引脚的高低电平判定阈值的放电时间。Further, the timer includes a first timer and a second timer; the first timer is configured to define a charging time of the capacitor; and the second timer is configured to measure the discharging of the capacitor to the detecting lead The high and low level of the foot determines the discharge time of the threshold.
与现有的电容检测技术相比,本发明提供的插拔模块识别电路所采用的电容检测技术,通过第二计时器所测的电容放电时间来代表电容的容值,对应得出插拔模块的型号,无需使用如模数变换器、数据采集卡等特定数据采集接口,仅需判断检测脚是高电平还是低电平即可实现电容检测功能。Compared with the existing capacitance detection technology, the capacitance detection technology adopted by the plug-in module identification circuit provided by the present invention represents the capacitance value of the capacitor by the capacitance discharge time measured by the second timer, and the plug-in module is correspondingly obtained. The model does not require the use of specific data acquisition interfaces such as analog-to-digital converters and data acquisition cards. It is only necessary to determine whether the detection pin is high or low to implement the capacitance detection function.
优选地,所述上拉电阻的阻值大于所述下拉电阻的阻值的10倍,所述下拉电阻的阻值大于所述限流分压电阻的阻值的10倍。Preferably, the resistance of the pull-up resistor is greater than 10 times the resistance of the pull-down resistor, and the resistance of the pull-down resistor is greater than 10 times the resistance of the current limiting resistor.
作为本发明的优选方案,限流分压电阻一方面在主控制器给电容充电时起限流作用,防
止检测引脚瞬时过电流烧坏电容;另一方面与下拉电阻分压,决定稳态时电容的电平,设置下拉电阻的阻值大于限流分压电阻的阻值的10倍,从而保证电容在充电完成后是可靠的高电平。As a preferred solution of the present invention, the current limiting voltage dividing resistor acts as a current limiting function when the main controller charges the capacitor.
The detection pin instantaneous overcurrent burnout capacitor; on the other hand, the pull-down resistor is divided to determine the level of the capacitor at steady state, and the resistance of the pull-down resistor is set to be greater than 10 times the resistance of the current limiting resistor, thereby ensuring The capacitor is a reliable high level after charging is complete.
优选地,所述第一计时器预设的充电时间大于所述电容的最大充电时间的10倍。Preferably, the first timer presets a charging time greater than 10 times the maximum charging time of the capacitor.
作为本发明的优选方案,所述第一计时器预设的充电时间大于所述电容的最大充电时间的10倍,从而消除各器件的误差及环境因素的影响,保证第一计时器计时结束时电容被充满电。As a preferred solution of the present invention, the preset time of the first timer is greater than 10 times of the maximum charging time of the capacitor, thereby eliminating the influence of errors and environmental factors of each device, and ensuring that the first timer ends. The capacitor is fully charged.
优选地,所述放电时间在0.1ms~10ms范围之内。Preferably, the discharge time is in the range of 0.1 ms to 10 ms.
作为本发明的优选方案,选择0.1ms~10ms的放电时间范围利于主控制器的良好检测;同时,插拔模块选型设计时,电容的容值可选取范围较宽。As a preferred solution of the present invention, selecting a discharge time range of 0.1 ms to 10 ms is advantageous for good detection of the main controller; meanwhile, when the plug-in module is selected, the capacitance value of the capacitor can be selected to be wide.
为了实现本发明的目的,本发明另一方面提供一种插拔模块识别方法,包括以下步骤:In order to achieve the object of the present invention, another aspect of the present invention provides a method for identifying a plug-in module, including the following steps:
响应任一插拔模块插入时,通过检测识别单元对插入的所述插拔模块的待检测识别单元进行检测,从而获取所述被测电子元器件的基本属性的参数值;其中,所述检测识别单元和所述待检测识别单元在响应所述插拔模块插入时实现连接;Detecting, by the detection and identification unit, the detected identification unit of the inserted and removed module to be detected, thereby acquiring a parameter value of a basic attribute of the electronic component to be tested; wherein the detecting The identification unit and the identification unit to be detected realize connection in response to insertion of the plug-in module;
根据预存的映射表确定所述参数值所对应的所述插拔模块的型号;其中,所述映射表储存不同型号的插拔模块中的待检测识别单元的被测电子元器件的基本属性参数值与所述插拔模块的型号的对应关系。Determining, according to the pre-stored mapping table, a model number of the plug-in module corresponding to the parameter value; wherein the mapping table stores basic attribute parameters of the tested electronic component of the to-be-detected identification unit in different types of plug-in modules Correspondence between the value and the model of the pluggable module.
与现有技术相比,本发明提供的插拔模块识别方法,通过检测识别单元获取插入的插拔模块的待检测识别单元的被测电子元器件的基本属性的参数值从而识别插拔模块的型号,解决了现有可插拔模块识别方法需要多根信号线的电路结构的缺点和可插拔模块需要上电才能实现识别的限制。Compared with the prior art, the plug-in module identification method provided by the present invention acquires the parameter value of the basic attribute of the electronic component to be tested of the to-be-detected identification unit of the inserted plug-in module by detecting the identification unit, thereby identifying the plug-in module The model solves the shortcomings of the circuit structure in which the existing pluggable module identification method requires multiple signal lines and the limitation that the pluggable module needs to be powered on to realize the identification.
进一步地,所述响应任一所述插拔模块插入包括:Further, the responding to any of the plug-in module insertions includes:
通过所述检测识别单元的主控制器读取到其检测引脚被所述插拔模块的下拉电阻由高电平状态拉低至低电平状态时,确定所述插拔模块插入;其中,所述高电平状态为初始处于高阻态模式的所述检测引脚被上拉电阻拉至高电平的预置电平状态。When the main controller of the detection and identification unit reads that the detection pin is pulled from the high-level state to the low state by the pull-down resistor of the plug-in module, it is determined that the plug-in module is inserted; The high level state is a preset level state in which the detection pin initially in the high resistance mode is pulled to a high level by a pull-up resistor.
优选地,所述被测电子元器件为电容,所述基本属性参数值为电容容值。Preferably, the electronic component to be tested is a capacitor, and the basic attribute parameter value is a capacitance value.
优选地,所述电容容值使用所述电容在充满电状态下放电至所述检测引脚的高低电平判定阈值的放电时间来表示。Preferably, the capacitance value is represented by a discharge time at which the capacitor is discharged to a high and low determination threshold of the detection pin in a fully charged state.
优选地,通过检测识别单元对插入的所述插拔模块的待检测识别单元进行检测包括以下步骤:Preferably, detecting the to-be-detected identification unit of the inserted plug-in module by detecting the identification unit comprises the following steps:
通过所述主控器将所述检测引脚设置为高电平模式,同时启动第一计时器,使所述电容
进入充电状态;Setting the detection pin to a high level mode by the main controller, and simultaneously starting a first timer to make the capacitor
Entering the state of charge;
所述第一计时器计时结束时,通过所述主控制器将所述检测引脚设置为高阻态模式,同时启动第二计时器,使所述电容进入放电状态;When the first timer expires, the detection pin is set to a high impedance mode by the main controller, and the second timer is started to bring the capacitor into a discharge state;
通过所述主控器读取到所述检测引脚的电平为低电平时,停止所述第二计时器计时,从而获取所述第二计时器的计数值,所述计数值为所述放电时间。Stopping, by the main controller, when the level of the detection pin is low, stopping the second timer, thereby acquiring a count value of the second timer, the count value being Discharge time.
作为优选方案,本发明提供的插拔模块识别方法,利用电容放电时间代表电容容值,通过检测识别单元测量插入的插拔模块预设电容的放电时间从而识别插拔模块的型号,无需如模数转化器、数据采集卡等特定数据采集接口,仅需判断检测脚是高电平还是低电平即可实现。As a preferred solution, the plug-and-pull module identification method provided by the present invention uses the capacitor discharge time to represent the capacitance value, and the detection identification unit measures the discharge time of the inserted capacitor of the plug-in module to identify the model of the plug-in module. A specific data acquisition interface such as a digital converter and a data acquisition card can be realized only by judging whether the detection pin is high or low.
下面结合附图和具体实施例对本发明进一步详细的说明:The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:
图1是本发明一种插拔模块识别电路的一个实施例的结构框图;1 is a block diagram showing the structure of an embodiment of a plug-in module identification circuit according to the present invention;
图2是本发明一种插拔模块识别电路的另一实施例的电路结构示意图;2 is a schematic diagram showing the circuit structure of another embodiment of a plug-and-pull module identification circuit according to the present invention;
图3是本发明一种插拔模块识别方法的一个实施例的流程示意图;3 is a schematic flow chart of an embodiment of a method for identifying a pluggable module according to the present invention;
图4是本发明一种插拔模块识别方法的另一实施例的流程示意图。4 is a schematic flow chart of another embodiment of a method for identifying a pluggable module according to the present invention.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
参见图1,图1是本发明一种插拔模块识别电路的一个实施例的结构框图;该实施例所提供的插拔模块识别电路,包括检测识别单元1和待检测识别单元2。Referring to FIG. 1, FIG. 1 is a structural block diagram of an embodiment of a plug-in module identification circuit according to the present invention. The plug-in module identification circuit provided by the embodiment includes a detection and identification unit 1 and an identification unit 2 to be detected.
其中,检测识别单元1设于主机3上。待检测识别单元2设于插拔模块4上,The detection and identification unit 1 is disposed on the host 3. The detection unit 2 to be detected is disposed on the plugging and unplugging module 4,
图1中,插拔模块4插入主机3时,检测识别单元1和待检测识别单元2实现连接;具体地,检测识别单元1和待检测识别单元2通过插拔模块4与主机3之间的信号传输线实现连接。In FIG. 1 , when the plug-in module 4 is inserted into the host 3 , the detection and identification unit 1 and the to-be-detected identification unit 2 are connected; specifically, the detection and identification unit 1 and the to-be-detected identification unit 2 are connected between the plug-in module 4 and the host 3 The signal transmission line is connected.
待检测识别单元2包括被测电子元器件21,不同型号的插拔模块4的待检测识别单元2
中的被测电子元器件21的基本属性参数值不同。The to-be-detected identification unit 2 includes the electronic component 21 to be tested, and the identification unit 2 of the plug-in module 4 of different models to be detected
The basic attribute parameter values of the electronic component 21 to be tested are different.
检测识别单元1预存有关于不同被测电子元器件21的基本属性参数值与插拔模块4的型号的对应关系的映射表。The detection/recognition unit 1 prestores a mapping table on the correspondence relationship between the basic attribute parameter values of the different electronic components 21 to be tested and the model number of the plug-in module 4.
检测识别单元1,在与待检测识别单元2实现连接后:用于通过检测待检测识别单元2检测插拔模块4的插入;以及当确认插拔模块4的插入后,用于检测并获取待检测识别单元2中的被测电子元器件21的基本属性参数值,根据映射表的对应关系找出与参数值对应的插拔模块4的型号。The detection and identification unit 1 is configured to detect the insertion of the insertion/removal module 4 by detecting the detection unit 2 to be detected after the connection with the identification unit 2 to be detected; and to detect and acquire the input after the insertion of the insertion/removal module 4 is confirmed The basic attribute parameter values of the electronic component 21 to be tested in the detection unit 2 are detected, and the model number of the plug-in module 4 corresponding to the parameter value is found according to the correspondence relationship of the mapping table.
具体实施时,将插拔模块4接入主机3中,实现插拔模块4与主机3之间的信号线连接;检测识别单元1与待检测识别单元2通过插拔模块4与主机3之间的信号线实现连接,构成插拔模块4识别电路。通过检测识别单元1对待检测识别单元2的检测从而确认插拔模块4接入主机3;然后,通过检测识别单元1对待检测识别单元2中的被测电子元器件21的基本属性参数值的检测和获取,识别相对应的插拔模块4型号。In the specific implementation, the plugging and unplugging module 4 is connected to the host 3, and the signal line connection between the plugging and unplugging module 4 and the host 3 is realized; the detecting and identifying unit 1 and the to-be-detected identifying unit 2 are connected between the plugging and unplugging module 4 and the host 3. The signal lines are connected to form a plug-in module 4 identification circuit. By detecting the detection unit 1 detecting the detection unit 2 to confirm that the plug-in module 4 is connected to the host 3; then, detecting the detection of the basic attribute parameter value of the electronic component 21 to be tested in the identification unit 2 by detecting the identification unit 1 And obtain and identify the corresponding plug-in module 4 model.
本实施例实现插拔模块3与主机4之间的检测识别的电路原理和整体结构简单,建立起检测识别单元1和待检测识别单元2之间的连接只需单根信号线,对于插拔模块4没有上电的要求,基于本实施例所提供的电路原理结构的插拔识别系统操作简单,识别效率高,成本低。In this embodiment, the circuit principle and the overall structure of the detection and identification between the plug-in module 3 and the host 4 are simple, and the connection between the detection and identification unit 1 and the to-be-detected identification unit 2 is established, and only a single signal line is needed. The module 4 has no power-on request, and the plug-and-play recognition system based on the circuit principle structure provided by the embodiment has simple operation, high recognition efficiency and low cost.
参见图2,图2是本发明一种插拔模块识别电路的另一实施例的电路结构示意图,该插拔模块识别电路由检测识别单元1和待检测识别单元2组成。其中,检测识别单元1设于主机3上,待检测识别单元2设于插拔模块4上。Referring to FIG. 2, FIG. 2 is a schematic diagram of a circuit structure of another embodiment of a plug-and-pull module identification circuit according to the present invention. The plug-in module identification circuit is composed of a detection and identification unit 1 and an identification unit to be detected. The detection and identification unit 1 is disposed on the host 3, and the to-be-detected identification unit 2 is disposed on the plug-in module 4.
具体地,检测识别单元1包括直流电源VCC、上拉电阻R1、限流分压电阻Rs、第一接口101、主控制器11以及设于主控制器11的第一计时器和第二计时器,主控器11上还设有检测引脚111。Specifically, the detection and identification unit 1 includes a DC power source VCC, a pull-up resistor R1, a current limiting voltage dividing resistor Rs, a first interface 101, a main controller 11, and first and second timers provided in the main controller 11. The main control unit 11 is further provided with a detection pin 111.
上拉电阻R1的一端连接直流电源VCC,上拉电阻R1的另一端分别连接第一接口101和限流分压电阻Rs的一端;限流分压电阻Rs的另一端连接到检测引脚111。One end of the pull-up resistor R1 is connected to the DC power source VCC, and the other end of the pull-up resistor R1 is connected to one end of the first interface 101 and the current limiting resistor Rs, respectively; the other end of the current limiting resistor Rs is connected to the detecting pin 111.
第一计时器和第二计时器受主控制器11的控制,第一计时器用于限定电容C的充电时间;第二计时器用于测量电容C放电到检测引脚111的高低电平判定阈值的放电时间。The first timer and the second timer are controlled by the main controller 11, the first timer is used to define the charging time of the capacitor C, and the second timer is used to measure the discharging of the capacitor C to the high and low determination threshold of the detecting pin 111. Discharge time.
待检测识别单元2包括作为被测电子元器件21的电容C、下拉电阻R2和第二接口102;电容C的正极连接第二接口102,电容C的负极接地;下拉电阻R2的一端连接第二接口102,下拉电阻R2的另一端接地。The detection unit 2 to be detected includes a capacitor C as the electronic component 21 to be tested, a pull-down resistor R2 and a second interface 102; the anode of the capacitor C is connected to the second interface 102, and the cathode of the capacitor C is grounded; one end of the pull-down resistor R2 is connected to the second At the interface 102, the other end of the pull-down resistor R2 is grounded.
当插拔模块4插入主机3,第一接口101和第二接口102相接,两个接口所在的信号线接通,此时,检测识别单元1和待检测识别单元2通过共用信号线实现连接。
When the plug-in module 4 is inserted into the host 3, the first interface 101 and the second interface 102 are connected, and the signal lines of the two interfaces are connected. At this time, the detection and identification unit 1 and the to-be-detected identification unit 2 are connected through a common signal line. .
选取元器件的参数值时,上拉电阻R1的阻值大于下拉电阻R2的阻值的10倍;为了保证电容C在充电完成后是可靠的高电平,下拉电阻R2的阻值大于限流分压电阻Rs的阻值的10倍。When the parameter value of the component is selected, the resistance of the pull-up resistor R1 is greater than 10 times the resistance of the pull-down resistor R2; in order to ensure that the capacitor C is a reliable high level after the charging is completed, the resistance of the pull-down resistor R2 is greater than the current limit. The resistance of the voltage dividing resistor Rs is 10 times.
为消除该插拔模块识别电路中各器件的误差及环境因素的影响,保证电容C在充电时被可靠充满电,第一计时器预设的充电时间大于电容C的最大充电时间的10倍。In order to eliminate the influence of the error and environmental factors of each device in the plug-in module identification circuit, it is ensured that the capacitor C is reliably fully charged during charging, and the preset charging time of the first timer is greater than 10 times of the maximum charging time of the capacitor C.
下拉电阻R2与电容C的取值决定了电容C的放电时间,在不同型号的插拔模块的待检测识别单元2中的电容C设置的容值不同,以实现检测识别单元1根据检测待检测识别单元2的放电时间识别对应的插拔模块的型号。The value of the pull-down resistor R2 and the capacitor C determines the discharge time of the capacitor C. The capacitance values set by the capacitor C in the identification unit 2 of the plug-in module of different models are different, so that the detection and identification unit 1 is detected according to the detection. The discharge time of the identification unit 2 identifies the model of the corresponding plug-in module.
为了主控制器11实现良好的检测,电容C的放电时间控制在0.1ms~10ms范围之内,以此放电时间范围确定可选取的电容C的容值范围。In order to achieve good detection by the main controller 11, the discharge time of the capacitor C is controlled within the range of 0.1 ms to 10 ms, and the range of capacitance values of the selectable capacitor C is determined by the discharge time range.
具体实施时,插拔模块4接入主机3时,首先,检测引脚111通过下拉电阻R2接地,电平拉至低电平,主控制器11读取到低电平,视为插拔模块的接入。接着,主控制器11将检测引脚111拉至高电平并启动第一计时器,使电容C充满电;第一计时器计时结束后,触发主控制器11将检测引脚111设为高阻态模式启动第二计时器计时,电容C不断放电,直至主控制器11读取检测引脚111为低电平状态并停止第二计时器计时。所得计数值为电容C的放电时间,通过电容C的放电时间识别对应的插拔模块型号。In the specific implementation, when the plug-in module 4 is connected to the host 3, first, the detecting pin 111 is grounded through the pull-down resistor R2, the level is pulled to a low level, and the main controller 11 reads the low level, which is regarded as a plug-in module. Access. Then, the main controller 11 pulls the detection pin 111 to a high level and starts the first timer to fully charge the capacitor C. After the first timer expires, the main controller 11 is triggered to set the detection pin 111 to a high resistance. The mode starts the second timer, and the capacitor C is continuously discharged until the main controller 11 reads the detection pin 111 to the low state and stops the second timer. The obtained count value is the discharge time of the capacitor C, and the corresponding plug-in module model is identified by the discharge time of the capacitor C.
本发明提供的插拔模块识别电路的优选实施例基于电容检测技术,并整合插入检测功能,实现了检测识别过程的在插拔模块接入后的自动开始和完成后自动结束,无需特定数据采集接口,仅需判断检测脚是高电平还是低电平即可实现;插拔模块的识别检测只需单根信号线且无上电要求,电路结构简单,实现难度低。The preferred embodiment of the plug-in module identification circuit provided by the invention is based on the capacitance detection technology and integrates the insertion detection function, so that the detection and identification process is automatically started after the plug-in module is accessed and automatically completed after completion, without specific data acquisition. The interface only needs to judge whether the detection pin is high level or low level; the identification detection of the plug-in module requires only a single signal line and no power-on requirement, and the circuit structure is simple and the implementation difficulty is low.
本发明一种插拔模块识别方法的实施例以图1中的插拔模块优选实施例电路结构为基础,该插拔模块识别方法的优选实施例具体步骤如下:An embodiment of the method for identifying a plug-and-pull module of the present invention is based on the circuit structure of the preferred embodiment of the plug-and-pull module of FIG. 1. The specific steps of the preferred embodiment of the plug-in module identification method are as follows:
参见图3,图3是本发明一种插拔模块识别方法的一个实施例的流程示意图。该方法包括步骤:Referring to FIG. 3, FIG. 3 is a schematic flowchart diagram of an embodiment of a method for identifying a pluggable module according to the present invention. The method includes the steps of:
S1、使主机3响应任一插拔模块4的插入;S1, causing the host 3 to respond to the insertion of any plug-in module 4;
具体地,通过设于主机3的检测识别单元1对插入的插拔模块4的待检测识别单元2进行检测并确认与待检测识别单元2的连接,使主机3获取插拔模块4已接入的信息从而启动检测识别单元1对待检测识别单元2的进一步检测。Specifically, the detection and identification unit 2 of the plug-in module 4 is detected by the detection and identification unit 1 of the host 3, and the connection with the identification unit 2 to be detected is confirmed, so that the host 3 acquires the plug-in module 4 The information thus initiates further detection by the detection identification unit 1 to detect the identification unit 2.
其中,检测识别单元1和待检测识别单元2在插拔模块4插入主机3时实现连接。The detection identification unit 1 and the detection identification unit 2 are connected when the plug-in module 4 is inserted into the host 3.
S2、通过检测识别单元1对插入的插拔模块4的待检测识别单元2进行检测,从而获取待测电子元器件2的基本属性的参数值;
S2, detecting, by the detection and identification unit 1, the to-be-detected identification unit 2 of the inserted plug-in module 4, thereby obtaining a parameter value of a basic attribute of the electronic component 2 to be tested;
S3、根据预存的映射表确定S32中获取的参数值所对应的插拔模块4的型号。S3. Determine, according to the pre-stored mapping table, the model of the plug-in module 4 corresponding to the parameter value acquired in S32.
其中,映射表已预置于检测识别单元1中,该映射表储存有不同型号的插拔模块4中的待检测识别单元2的被测电子元器件21的基本属性参数值与插拔模块4的型号的对应关系。The mapping table has been preset in the detection and identification unit 1 , and the mapping table stores the basic attribute parameter values of the electronic component 21 to be tested and the plug-in module 4 of the module 2 to be detected in the plug-in module 4 of different models. Correspondence of the model.
本发明提供的插拔模块识别电路,在插拔模块插入主机时通过检测识别单元测量被测电子元器件的参数值从而识别插拔模块的型号;解决了模块识别时需要多根信号线连接,改善插拔模块需上电的不足;对设备的要求更低,用途更广泛。本发明一种插拔模块识别方法的另一实施例以图2中的插拔模块另一实施例电路结构为基础,该插拔模块识别方法的优选实施例具体步骤如下:The plug-in module identification circuit provided by the invention detects the model value of the plugged-out module by detecting the parameter value of the tested electronic component by detecting the identification unit when the plug-in module is inserted into the host; and solving the module identification requires multiple signal line connections, Improve the lack of power for plugging and unplugging modules; lower requirements for equipment and wider use. Another embodiment of the plug-and-pull module identification method of the present invention is based on the circuit structure of another embodiment of the plug-and-pull module of FIG. 2, and the specific steps of the plug-in module identification method are as follows:
参见图4,图4是本优选实施例中主控制器的流程示意图。当任一插拔模块4插入主机3时,通过检测识别单元1的主控制器11读取到其检测引脚111被插拔模块的下拉电阻R2由预置的高电平状态拉低至低电平状态时,响应该插拔模块的插入;其中,在预置状态时,通过主控制器11设置检测引脚为高阻态模式,从而使检测引脚111在上拉电阻R1的作用下拉至高电平状态。Referring to FIG. 4, FIG. 4 is a schematic flowchart of a main controller in the preferred embodiment. When any plug-in module 4 is inserted into the host 3, the main controller 11 of the detecting unit 1 detects that the pull-down resistor R2 of the plug-in module of the detecting pin 111 is pulled from the preset high state to the low state. In the state of the level, in response to the insertion of the plug-in module; wherein, in the preset state, the detection pin is set to the high-impedance mode by the main controller 11, so that the detection pin 111 is pulled down by the pull-up resistor R1. To a high state.
响应任一插拔模块4插入时,通过主控器11将检测引脚111设置为高电平模式,同时启动第一计时器。此时,通过处于高电平状态的检测引脚111的电流流经限流分压电阻Rs向电容C充电,使电容C和下拉电阻R2的电位上升,当第一计时器计时结束时,电容C、下拉电阻R2和检测引脚111均处于高电平状态。In response to the insertion of any of the plug-in modules 4, the detection pin 111 is set to the high level mode by the main controller 11, and the first timer is started at the same time. At this time, the current passing through the detection pin 111 in the high state state flows through the current limiting voltage dividing resistor Rs to charge the capacitor C, so that the potential of the capacitor C and the pull-down resistor R2 rises, and when the first timer expires, the capacitor C, pull-down resistor R2 and sense pin 111 are both in a high state.
第一计时器计时结束时,视为电容C已充电完成;通过主控制器11触发下一步动作:将检测引脚111设置为高阻态模式,并启动第二计时器,使电容C开始通过下拉电阻R2放电;同时,通过主控制器11开始不断读取检测引脚111的状态。在电容C的电位下降至检测引脚111的高低电平判定阈值前,主控制器11读取检测引脚111为高电平状态。At the end of the first timer, it is considered that the capacitor C has been charged; the next action is triggered by the main controller 11: the detection pin 111 is set to the high impedance mode, and the second timer is started, so that the capacitor C starts to pass. The pull-down resistor R2 is discharged; at the same time, the state of the detection pin 111 is continuously read by the main controller 11. The main controller 11 reads the detection pin 111 to a high state before the potential of the capacitor C falls to the high and low level determination threshold of the detection pin 111.
通过主控器11读取到检测引脚111的电平为低电平时,停止第二计时器计时,进而获取所述第二计时器的计数值,计数值为电容C的放电时间。用电容C的放电时间的长短来表示电容C的阻值的大小。When the master 11 reads that the level of the detection pin 111 is low, the second timer is stopped, and the count value of the second timer is acquired, and the count value is the discharge time of the capacitor C. The magnitude of the resistance of the capacitor C is represented by the length of the discharge time of the capacitor C.
通过主控制器11根据预存的映射表确定电容C的放电时间所对应的插拔模块4的型号。其中,映射表储存不同型号的插拔模块4中的待检测识别单元2的电容C的放电时间与插拔模块的型号的对应关系。The model of the plug-in module 4 corresponding to the discharge time of the capacitor C is determined by the main controller 11 according to the pre-stored mapping table. The mapping table stores the correspondence between the discharge time of the capacitor C of the identification unit 2 to be detected and the model of the plug-in module in the plug-in module 4 of different models.
具体实施时,通过检测引脚111被接入的下拉电阻R2拉至低电平状态,使主控制器11读取到检测引脚111的低电平而触发对插拔模块4接入的响应;通过主控制器11控制检测引脚111的电平模式和利用第一计时器和第二计时器计时,从而获取插拔模块4中的电容C的放电时间;通过电容C的放电时间得出对应的插拔模块4的型号。
In a specific implementation, the pull-down resistor R2 that is connected to the pin 111 is pulled to a low state, so that the main controller 11 reads the low level of the detection pin 111 to trigger a response to the plug-in module 4 access. The level mode of the detection pin 111 is controlled by the main controller 11 and the timing of the capacitor C in the plug-in module 4 is obtained by using the first timer and the second timer; the discharge time of the capacitor C is obtained. The model number of the corresponding plug-in module 4.
本发明提供的插拔模块识别方法的优选实施例实现对接入的插拔模块的检测识别过程自动开始,自动结束;所需要的电路结构简单,信号线少;对插拔模块无上电的限制,可适用于不具备总线通讯功能的插拔模块。The preferred embodiment of the plug-and-pull module identification method provided by the present invention automatically starts and automatically ends the detection and identification process of the plug-in module that is accessed; the required circuit structure is simple, the signal line is small; and the plug-in module has no power-on Restricted, it can be applied to plug-in modules that do not have bus communication function.
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和变形,这些改进和变形也视为本发明的保护范围。
The above is a preferred embodiment of the present invention, and it should be noted that those skilled in the art can also make several improvements and modifications without departing from the principles of the present invention. It is the scope of protection of the present invention.
Claims (14)
- 一种插拔模块识别电路,其特征在于,包括:A plug-in module identification circuit, comprising:设于插拔模块上的待检测识别单元,所述待检测识别单元包括被测电子元器件,不同型号的所述插拔模块的待检测识别单元的被测电子元器件的基本属性参数值不同;The to-be-detected identification unit is disposed on the plug-in module, and the to-be-detected identification unit includes the electronic component to be tested, and the basic attribute parameter values of the electronic component to be tested of the to-be-detected identification unit of the plug-in module of different types are different. ;设于主机的检测识别单元,用于检测所述插拔模块的插入并通过检测所述被测电子元器件的基本属性参数值识别所述插拔模块的型号;a detection and identification unit disposed on the host, configured to detect insertion of the plug-in module and identify a model of the plug-in module by detecting a basic attribute parameter value of the tested electronic component;所述检测识别单元和所述待检测识别单元通过所述插拔模块插入所述主机实现连接。The detection and identification unit and the to-be-detected identification unit are connected by inserting the plug-in module into the host.
- 如权利要求1所述的插拔模块识别电路,其特征在于,所述实现连接的所述检测识别单元和所述待检测识别单元通过所述插拔模块与所述主机之间的信号传输线实现连接。The plug-in module identification circuit according to claim 1, wherein the detection and identification unit and the to-be-detected identification unit that implement the connection are realized by a signal transmission line between the plug-in module and the host connection.
- 如权利要求1所述的插拔模块识别电路,其特征在于,所述被测电子元器件为电容,不同型号的所述插拔模块的待检测识别单元的电容的容值不同。The plug-in module identification circuit according to claim 1, wherein the electronic component to be tested is a capacitor, and capacitances of the identification unit to be detected of the plug-in module of different models are different in capacitance.
- 如权利要求3所述的插拔模块识别电路,其特征在于,所述检测识别单元包括直流电源、上拉电阻、限流分压电阻、第一接口、主控制器以及设于主控制器的计时器,所述主控器设有检测引脚;The plug-in module identification circuit according to claim 3, wherein the detection and identification unit comprises a DC power supply, a pull-up resistor, a current limiting voltage dividing resistor, a first interface, a main controller, and a main controller. a timer, the main controller is provided with a detection pin;所述上拉电阻的一端连接所述直流电源,所述上拉电阻的另一端分别连接所述第一接口和所述限流分压电阻的一端;One end of the pull-up resistor is connected to the DC power source, and the other end of the pull-up resistor is respectively connected to one end of the first interface and the current limiting resistor;所述限流分压电阻的另一端连接到所述检测引脚。The other end of the current limiting resistor is connected to the detection pin.
- 如权利要求4所述的插拔模块识别电路,其特征在于,所述待检测识别单元还包括下拉电阻和第二接口;The plug-in module identification circuit according to claim 4, wherein the to-be-detected identification unit further comprises a pull-down resistor and a second interface;所述电容的正极连接所述第二接口,所述电容的负极接地;The anode of the capacitor is connected to the second interface, and the cathode of the capacitor is grounded;所述下拉电阻的一端连接所述第二接口,所述下拉电阻的另一端接地;One end of the pull-down resistor is connected to the second interface, and the other end of the pull-down resistor is grounded;所述检测识别单元和所述待检测识别单元连接时,所述第一接口和所述第二接口连接。The first interface and the second interface are connected when the detection and identification unit is connected to the to-be-detected identification unit.
- 如权利要求5所述的插拔模块识别电路,其特征在于,所述计时器包括第一计时器和第二计时器;所述第一计时器用于限定所述电容的充电时间;所述第二计时器用于测量所述电容放电到所述检测引脚的高低电平判定阈值的放电时间。 The plug-in module identification circuit according to claim 5, wherein the timer comprises a first timer and a second timer; the first timer is configured to define a charging time of the capacitor; The second timer is configured to measure a discharge time at which the capacitor discharges to a high and low determination threshold of the detection pin.
- 如权利要求6所述的插拔模块识别电路,其特征在于,所述上拉电阻的阻值大于所述下拉电阻的阻值的10倍,所述下拉电阻的阻值大于所述限流分压电阻的阻值的10倍。The plug-in module identification circuit according to claim 6, wherein the resistance of the pull-up resistor is greater than 10 times the resistance of the pull-down resistor, and the resistance of the pull-down resistor is greater than the current limit The resistance of the resistor is 10 times.
- 如权利要求7所述的插拔模块识别电路,其特征在于,所述第一计时器预设的充电时间大于所述电容的最大充电时间的10倍。The plug-in module identification circuit according to claim 7, wherein the first timer preset charging time is greater than 10 times of a maximum charging time of the capacitor.
- 如权利要求8所述的插拔模块识别电路,其特征在于,所述放电时间在0.1ms~10ms范围之内。The plug-in module identification circuit according to claim 8, wherein said discharge time is in a range of 0.1 ms to 10 ms.
- 一种插拔模块识别方法,其特征在于,包括以下步骤:A plug module identification method, comprising the steps of:响应任一插拔模块插入时,通过检测识别单元对插入的所述插拔模块的待检测识别单元进行检测,从而获取所述被测电子元器件的基本属性的参数值;其中,所述检测识别单元和所述待检测识别单元在响应所述插拔模块插入时实现连接;Detecting, by the detection and identification unit, the detected identification unit of the inserted and removed module to be detected, thereby acquiring a parameter value of a basic attribute of the electronic component to be tested; wherein the detecting The identification unit and the identification unit to be detected realize connection in response to insertion of the plug-in module;根据预存的映射表确定所述参数值所对应的所述插拔模块的型号;其中,所述映射表储存不同型号的插拔模块中的待检测识别单元的被测电子元器件的基本属性参数值与所述插拔模块的型号的对应关系。Determining, according to the pre-stored mapping table, a model number of the plug-in module corresponding to the parameter value; wherein the mapping table stores basic attribute parameters of the tested electronic component of the to-be-detected identification unit in different types of plug-in modules Correspondence between the value and the model of the pluggable module.
- 如权利要求10所述的模块识别方法,其特征在于,响应任一所述插拔模块插入包括:The module identification method according to claim 10, wherein responding to any of the plug-in module insertions comprises:通过所述检测识别单元的主控制器读取到其检测引脚被所述插拔模块的下拉电阻由高电平状态拉低至低电平状态时,确定所述插拔模块插入;其中,所述高电平状态为初始处于高阻态模式的所述检测引脚被上拉电阻拉至高电平的预置电平状态。When the main controller of the detection and identification unit reads that the detection pin is pulled from the high-level state to the low state by the pull-down resistor of the plug-in module, it is determined that the plug-in module is inserted; The high level state is a preset level state in which the detection pin initially in the high resistance mode is pulled to a high level by a pull-up resistor.
- 如权利要求10所述的模块识别方法,其特征在于,所述被测电子元器件为电容,所述基本属性参数值为电容容值。The module identification method according to claim 10, wherein the electronic component to be tested is a capacitor, and the basic attribute parameter value is a capacitance value.
- 如权利要求12所述的模块识别方法,其特征在于,所述电容容值的大小通过所述电容在充满电状态下放电至所述检测引脚的高低电平判定阈值的放电时间的长短来表示。The module identification method according to claim 12, wherein the magnitude of the capacitance value is obtained by discharging the capacitor to a high and low level determination threshold of the detection pin in a fully charged state. Said.
- 如权利要求13所述的模块识别方法,其特征在于,通过检测识别单元对插入的所述插拔模块的待检测识别单元进行检测包括以下步骤:The module identification method according to claim 13, wherein detecting the to-be-detected identification unit of the inserted plug-in module by detecting the identification unit comprises the following steps:通过所述主控器将所述检测引脚设置为高电平模式,同时启动第一计时器,使所述电容 进入充电状态;Setting the detection pin to a high level mode by the main controller, and simultaneously starting a first timer to make the capacitor Entering the state of charge;所述第一计时器计时结束时,通过所述主控制器将所述检测引脚设置为高阻态模式,同时启动第二计时器,使所述电容进入放电状态;When the first timer expires, the detection pin is set to a high impedance mode by the main controller, and the second timer is started to bring the capacitor into a discharge state;通过所述主控器读取到所述检测引脚的电平为低电平时,停止所述第二计时器计时,从而获取所述第二计时器的计数值,所述计数值为所述放电时间。 Stopping, by the main controller, when the level of the detection pin is low, stopping the second timer, thereby acquiring a count value of the second timer, the count value being Discharge time.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610806261.1A CN106445862B (en) | 2016-09-06 | 2016-09-06 | Plug-in module identification circuit and method |
CN201610806261.1 | 2016-09-06 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018045687A1 true WO2018045687A1 (en) | 2018-03-15 |
Family
ID=58165068
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/113373 WO2018045687A1 (en) | 2016-09-06 | 2016-12-30 | Plug module recognition circuit and method |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106445862B (en) |
WO (1) | WO2018045687A1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111812554A (en) * | 2020-07-24 | 2020-10-23 | 上海星融汽车科技有限公司 | On-board diagnostic (OBD) interface plug-pull state detection device based on photoresistor and detection method thereof |
CN112422108A (en) * | 2020-11-18 | 2021-02-26 | 浙江颐顿机电有限公司 | Pedal remote control automatic identification system and identification method |
EP3828716A1 (en) * | 2019-11-29 | 2021-06-02 | Beijing Xiaomi Mobile Software Co., Ltd. | Method and apparatus for identifying electronic device, terminal device, and electronic device |
CN114739543A (en) * | 2022-04-21 | 2022-07-12 | 深圳国微感知技术有限公司 | Adaptive identification system for pressure distribution measurement |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107682040B (en) * | 2017-11-20 | 2020-02-18 | 珠海市魅族科技有限公司 | Identification circuit and identification method of terminal network system |
CN108768379B (en) * | 2018-05-31 | 2022-04-05 | 华勤技术股份有限公司 | Polymorphic identification method, polymorphic identification system and terminal |
CN109358238A (en) * | 2018-09-27 | 2019-02-19 | 普联技术有限公司 | A kind of antenna fool proof circuit and device |
CN109560417B (en) * | 2018-11-02 | 2020-06-23 | 深圳市航天新源科技有限公司 | Connecting module, identification system and identification method of multi-type cables |
CN110133402A (en) * | 2019-05-14 | 2019-08-16 | 惠州Tcl移动通信有限公司 | A kind of position finding and detection method, system and the mobile terminal of circuit board screw |
CN111475448B (en) * | 2020-03-05 | 2023-04-07 | 成都娄外科技有限公司 | USB device insertion state detection method and device and USB device |
CN112109567B (en) * | 2020-08-18 | 2022-04-22 | 上海都都亮科技有限公司 | Charging method, charging circuit and charging equipment |
CN114624635B (en) * | 2022-05-17 | 2023-07-25 | 陕西天视致远航空技术有限公司 | Plug detection system and method of VGA display interface and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1924845A (en) * | 2005-08-31 | 2007-03-07 | 英业达股份有限公司 | Extension card recognition system |
CN101483528A (en) * | 2009-02-23 | 2009-07-15 | 福建星网锐捷网络有限公司 | Modular communication device and management module |
CN102708077A (en) * | 2012-05-25 | 2012-10-03 | 华为终端有限公司 | State recognition method and state recognition apparatus |
CN103543682A (en) * | 2013-11-06 | 2014-01-29 | 深圳市邦彦信息技术有限公司 | Method and device for identifying input state by common IO port |
CN105137325A (en) * | 2015-09-02 | 2015-12-09 | Tcl移动通信科技(宁波)有限公司 | FPC detecting device and method |
-
2016
- 2016-09-06 CN CN201610806261.1A patent/CN106445862B/en active Active
- 2016-12-30 WO PCT/CN2016/113373 patent/WO2018045687A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1924845A (en) * | 2005-08-31 | 2007-03-07 | 英业达股份有限公司 | Extension card recognition system |
CN101483528A (en) * | 2009-02-23 | 2009-07-15 | 福建星网锐捷网络有限公司 | Modular communication device and management module |
CN102708077A (en) * | 2012-05-25 | 2012-10-03 | 华为终端有限公司 | State recognition method and state recognition apparatus |
CN103543682A (en) * | 2013-11-06 | 2014-01-29 | 深圳市邦彦信息技术有限公司 | Method and device for identifying input state by common IO port |
CN105137325A (en) * | 2015-09-02 | 2015-12-09 | Tcl移动通信科技(宁波)有限公司 | FPC detecting device and method |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3828716A1 (en) * | 2019-11-29 | 2021-06-02 | Beijing Xiaomi Mobile Software Co., Ltd. | Method and apparatus for identifying electronic device, terminal device, and electronic device |
US11452040B2 (en) | 2019-11-29 | 2022-09-20 | Beijing Xiaomi Mobile Software Co., Ltd. | Method and apparatus for identifying electronic device, terminal device, and electronic device |
CN111812554A (en) * | 2020-07-24 | 2020-10-23 | 上海星融汽车科技有限公司 | On-board diagnostic (OBD) interface plug-pull state detection device based on photoresistor and detection method thereof |
CN112422108A (en) * | 2020-11-18 | 2021-02-26 | 浙江颐顿机电有限公司 | Pedal remote control automatic identification system and identification method |
CN114739543A (en) * | 2022-04-21 | 2022-07-12 | 深圳国微感知技术有限公司 | Adaptive identification system for pressure distribution measurement |
Also Published As
Publication number | Publication date |
---|---|
CN106445862B (en) | 2019-01-08 |
CN106445862A (en) | 2017-02-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018045687A1 (en) | Plug module recognition circuit and method | |
US9128691B2 (en) | Method and terminal for selecting internal circuit according to USB interface status | |
US9483093B2 (en) | Electronic device and method for controlling a setting of a maximum consumption current | |
US9444278B2 (en) | USB charging with data communication | |
WO2015141964A1 (en) | Input/output interface control method and electronic apparatus performing same | |
CN103633709B (en) | A kind of charging recognition system and recognition methods thereof | |
RU2676866C2 (en) | Method and device for controlling a device mode | |
US8970165B2 (en) | Determination circuit | |
US20100052620A1 (en) | Battery charger ic including built-in usb detection | |
CN106020176B (en) | A kind of CC logic controls chip low-power consumption connecting detection method and structure | |
CN103198033A (en) | Apparatus and method of identifying a USB or an MHL device | |
CN107688521A (en) | A kind of server power supply detects circuit and detection method in place | |
US20130283028A1 (en) | Adapter identification system and method for computer | |
CN106936496B (en) | Hot plug device for multiple IIC communication devices | |
CN105071484A (en) | Charging method and apparatus of terminal having data exchange function | |
TWI501085B (en) | Usb interface detection device | |
CN104714916A (en) | Detection system for plugging or unplugging of external equipment on USB interface | |
CN105824732A (en) | USB detection method and detection system | |
CN103235191A (en) | Satellite add-drop separation signal detection device | |
CN117374672A (en) | USB-C load safety access circuit and control method and equipment thereof | |
CN108628794B (en) | Interface control circuit and control method thereof | |
TWM483428U (en) | USB interface automatic test apparatus | |
CN204129732U (en) | Based on the board self-adaptation equipment of satellite time transfer machine frame system | |
CN109101376B (en) | USB speed measuring device and system | |
TWI583979B (en) | Detection device, detection method and electronic apparatus |
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: 16915621 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 06/08/2019) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16915621 Country of ref document: EP Kind code of ref document: A1 |