CN100389412C - Method for automatically identifying multiple serial device positions - Google Patents

Method for automatically identifying multiple serial device positions Download PDF

Info

Publication number
CN100389412C
CN100389412C CNB2004100772997A CN200410077299A CN100389412C CN 100389412 C CN100389412 C CN 100389412C CN B2004100772997 A CNB2004100772997 A CN B2004100772997A CN 200410077299 A CN200410077299 A CN 200410077299A CN 100389412 C CN100389412 C CN 100389412C
Authority
CN
China
Prior art keywords
digital signal
input end
input
bus
serial
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2004100772997A
Other languages
Chinese (zh)
Other versions
CN1783042A (en
Inventor
李诗颖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Original Assignee
Hongfujin Precision Industry Shenzhen Co Ltd
Hon Hai Precision Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hongfujin Precision Industry Shenzhen Co Ltd, Hon Hai Precision Industry Co Ltd filed Critical Hongfujin Precision Industry Shenzhen Co Ltd
Priority to CNB2004100772997A priority Critical patent/CN100389412C/en
Publication of CN1783042A publication Critical patent/CN1783042A/en
Application granted granted Critical
Publication of CN100389412C publication Critical patent/CN100389412C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Small-Scale Networks (AREA)

Abstract

The present invention discloses a method for automatically identifying the positions of a plurality of serial devices. The method comprises the following steps: serial devices which are connected in series are started up; a Ta time period is delayed; whether an input signal of the input end of a current device is zero or not is judged; if the input signal of the input end of the current device is zero, the position of the serial device is 1, namely that the device is a first device; a Tb time period is delayed; the output end of the first device outputs S1; on the contrary, if the input signal of the input end of the current device is not zero, the input end of the current device waits to input S (N-1) and the position of the device is N which is larger than 1; the Nth device outputs a digital signal SN. The position of each device can be identified under the condition of not changing the arrangement of the serial devices by the present invention, and accordingly, the present invention has the advantages of simplifying installation procedures and providing convenience for stock management at the same time.

Description

Automatically distinguish the method for a plurality of serial device positions
[technical field]
The present invention relates to a kind of method of distinguishing a plurality of serial device positions automatically.
[background technology]
The I of Philip 2C (Inter Integrated Circuit) bus is because of having the characteristic of plug and play two-wire interface, and its low implementation cost has in addition become in numerous electronic application that industry is used for realizing controlling, safeguard and the standard serial bus of function such as configuration.
Be connected I 2I on the C bus 2The C device need be by I separately 2C position (I 2C SlaveAddress) could visit.Traditional I 2The position of C device is provided with, and is by each I 2Hardware on the circuit board of C device preestablishes.I 2The C bus defines an I 2The C device is only to set an I 2C position, and I 2The setting range of C position is OO-FF.For example, most of I 2(Electrically ErasableProgrammable Read Only Memory EEROM) has three rubber pins (Strapping Pin), the I of these EEROM to the erasable programmable read-only memory of the electronics that C can visit 2C set positions scope is AO-AF.
But, other similar I 2Some of C device are installed, as are connected the device on the IC bus, with I 2The C device is the same, and is all different because of the setting of its each device, makes installation personnel be difficult to divide the position of differentiating different device when mounted, can need separately deposit because the polyphone position is different when warehouse stock in addition, causes very big inconvenience therefore for installation and stock.
Therefore be necessary to provide a kind of under the situation that does not change the series device setting, automatically the method for discriminating device position.
[summary of the invention]
At the deficiency of prior art, the invention provides a kind of method of distinguishing a plurality of serial device positions automatically, this method can not change under the situation that series device sets the position of condition discriminating apparatus automatically.
This method comprises the following steps: to start the series device that is connecting; Postpone the Ta time, wherein Ta is one section specific time span, enough allows all series devices start, and to make the output terminal output signal of each series device be 1; Whether the input signal of judging the input end of current device is 0; If the input signal of current input end is 0, then the position of this series device be 1 promptly this device be first the device, postpone Tb, Tb>Ta wherein, postponing Tb is when exporting the first digital signal S (1) for the output terminal of guaranteeing first device, the input end of second device has prepared to receive first digital signal S (1) signal, avoids making a mistake with this, and the output terminal of first device is exported the first digital signal S (1); On the contrary, if the input signal of current device input end is not 0, promptly the input end of current device is waited for input N-1 digital signal S (N-1), and then this device is the N device, N>1 wherein, and this N device is exported N digital signal S (N).
By the present invention, can under the situation that does not change the series device setting, distinguish the position of each device, thereby simplify installation procedure, make that installation personnel does not need to do different settings and adjustment for the device of each diverse location; Made things convenient for simultaneously stock control, device can not have any difference because the polyphone position is different yet, and making does not need special differentiation yet on the stock.
[description of drawings]
Fig. 1 is the applied environment figure of the present invention's method of distinguishing a plurality of serial device positions automatically.
Fig. 2 is the annexation figure between each device of the present invention.
Fig. 3 is the digital signal synoptic diagram that transmits in the electrical cable among the present invention.
Fig. 4 is an operation process chart of distinguishing each setting position of the present invention.
[embodiment]
Consulting shown in Figure 1ly, is the applied environment figure of the present invention's method of distinguishing a plurality of serial device positions automatically.For describing the course of work of series device of the present invention, existing with I 2The C device is that example is set forth.It comprises an I 2C driving arrangement 110 (I 2C Bus Driver) and an I 2C bus 120, a plurality of I 2C device (I 2C Slave Device) 130,140,150 is connected I 2On the C bus 120, only draw three I in the present embodiment 2The C device, its quantity can be with increase in demand or minimizing.Described I 2 C driving arrangement 110 comprises a CPU111, can pass through an I 2The C delivery outlet is to I 2 C bus 120 sends the position assignment commands.Described each I 2The C device comprises that a processing unit 131,141,151 can receive I 2On the C bus 120 from position assignment commands that CPU111 sent and carry out this order.
Each I 2Connect by an electrical cable 160 between the C device, therefore last I 2The output terminal of C device and back one I 2The input end current potential of C device is identical, for example, and I 2The output terminal a and the I of C device 130 2The input end b current potential of C device 140 is identical, I 2The output terminal b and the I of C device 140 2The input end c current potential of C device 150 is identical.In embodiments of the present invention, CPU111 will give an order to be followed successively by and be connected I 2I on the C bus 120 2C device 130,140,150 distributes position inequality.
Before being assigned with the position, all I 2Processing unit 131,141, the 151 control power source voltage Vcc of C device are with its output terminal output electronegative potential, and whether constantly detect input end then is noble potential.In case detect input end is noble potential, is a precalculated position S with set positions earlier then, waits for from I 2It is the order of a reposition that C bus 120 receives set positions, and according to ordering this I 2The set positions of C device is a reposition.Set after the reposition, processing unit control Vcc exports noble potential with output terminal.
For being connected I 2I after the C driving arrangement 110 2 C device 130, Vcc are controlled its input end a and are kept noble potential, so I 2C device 130 will be prior to other I 2C device 140,150 is assigned with the position.Processing unit 131 is at first controlled power source voltage Vcc with its output terminal a output electronegative potential, detects input end a and is after the noble potential, with I 2C device 130 set positions are described precalculated position S.
Described CPU111 is to I 2 C bus 120 sends the position assignment commands: with current position is the I of S 2The set positions of C device is the first reposition X1, and wherein X1 and S are inequality.
Because I 2C device 130 current positions are S, so its processing unit 131 can be from I 2C bus 120 receives order, and with I 2C device 130 set positions are X1, afterwards with its output terminal a output noble potential.
Because I 2The input end b and the I of C device 140 2The output terminal of C device 130 has same potential, and therefore, this moment, input end b was a noble potential.I 2The processing unit 141 of C device 140 detects after input end b is noble potential, with I 2The set positions of C device 140 is described precalculated position S.Because I 2C device 140 current positions are S, so its processing unit 141 can be from I 2Receive the position assignment commands on the C bus, and with I 2The set positions of C device 140 is one second reposition X2.X1 wherein, X2 and S have nothing in common with each other.
Equally can be with I 2The set positions of C device 150 is one and X1, the reposition that X2 and S have nothing in common with each other.
Consult shown in Figure 2, be the present invention each the device between annexation figure.Each device is I among the figure 2The C device.Digital signal 0 source continues the input end of input signal 0 to first device, the output terminal of first device is exported the first digital signal S (1), the output terminal of first device is connected to the input end of second device, i.e. the input first digital signal S (1) of the input end of second device.And the output terminal of second device is exported the second digital signal S2, and the second digital signal S2 is sent to the input end of the 3rd device.So down push away, the output N-1 digital signal S (N-1) of N-1 device, and it is sent to the input end of N device, export N digital signal S (N) at the output terminal that receives N-1 digital signal S (N-1) back N device.
Consulting shown in Figure 3ly, is the digital signal synoptic diagram that transmits in the electrical cable of the present invention.The set that S is made up of a plurality of digital signals 0,1, N member wherein arranged, N is the integer greater than 0, S can be expressed as { S (1), S (2), S (3) ... S (N) }, wherein each member S (N) represents a kind of transmission mode of digital signal, the digital signal transmission mode difference of each member's representative, and each member's digital signal transmission mode can not comprised by another member's digital signal transmission mode.As shown in FIG., the first digital signal S (1) is 1 at the signal of 0~10ms, is 0 at the signal of 10~15ms, is 1 at the signal of 15~25ms.And the second digital signal S (2) is also transmitting in another different mode, does not introduce in detail at this.
Consulting shown in Figure 4ly, is the operation process chart that the present invention distinguishes each setting position.At first, start the device (step S401) that is connecting; Postpone Ta, wherein Ta is one section specific time span, enough allows all series devices start, and to make the output terminal output signal of each series device be 1 (step S402); Whether the input signal of judging the input end of current device is 0 (step S403); If the input signal of the input end of current device is 0, then the position of this series device be 1 promptly this device be first the device (step S404); Postpone Tb, Tb>Ta wherein, when the output terminal that postpones Tb and be to guarantee first device was exported the first digital signal S (1), the input end of second device had prepared to receive the first digital signal S (1), with this avoid making a mistake (step S405); The output terminal of first device is exported the first digital signal S (1) (step S406); On the other hand, if the input end input signal is not 0 in step S403, also promptly the input end of this series device is waited for input N-1 digital signal S (N-1), and then this device is the N device, wherein N>1 and be integer (step S407); This N device is exported N digital signal S (N) (step S408).

Claims (5)

1. distinguish I automatically for one kind 2The method of a plurality of serial device positions on the C bus, it can distinguish each device under the situation that does not change the series device setting position is characterized in that this method comprises the following steps:
Start the device that is connecting;
Postpone very first time length;
Whether the input signal of judging the input end of current device is 0;
If the input signal of the input end of current device is 0, then the position of this device is 1, and promptly this device is first device, postpones second time span, and the output terminal of first device is exported the first digital signal S (1);
On the contrary, if the input signal of the input end of current device is not 0, promptly the input end of current device is waited for input N-1 digital signal S (N-1), then this device is the N device, wherein N>1, the N device is exported N digital signal S (N), and each digital signal S (N-1) has nothing in common with each other.
2. the I that distinguishes automatically as claimed in claim 1 2The method of a plurality of serial device positions on the C bus is characterized in that, wherein postpones very first time length, be to allow the device of all polyphones start, and to make the output terminal output signal of each device is 1.
3. the I that distinguishes automatically as claimed in claim 1 2The method of a plurality of serial device positions on the C bus, it is characterized in that, postponing second time span is when exporting the first digital signal S (1) for the output terminal of guaranteeing first device, the input end of second device has prepared to receive the first digital signal S (1), and wherein second time span is greater than very first time length.
4. as each described I that distinguishes automatically in the claim 1 to 3 2The method of a plurality of serial device positions on the C bus, it is characterized in that, wherein said first digital signal S (1) and N digital signal S (N) they are the members in the S set, the set that S is made up of N digital signal 0,1, and S can be expressed as { S (1), S (2), S (3) ... S (N) }.
5. the I that distinguishes automatically as claimed in claim 4 2The method of a plurality of serial device positions on the C bus, it is characterized in that, each member represents a kind of digital signal transmission mode among the wherein said S, and each member's digital signal transmission mode can not comprised by another member's digital signal transmission mode.
CNB2004100772997A 2004-12-04 2004-12-04 Method for automatically identifying multiple serial device positions Expired - Fee Related CN100389412C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100772997A CN100389412C (en) 2004-12-04 2004-12-04 Method for automatically identifying multiple serial device positions

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100772997A CN100389412C (en) 2004-12-04 2004-12-04 Method for automatically identifying multiple serial device positions

Publications (2)

Publication Number Publication Date
CN1783042A CN1783042A (en) 2006-06-07
CN100389412C true CN100389412C (en) 2008-05-21

Family

ID=36773248

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100772997A Expired - Fee Related CN100389412C (en) 2004-12-04 2004-12-04 Method for automatically identifying multiple serial device positions

Country Status (1)

Country Link
CN (1) CN100389412C (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN85104332A (en) * 1984-05-22 1987-01-28 北方电信有限公司 Bus configuration and method thereof to the addressed device unit
CN1157961A (en) * 1995-12-25 1997-08-27 松下电工株式会社 Peripheral unit selection system
US20020188781A1 (en) * 2001-06-06 2002-12-12 Daniel Schoch Apparatus and methods for initializing integrated circuit addresses
US6629172B1 (en) * 1998-12-14 2003-09-30 Micron Technology, Inc. Multi-chip addressing for the I2C bus
US6745270B1 (en) * 2001-01-31 2004-06-01 International Business Machines Corporation Dynamically allocating I2C addresses using self bus switching device
CN1534500A (en) * 2003-04-01 2004-10-06 智邦科技股份有限公司 Electron system using bus between integrated circuits as interface and its data transmission method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN85104332A (en) * 1984-05-22 1987-01-28 北方电信有限公司 Bus configuration and method thereof to the addressed device unit
CN1157961A (en) * 1995-12-25 1997-08-27 松下电工株式会社 Peripheral unit selection system
US6629172B1 (en) * 1998-12-14 2003-09-30 Micron Technology, Inc. Multi-chip addressing for the I2C bus
US6745270B1 (en) * 2001-01-31 2004-06-01 International Business Machines Corporation Dynamically allocating I2C addresses using self bus switching device
US20020188781A1 (en) * 2001-06-06 2002-12-12 Daniel Schoch Apparatus and methods for initializing integrated circuit addresses
CN1534500A (en) * 2003-04-01 2004-10-06 智邦科技股份有限公司 Electron system using bus between integrated circuits as interface and its data transmission method

Also Published As

Publication number Publication date
CN1783042A (en) 2006-06-07

Similar Documents

Publication Publication Date Title
EP2472342B1 (en) Data acquisition card, expansion control system for data acquisition card and method thereof
US8730818B2 (en) Converter/multiplexer for serial bus
US10430359B2 (en) Use of an IO link for linking field devices
EP2726997B1 (en) Broadcast serial bus termination
US7656846B2 (en) PLC based wireless communications
US11868302B2 (en) Status signal output
CN104301191A (en) Bus system
CN110995889A (en) Address allocation system and method
EP3157155A1 (en) Method of controlling inverters
CN100389412C (en) Method for automatically identifying multiple serial device positions
JP2003110587A (en) Two-line bus type transmission method sharing power supply and data transmission and apparatus therefor
CN110794808A (en) Matrix driving device and multi-channel signal switching method thereof
CN214151691U (en) Serial port communication circuit
CN210518417U (en) Address allocation system
EP3339993A1 (en) Motor drive with dynamic interval communication
CN108337143B (en) Communication structure, communication system, and communication method
CN110679118B (en) Processing process data
CN110710165B (en) Method for determining data bus user equipment of local bus and local bus master control device
KR102262938B1 (en) System for Controlling Automatic Plant with Bus Structure
CN110806993B (en) Customized modbus communication method and low-coupling telecontrol device using same
CN214895656U (en) Display chip test equipment
CN110663225B (en) Initialization of data bus user devices
CN217606001U (en) Current test system of sample chip
CN112532759B (en) Automatic configuration method of bus node identifier and bus network system
CN110663230B (en) Local bus master and method for operating a local bus

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080521

Termination date: 20141204

EXPY Termination of patent right or utility model