Invention content
It is an object of the invention to disclose the address device and method of each module in a kind of system, avoids and opened using dial-up
The problem of closing to causing the wasting of resources when each module's address positions in system.
To achieve the above object, the embodiment of the invention discloses following technical solutions:
On the one hand, the embodiment of the invention discloses a kind of address location devices of each module in system, including:
Toggle switch, the voltage-controlled conversion module being connect with the output end of the toggle switch are used for the toggle switch
The signal of output is converted to corresponding impulse wave, the address detected module being connect with the output interface of the voltage-controlled conversion module,
For detecting address code corresponding with the impulse wave;
Wherein, the output interface of the voltage-controlled conversion module is connect with described address detection module by a data wire.
Preferably, the voltage-controlled conversion module is specially NE555P chips, then corresponding, the output end of the toggle switch
It is connect with the DISCH interfaces of the NE555P chips, described address detection module and the OUT interfaces of the NE555P chips connect
It connects.
Preferably, further include:Signal-isolated transmission module;
Wherein, the input terminal of the signal-isolated transmission module is connect with the output interface of the voltage-controlled conversion module, institute
The output end for stating signal-isolated transmission module is connect with described address detection module.
Preferably, between the signal-isolated transmission module and the voltage-controlled conversion module, the signal-isolated transmission mould
It is connected by optical cable between block and described address detection module.
Preferably, the data line is specially optical cable.
Preferably, the signal-isolated transmission module is specially photo-coupler, corresponding, the input terminal of the photo-coupler
It is connect with the output interface of the voltage-controlled conversion module, the output end of the photo-coupler is connect with described address detection module.
Preferably, described address detection module is specially 51 microcontrollers.
On the other hand, the invention discloses a kind of address locating methods of each module in system, including:
The signal that toggle switch exports is converted into impulse wave corresponding with the signal;
Address code corresponding with the impulse wave is parsed according to pre-set resolution rules.
Preferably, further include:
The pulse arrival signal-isolated transmission module is sent with by arteries and veins described in the signal-isolated transmission module transfer
Rush wave.
Preferably, described to include according to pre-set resolution rules parsing address code corresponding with the impulse wave:
Parse the frequency and/or pulsewidth of the impulse wave;
Determine the setting range where with the frequency and/or the pulsewidth;
Determine address code corresponding with the setting range.
As it can be seen that in a kind of system disclosed by the invention each module address location device, including toggle switch opens with dial-up
The voltage-controlled conversion module of the output end connection of pass, the signal for exporting toggle switch is converted to corresponding impulse wave, with pressure
The address detected module for controlling the output interface connection of conversion module, for detecting address code corresponding with impulse wave;Wherein, described
The output interface of voltage-controlled conversion module is connect with address detected module by a data wire.As it can be seen that in the present solution, utilizing dial-up
After switch presets the address of each module, the signal that each toggle switch exports is converted to by impulse wave by voltage-controlled conversion module, only
A data wire is needed to connect voltage-controlled conversion module with address detected module, it is fixed to the address of each module in system to realize
Position, avoids and 8 lines of toggle switch is connected to problem of resource waste caused by digit chip in the prior art.This hair
The bright address locating methods for also disclosing each module in a kind of system, effect are as above.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
The embodiment of the invention discloses the address devices and method of each module in a kind of system, avoid using toggle switch
The problem of to causing the wasting of resources when each module's address positions in system.
Refer to Fig. 1, Fig. 1 is the address location device of each module in a kind of system disclosed in the first embodiment of the invention
Structural schematic diagram, the device include:Toggle switch 101, the voltage-controlled conversion module 102 being connect with the output end of toggle switch 101,
Signal for exporting toggle switch 101 is converted to corresponding impulse wave, is connect with the output interface of voltage-controlled conversion module 102
Address detected module 103, for detecting corresponding with impulse wave address code;Wherein, the output interface of voltage-controlled conversion module 102
It is connect by a data wire with address detected module 103.
Specifically, in the present embodiment, toggle switch 101 is dialled using existing toggle switch on the market, such as half spacing type
The toggle switch etc. of code switch, the toggle switch of DIP flat patterns, DIP sliding-types.Certainly, in the present embodiment, the type of toggle switch
The implementation of the embodiment of the present invention can't be impacted, therefore, the embodiment of the present invention for toggle switch type herein simultaneously
It is not construed as limiting.Further, voltage-controlled conversion module 102 can be 555 oscillating circuits, oscillator, trigger etc..In view of voltage-controlled turn
The installability and portability for changing the mold block 102, in the present embodiment, voltage-controlled conversion module is specially NE555P chips, then corresponding,
The output end of toggle switch 101 is connect with the DISCH interfaces of NE555P chips, address detected module 103 and NE555P chips
OUT interfaces connect.Toggle switch 101 is placed in zero-bit or is allocated to 1 of lower part so that each work(in each system is arranged by that will switch
The address code of energy module.For example, the address bit of a certain module is 10100001 in setting system.Wherein, toggle switch 101 is arranged
After the address bit of good each module, the signal that toggle switch 101 exports is input to voltage-controlled conversion module 102, passes through voltage-controlled conversion
Module 102 converts the signal into the impulse wave of specific frequency.Wherein, the ground of each function module is set by toggle switch 101
Location can be divided into following two steps, then be opened again dial-up into row address coarse adjustment the signal of the output of toggle switch 101 first
The signal of 101 outputs is closed into row address fine tuning.Wherein, include into row address coarse adjustment to the signal of the output of toggle switch 101:Adjustment
Larger component in voltage controlled capacitor and thyrite in voltage-controlled conversion module 102 so that voltage-controlled conversion module 102 is transformed
The frequency of impulse wave is in a larger range, for example, the frequency accuracy of the output impulse wave of voltage-controlled conversion module 102 is set
It is set to 1000HZ, passes through the frequency for the impulse wave that the voltage-controlled conversion module 102 that the address coarse adjustment in voltage-controlled conversion module 102 makes exports
Change during rate 1000HZ-2000HZ, therefore, address of the pulse wave frequency rate in 1000HZ-2000HZ frequencies can be determined
Justice is the address of first group of module, and so on.Positioning function can be easy to when address detects by adopting this method
The big group in address of module.To toggle switch 101 export signal include into row address fine tuning:Adjust voltage-controlled conversion module 102
In voltage controlled capacitor and thyrite in relatively small component so that the frequency of impulse wave that voltage-controlled conversion module 102 exports is in
Small range sets a wide range of precision of the frequency of impulse wave for example, when the signal that toggle switch 101 is exported carries out coarse adjustment
It is set to 1000HZ, when the signal that toggle switch 101 is exported carries out fine tuning, impulse wave that voltage-controlled conversion module 102 is exported
Set of frequency is hundred hertz or ten hertz of sections, therefore, the frequency of impulse wave can be detected precision setting in 10HZ or
In 100HZ, and so on.It just can determine that function module more accurate position in systems in this way.
Further, it is contemplated that when being connected between the output interface and address detected module 103 of voltage-controlled conversion module 102, pressure
The transmission for the impulse wave that control conversion module 102 exports can there is a situation where to be disturbed, therefore, to avoid voltage-controlled conversion module 102
The impulse wave of output is by external interference, and as preferred embodiment, data line is specially optical cable.Certainly, the type pair of data line
The implementation of the embodiment of the present invention can't impact, as long as ensureing between voltage-controlled conversion module 102 and address detected module 103
It can carry out signal transmission, the embodiment of the present invention herein and is not construed as limiting.
In view of there are distortion or disturbed feelings in transmission process in the impulse wave exported through voltage-controlled conversion module 102
Condition, therefore, the invention discloses second of embodiments, refer to Fig. 2, and Fig. 2 is a kind of disclosed in second of embodiment of the invention
The address location apparatus structure schematic diagram of each module in system further includes:Signal-isolated transmission module 104;
Wherein, the input terminal of signal-isolated transmission module 104 is connect with the output interface of voltage-controlled conversion module 102, signal
The output end of isolated transmission module 104 is connect with address detected module 103.
Specifically, in the present embodiment, signal-isolated transmission module 104 realizes the pulse of the output of voltage-controlled conversion module 102
Wave from address end to address detected module 103 transmission, signal-isolated transmission module 104 can be by semiconductor devices such as isolation optocouplers
The combinations such as part, resistance, capacitance, conducting wire are formed by connecting.To realize that the impulse wave that voltage-controlled conversion module 102 exports is effectively undistorted
Isolation be transmitted to address detected module 103.In view of between signal-isolated transmission circuit 104 and voltage-controlled conversion module 102, believing
Number there are problems that interference and signal decaying between isolation and transmission circuit 105 and address detected module 103 when signal transmission.Make
For preferred embodiment, between signal-isolated transmission module 104 and voltage-controlled conversion module 102, signal-isolated transmission module 104 with
It is connected by optical cable between address detected module 103.Certainly, signal-isolated transmission module 104 and voltage-controlled conversion module 102 it
Between, it can also be connected by other kinds of connecting line between signal-isolated transmission module 104 and address detected module 103,
This embodiment of the present invention is simultaneously not construed as limiting.
Further, it is contemplated that the portability of signal-isolated transmission circuit 104, signal-isolated transmission circuit 104 are specially light
Coupler, corresponding, the input terminal of photo-coupler is connect with the output interface of voltage-controlled conversion module, the output end of photo-coupler with
Address detected module connects.It should be noted that in the present embodiment, the type of signal-isolated transmission circuit 104 may be it
His type.The embodiment of the present invention herein and is not construed as limiting.
Address detected module 103 can be digit chip or relevant control chip, as preferred embodiment, address inspection
It is specially 51 microcontrollers to survey module 103.Certainly, address detected module 103 or other kinds of control chip, as long as protecting
The pulse signal that card can export voltage-controlled conversion module 102 parse, and the embodiment of the present invention herein and is not construed as limiting.
As it can be seen that in a kind of system disclosed by the embodiments of the present invention each module address location device, including toggle switch, with
The voltage-controlled conversion module of the output end connection of toggle switch, the signal for exporting toggle switch are converted to corresponding pulse
Wave, the address detected module being connect with the output interface of voltage-controlled conversion module, for detecting address code corresponding with impulse wave;Its
In, the output interface of the voltage-controlled conversion module is connect with address detected module by a data wire.As it can be seen that in the present solution,
Behind the address for presetting each module using toggle switch, the signal that each toggle switch exports is converted to by arteries and veins by voltage-controlled conversion module
Rush wave, it is only necessary to which voltage-controlled conversion module is connect by a data wire with address detected module, can be realized to each module in system
Address location, avoid and 8 lines of toggle switch are connected to the wasting of resources caused by digit chip in the prior art ask
Topic.
The address locating methods of each module in a kind of system disclosed by the embodiments of the present invention are introduced below, are referred to
Fig. 3, Fig. 3 are the localization method flow diagram of each module in a kind of system disclosed in the third embodiment of the invention, this method
Including:
S301, the signal that toggle switch exports is converted into impulse wave corresponding with signal.
S302, address code corresponding with impulse wave is parsed according to pre-set resolution rules.
Further include as preferred embodiment based on above example:
The pulse arrival signal-isolated transmission module is sent with by arteries and veins described in the signal-isolated transmission module transfer
Rush wave.
Based on above example, as preferred embodiment, according to the parsing of pre-set resolution rules and impulse wave pair
The address code answered includes:
Parse the frequency and/or pulsewidth of impulse wave;
Determine the setting range where with frequency and/or pulsewidth;
Determine address code corresponding with setting range.
It should be noted that in a kind of system in the embodiment of the present invention address locating methods of each module with it is above-mentioned arbitrary
The address location device of each module is corresponding in a kind of system that one embodiment is mentioned, and therefore, the embodiment of the present invention is herein not
It is described in detail again.
In order to which preferably technical solution disclosed by the invention is further detailed, present invention combination practical application field
The solution of the present invention is described in detail in scape, wherein voltage-controlled conversion module 102 uses NE555P cores in the present embodiment
Piece, address detected module 103 are indicated using control chip in the present embodiment.Fig. 4 is referred to, Fig. 4 is the 4th kind of reality of the invention
Apply the circuit diagram of the address location device of each module in a kind of system disclosed in example;As shown in figure 4, toggle switch 101
Pin 1, pin 2, pin 3, pin 4 are connected with the THRES pins (6 pin) of NE555P chips with TRICH pins (2 pin),
Pin 13, pin 14, pin 15 and the pin 16 of toggle switch are connect with the DISCH pins of NE555P chips (7 pin).
Wherein, pin 13 is connected to pull-up resistor R4, and pin 14 is connected to pull-up resistor R3, and pin 15 is connected to pull-up resistor R2, and pin 16 connects
There is pull-up resistor R1.The pin 9 and pin 10 of toggle switch are also connect with 6 pins of NE555P chips and 2 pins, toggle switch
Pin 7 connect with capacitance C1, the pin 8 of toggle switch is connect with capacitance C2, and capacitance C1 and C2 are connect with ground terminal;NE555P
The pin 4 of chip connects+5V power supplys, and the pin 8 of NE555P chips is connect with one end of pin 4 and resistance R5, the other end of R5
Connect with the pin 7 of one end of resistance R6 and NE555P chips, the other end of resistance R6 respectively with one end of capacitance C3 and
The pin 2 and pin 6 of NE555P chips connect, and the other end of capacitance C3 is connect with ground terminal.The pin 1 of NE555P chips is grounded.
The pin 3 of NE555P chips is connect with one end of resistance R7, and the other end of resistance R7 is connect with signal-isolated transmission module 104,
The pin 5 of NE555P chips is connect with one end of capacitance C4, the other end of capacitance C4 respectively with ground terminal and signal-isolated transmission mould
Block 104 connects, and the output end of signal-isolated transmission module 104 is connect with control chip.
It should be noted that this application scene is only the one of which embodiment of scheme provided by the invention, application
Technical solution provided by the invention, actual circuit structure can also have other types, not limited in this embodiment of the present invention
It is fixed.
Detailed Jie has been carried out to the address location device and method of each module in a kind of system of the disclosure as set forth herein above
It continues.Specific examples are used herein to illustrate the principle and implementation manner of the present application, and the explanation of above example is only
It is to be used to help understand the method for this application and its core ideas.It should be pointed out that for those skilled in the art
For, under the premise of not departing from the application principle, can also to the application, some improvement and modification can also be carried out, these improve and repair
Decorations are also fallen into the application scope of the claims.
Each embodiment is described by the way of progressive in specification, the highlights of each of the examples are with other realities
Apply the difference of example, just to refer each other for identical similar portion between each embodiment.For device disclosed in embodiment
Speech, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related place is referring to method part illustration
?.
It should also be noted that, in the present specification, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that the process, method, article or equipment including a series of elements includes not only that
A little elements, but also include other elements that are not explicitly listed, or further include for this process, method, article or
The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged
Except there is also other identical elements in the process, method, article or apparatus that includes the element.