TWI741417B - Method and device of real time monitoring the connection status of i2c devices - Google Patents

Method and device of real time monitoring the connection status of i2c devices Download PDF

Info

Publication number
TWI741417B
TWI741417B TW108143350A TW108143350A TWI741417B TW I741417 B TWI741417 B TW I741417B TW 108143350 A TW108143350 A TW 108143350A TW 108143350 A TW108143350 A TW 108143350A TW I741417 B TWI741417 B TW I741417B
Authority
TW
Taiwan
Prior art keywords
integrated circuit
circuit bus
slave
real
time
Prior art date
Application number
TW108143350A
Other languages
Chinese (zh)
Other versions
TW202121183A (en
Inventor
許家彰
徐偉書
余仁淵
Original Assignee
旺玖科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 旺玖科技股份有限公司 filed Critical 旺玖科技股份有限公司
Priority to TW108143350A priority Critical patent/TWI741417B/en
Publication of TW202121183A publication Critical patent/TW202121183A/en
Application granted granted Critical
Publication of TWI741417B publication Critical patent/TWI741417B/en

Links

Images

Landscapes

  • Information Transfer Systems (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A method and device of real time monitoring the connection status of I2C devices for identifying and controlling a plurality of I2C slaves and performing a plug and play function, the I2C bus including SCL and SDA, which are characterized in that: the communication flow is executed; and when a communication error is detected, it is determined whether the system data line is at a low level, and continues for a delay time, if it is true, then judged that a new I2C slave is added to the I2C bus.

Description

積體電路匯流排即時偵測連接狀態的裝置及方法 Device and method for real-time detection of connection state of integrated circuit bus

本發明是關於一種積體電路匯流排,特別是關於一種積體電路匯流排即時偵測連接狀態的裝置及方法。 The invention relates to an integrated circuit bus, in particular to a device and method for real-time detection of the connection state of the integrated circuit bus.

積體電路匯流排(Inter-Integrated Circuit,I2C)為一種串列通訊匯流排,用於讓主機板、手機及嵌入式系統連接低速周邊設備。I2C可應用在主從系統控制架構上,如系統管理匯流排(System Management Bus,SMBus)、電源管理匯流排(Power Management Bus,PMBus)、智慧平台管理介面(Intelligent Platform Management Interface,IPMI)、顯示數據通道(Display Data Channel,DDC)、先進電信運算架構(Advanced Telecom Computing Architecture,ATCA)等。I2C的設計使用一個7位元長度的位址空間但保留了16個位址,所以在一組匯流排最多可和112個節點通訊。常見的I2C匯流排依傳輸速率的不同而有不同的模式:標準模式(100Kbit/s)、低速模式(10Kbit/s)、快速模式(400kbit/s)、高速模式(3.4Mbit/s)及超高速模式(5Mbit/s),但時脈頻率可被允許下降至零,代表暫停通訊。 Inter-Integrated Circuit (I2C) is a serial communication bus used to connect low-speed peripherals to motherboards, mobile phones, and embedded systems. I2C can be applied to the master-slave system control architecture, such as System Management Bus (SMBus), Power Management Bus (PMBus), Intelligent Platform Management Interface (IPMI), display Data channel (Display Data Channel, DDC), Advanced Telecom Computing Architecture (ATCA), etc. The I2C design uses a 7-bit address space but reserves 16 addresses, so it can communicate with up to 112 nodes in a group of buses. The common I2C bus has different modes depending on the transmission rate: standard mode (100Kbit/s), low-speed mode (10Kbit/s), fast mode (400kbit/s), high-speed mode (3.4Mbit/s) and ultra High-speed mode (5Mbit/s), but the clock frequency can be allowed to drop to zero, which means communication is suspended.

I2C僅使用兩個雙向開漏線(Open Drain),串列資料線(SDA)和串列時鐘線(SCL),I2C採用上拉電阻,使用的典型電壓是+5V或+3.3V (其他電壓系統也被允許)。 I2C uses only two bidirectional open drain lines (Open Drain), serial data line (SDA) and serial clock line (SCL). I2C uses pull-up resistors, and the typical voltage used is +5V or +3.3V (Other voltage systems are also allowed).

而在I2C的匯流排上有兩種類型角色的節點:主節點(主機),其用以產生時鐘(SCL)並與從節點(從機)通訊;從節點(從機),其用以接收時鐘並回應主節點的尋址與通訊。I2C匯流排屬於多主控匯流排,即可以在匯流排上放置任意多主節點。I2C匯流排有四種不同的操作模式,雖然大部分裝置只作為一種角色和使用其中兩種操作模式:I.主節點傳送模式:主節點傳送資料給從節點;II.主節點接收模式:主節點接收從節點資料;III.從節點傳送模式:從節點傳送資料給主節點;IV.從節點接收模式:從節點接收主節點資料。 There are two types of nodes on the I2C bus: the master node (host), which is used to generate the clock (SCL) and communicate with the slave node (slave); the slave node (slave), which is used to receive The clock also responds to the addressing and communication of the master node. The I2C bus is a multi-master bus, that is, any number of master nodes can be placed on the bus. The I2C bus has four different operating modes, although most devices only serve one role and use two of these operating modes: I. Master node transmission mode: The master node transmits data to the slave node; II. The master node receives mode: Master The node receives the data from the slave node; III. The slave node transmission mode: the slave node sends the data to the master node; IV. The slave node reception mode: the slave node receives the master node data.

請參考第1圖,習知的I2C通訊模式波形圖。I2C通訊係由主節點以主節點傳送模式開始運作,主節點傳送起始位51(START),也就是SDA拉到低準位;接著,主節點傳送希望與之通訊的從節點的7位元位址,最後再傳送一個bit讀寫位,該資料位表示主節點想要與從節點進行讀(1)還是寫(0)操作,此即第一位元組(byte)55的資料配置。如果符合該7位元位址的從節點在匯流排上,它將以第9個位元作為應答(低有效)位址(ACK)56。主節點收到應答後,根據它傳送的讀寫位,處於傳送模式或者接收模式,從節點則處於對應的相反模式(接收或傳送);無論哪種模式,均會在匯流排SDA中的資料位元組57中呈現。最後,主節點確認完成通訊時,即於SCL匯流排上將時脈頻率歸零(STOP),如第1圖的區塊54所示。 Please refer to Figure 1, the waveform diagram of the conventional I2C communication mode. The I2C communication system starts operation by the master node in the master node transmission mode. The master node transmits the start bit 51 (START), that is, SDA is pulled to the low level; then, the master node transmits the 7 bits of the slave node that it wants to communicate with Address, and finally send a bit read/write bit. This data bit indicates whether the master node wants to read (1) or write (0) with the slave node. This is the data configuration of the first byte (byte) 55. If the slave node matching the 7-bit address is on the bus, it will use the 9th bit as the response (low effective) address (ACK) 56. After the master node receives the response, according to the read and write bits it transmits, it is in transmission mode or reception mode, while the slave node is in the corresponding opposite mode (receiving or transmission); no matter which mode, the data will be in the bus SDA Byte 57 is present. Finally, when the master node confirms the completion of the communication, it resets the clock frequency to zero (STOP) on the SCL bus, as shown in block 54 in Figure 1.

以上的I2C通訊協定中,於I2C匯流排設計上並無支援即插即用功能,故I2C主機對新連接裝置(從機)無法即時詢問資訊,或及時反應從 機裝置被移除事件;相對於其他可隨插即用的介面如USB(通用匯流排),造成I2C產品應用的限制。例如,現有通訊技術如SMBus可使用額外的接腳並產生訊號通知主機端,使得主機端可得知SMBus的裝置有新的狀態或事件,但必須使用到主機端額外的接腳。 In the above I2C communication protocol, the I2C bus design does not support the plug-and-play function, so the I2C master cannot inquire about the new connected device (slave) in real time, or respond in time. The event that the device is removed; compared to other plug-and-play interfaces such as USB (Universal Bus), it limits the application of I2C products. For example, existing communication technologies such as SMBus can use additional pins and generate a signal to notify the host, so that the host can know that the SMBus device has a new state or event, but the host must use additional pins.

總之,由於I2C利用了兩條雙向漏極開路(Open-Drain)訊號線,SDA、SCL利用電阻將電位上拉(一般至3V或5V)。此特性導致I2C主機無法藉由腳位訊號偵測裝置連接上匯流排或從匯流排上移除。 In short, since I2C uses two bidirectional open-drain (Open-Drain) signal lines, SDA and SCL use resistors to pull up the potential (usually to 3V or 5V). This feature makes the I2C host unable to connect to the bus or remove it from the bus through the pin signal detection device.

因此,如何讓I2C的通訊協定與硬體的限制下,讓I2C也具備有即插即用功能,成為I2C能更廣泛的被使用的技術發展方向。 Therefore, how to make I2C have a plug-and-play function under the limitations of the I2C communication protocol and hardware has become a technology development direction that I2C can be used more widely.

有鑑於此,本發明提出一種積體電路匯流排(I2C)即時偵測連接狀態的裝置與方法,I2C主機利用既有SDA腳位的脈衝訊號得知新裝置連接上I2C匯流排,而可實現即插即用功能;在位址確認或位址指定程序後,能偵測裝置從I2C匯流排上移除,而可實現熱拔除功能;故在連接多組I2C裝置情形下可提升I2C裝置使用的效率且不增加電路修改與電子材料成本的特殊技術功效。 In view of this, the present invention proposes an integrated circuit bus (I2C) device and method for real-time detection of the connection status. The I2C host uses the pulse signal of the existing SDA pin to know that the new device is connected to the I2C bus, which can be realized Plug-and-play function; after the address confirmation or address assignment process, it can detect that the device is removed from the I2C bus, and the hot-unplugging function can be realized; therefore, the use of the I2C device can be improved when multiple sets of I2C devices are connected The special technical effect that does not increase the circuit modification and the cost of electronic materials.

本發明提供一種積體電路匯流排(I2C)即時偵測連接狀態的裝置,用以識別與控制複數個積體電路匯流排從機並執行即插即用功能,該積體電路匯流排包括一系統時脈線(SCL)與一系統資料線(SDA),其特徵在於:執行通訊流程;及偵測到通訊錯誤時,判斷是否該系統資料線為低位 準,若為低位準且持續一延遲時間後復原,則判斷有一新積體電路匯流排從機加入。此外,在非執行通訊流程階段,即偵測該系統資料線之準位,若為低位準且持續一延遲時間後復原,則判斷有一新積體電路匯流排從機加入。 The present invention provides an integrated circuit bus (I2C) device for real-time detection of connection status, which is used to identify and control a plurality of integrated circuit bus slaves and perform plug-and-play functions. The integrated circuit bus includes a The system clock line (SCL) and a system data line (SDA) are characterized by: executing the communication process; and when a communication error is detected, it is judged whether the system data line is low If it is a low level and recovers after a delay time, it is determined that a new integrated circuit bus slave has been added. In addition, in the non-executive communication process stage, that is, the level of the system data line is detected. If it is a low level and recovers after a delay time, it is determined that a new integrated circuit bus slave has been added.

本發明更提供一種積體電路匯流排(I2C)從機,可於包括一系統時脈線(SCL)與一系統資料線(SDA)之一積體電路匯流排即插即用,其特徵在於:於插入該積體電路匯流排時,於系統通訊開始後,於該系統資料線持續輸出低位準且持續一延遲時間後復原。 The present invention further provides an integrated circuit bus (I2C) slave, which can be plug-and-played on an integrated circuit bus including a system clock line (SCL) and a system data line (SDA), which is characterized by : When inserting the integrated circuit bus, after the system communication starts, the system data line continues to output the low level and resumes after a delay time.

本發明尚提供一種積體電路匯流排(I2C)即時偵測連接狀態的方法,用以識別與控制複數個積體電路匯流排從機之即插即用功能,該積體電路匯流排包括一系統時脈線(SCL)與一系統資料線(SDA),包含:執行通訊流程;及偵測到通訊錯誤時,判斷是否該系統資料線為低位準,若為低位準且持續一延遲時間後復原,則判斷有一新積體電路匯流排從機加入。 The present invention also provides a method for real-time detection of the connection status of an integrated circuit bus (I2C), which is used to identify and control the plug-and-play function of a plurality of integrated circuit bus slaves. The integrated circuit bus includes a System clock line (SCL) and a system data line (SDA), including: executing the communication process; and when a communication error is detected, judging whether the system data line is low level, if it is low level and after a delay time Recovery, it is judged that a new integrated circuit bus from the machine has been added.

本發明並提供一種積體電路匯流排(I2C)即時偵測連接狀態的方法,用以識別與控制複數個積體電路匯流排從機之即插即用功能,該積體電路匯流排包括一系統時脈線(SCL)與一系統資料線(SDA),包含:執行偵測系統資料線之準位,若為低位準且持續一延遲時間後復原,則判斷有一新積體電路匯流排從機加入。 The present invention also provides a method for real-time detection of the connection status of an integrated circuit bus (I2C), which is used to identify and control the plug-and-play function of a plurality of integrated circuit bus slaves. The integrated circuit bus includes a System clock line (SCL) and a system data line (SDA), including: perform detection of the level of the system data line, if it is low level and recovers after a delay time, it is determined that a new integrated circuit bus is from Machine joined.

本發明還提供一種積體電路匯流排(I2C)即時偵測連接狀態的方法,用以識別與控制複數個積體電路匯流排從機之拔除偵測功能,該積體電路匯流排包括一系統時脈線(SCL)與一系統資料線(SDA),包含:詢問 該些積體電路匯流排從機之裝置識別碼,並統計與紀錄該些積體電路匯流排從機之一從機數量;及當判斷該從機數量減少時,確認有從機移除狀態。 The present invention also provides a method for real-time detection of the connection status of an integrated circuit bus (I2C), which is used to identify and control the removal detection function of a plurality of integrated circuit bus slaves. The integrated circuit bus includes a system Clock line (SCL) and a system data line (SDA), including: inquiry The device identification codes of the IC bus slaves, and count and record the number of one of the IC bus slaves; and when it is judged that the number of the slaves is reduced, confirm that there is a slave removal status .

以下在實施方式中詳細敘述本發明之詳細特徵以及優點,其內容足以使任何熟習相關技藝者瞭解本發明之技術內容並據以實施,且根據本說明書所揭露之內容、申請專利範圍及圖式,任何熟習相關技藝者可輕易地理解本發明相關之目的及優點。 The detailed features and advantages of the present invention will be described in detail in the following embodiments. The content is sufficient to enable anyone familiar with the relevant art to understand the technical content of the present invention and implement it accordingly, and according to the content disclosed in this specification, the scope of patent application and the drawings. Anyone who is familiar with relevant skills can easily understand the purpose and advantages of the present invention.

10:I2C主機 10: I2C host

21、22、23:I2C從機 21, 22, 23: I2C slave

30:積體電路匯流排 30: Integrated circuit bus

43:I2C連接器 43: I2C connector

51:起始位 51: start bit

53:低位準 53: low level

54:區塊 54: block

55:第一位元組(byte) 55: The first byte (byte)

56:應答(低有效)位址(ACK) 56: Acknowledgment (low effective) address (ACK)

57:資料位元組 57: data byte

第1圖,習知的I2C通訊模式波形圖。 Figure 1, the waveform diagram of the conventional I2C communication mode.

第2A-2D圖,其分別為積體電路匯流排(I2C)即時偵測連接狀態的方法訊號時序圖、脈衝訊號示意圖、熱插拔功能方塊示意圖。 Figures 2A-2D are respectively the signal timing diagram, the pulse signal diagram, and the hot plug function block diagram of the method of the integrated circuit bus (I2C) to detect the connection status in real time.

第3圖之積體電路匯流排(I2C)即時偵測連接狀態的方法流程圖。 Figure 3 shows a flow chart of the method for real-time detection of the connection status of the integrated circuit bus (I2C).

第4圖,其為本發明之積體電路匯流排(I2C)即時偵測連接狀態的方法流程圖。 Figure 4 is a flow chart of the method for real-time detection of the connection status of the integrated circuit bus (I2C) of the present invention.

第5圖之積體電路匯流排(I2C)即時偵測連接狀態的又一實施例之方法流程圖。 Figure 5 is a flowchart of another embodiment of the integrated circuit bus (I2C) real-time detection of the connection status.

本發明所提供的積體電路匯流排(I2C)即時偵測連接狀態的裝置與方法中,I2C主機利用既有SDA腳位的脈衝訊號得知新裝置連接上I2C 匯流排,而可實現即插即用功能;在位址確認或位址指定程序後,能偵測裝置從I2C匯流排上移除,而可實現熱拔除功能;故在連接多組I2C裝置情形下可提升I2C裝置使用的效率且不增加電路修改與電子材料成本的特殊技術功效。 In the device and method for real-time detection of the connection status of the integrated circuit bus (I2C) provided by the present invention, the I2C host uses the pulse signal of the existing SDA pin to know that the new device is connected to the I2C The bus can realize the plug and play function; after the address confirmation or address assignment procedure, it can detect the removal of the device from the I2C bus, and the hot removal function can be realized; therefore, when multiple sets of I2C devices are connected It can improve the efficiency of using I2C devices without increasing the cost of circuit modification and electronic materials.

請參考第2A-2D圖,其分別為積體電路匯流排(I2C)即時偵測連接狀態的方法訊號時序圖、脈衝訊號示意圖、熱插拔功能方塊示意圖,並同時參考第3圖之積體電路匯流排(I2C)即時偵測連接狀態的方法流程圖。 Please refer to Figures 2A-2D, which are the method of real-time detection of the connection status of the integrated circuit bus (I2C). Signal timing diagram, pulse signal diagram, hot plug function block diagram, and also refer to the integrated circuit in Figure 3 The flow chart of the method for the circuit bus (I2C) to detect the connection status in real time.

首先,請參考第2C、2D圖,本發明之積體電路匯流排(I2C)即時偵測連接狀態的裝置,亦即,I2C主機10,用以識別與控制複數個積體電路匯流排從機(亦即,I2C從機21、I2C從機22、I2C從機23)並執行即插即用功能,積體電路匯流排30包括一系統時脈線(SCL)與一系統資料線(SDA)(如第2A、2B圖所示),其特徵在於,執行第3圖的流程:步驟S101:I2C裝置通訊流程開始。 First, please refer to Figures 2C and 2D. The device of the present invention for the integrated circuit bus (I2C) to detect the connection status in real time, that is, the I2C master 10, is used to identify and control a plurality of integrated circuit bus slaves. (Ie, I2C slave 21, I2C slave 22, I2C slave 23) and perform plug-and-play function. The integrated circuit bus 30 includes a system clock line (SCL) and a system data line (SDA) (As shown in Figures 2A and 2B), it is characterized in that the process of Figure 3 is executed: Step S101: the I2C device communication process starts.

步驟S102:執行I2C通訊流程。I2C主機10,傳送起始位51(START),然後即開始依照第1圖的流程執行I2C通訊。 Step S102: Execute the I2C communication process. The I2C host 10 transmits the start bit 51 (START), and then starts to perform I2C communication according to the flow in Figure 1.

步驟S103:I2C通訊錯誤?此為本發明最主要的步驟,由於I2C的閒置(idle)狀態就是一直持續維持高電位(Bus pull-up)。所以當系統開始通訊後,若有新積體電路匯流排從機從離線的狀態而插入積體電路匯流排30時,如第2C、2D圖的I2C從機23插入積體電路匯流排30。此時係有了原來的I2C從機21、IC從機22與I2C主機10做正常通訊。而這通訊的過程中,三者均會在SDA線上傳輸訊號。由於SDA平常均在高電位,只有處於通訊狀態的I2C 主機10或I2C從機21或I2C從機22,這三者任一者,可在身為通訊主角(主節點傳送模式或從節點傳送模式)時於SDA的匯流排上將電位拉低。因此,無論是哪個傳送模式下,本發明皆藉由主動造成通訊錯誤的方法來讓I2C主機10可辨識出有新插入的新積體電路匯流排從機。因此,本發明藉由新積體電路匯流排從機加入積體電路匯流排30後(經由I2C連接器43),並由新積體電路匯流排從機(也就是I2C從機23)於通訊開始後,於系統資料線(SDA)持續輸出低位準53一延遲時間(T1),如第2A、2B圖所示。如此,即可干擾正常的通訊,而造成通訊錯誤。而由於新積體電路匯流排從機,也就是第2C、2D圖的I2C從機23於加入積體電路匯流排30主動發出,因此,I2C主機10就有機會藉以判斷有I2C從機23的加入。若無I2C通訊錯誤的狀況,則進入步驟S108。 Step S103: I2C communication error? This is the most important step of the present invention, because the idle state of I2C is to continuously maintain a high potential (Bus pull-up). Therefore, when the system starts to communicate, if a new IC bus slave is inserted into the IC bus 30 from the offline state, as shown in Figures 2C and 2D, the I2C slave 23 is inserted into the IC bus 30. At this time, the original I2C slave 21, the IC slave 22 and the I2C host 10 are in normal communication. In this communication process, all three will transmit signals on the SDA line. Since SDA is usually at a high potential, only I2C is in the communication state The host 10 or the I2C slave 21 or the I2C slave 22, any of these three, can pull the potential low on the SDA bus when it is the main communication player (master node transmission mode or slave node transmission mode). Therefore, no matter which transmission mode is in, the present invention uses a method of actively causing communication errors to allow the I2C host 10 to recognize that a new integrated circuit bus slave is newly inserted. Therefore, in the present invention, a new integrated circuit bus slave is added to the integrated circuit bus 30 (via the I2C connector 43), and the new integrated circuit bus slave (that is, the I2C slave 23) communicates with After the start, the system data line (SDA) continues to output the low level 53 for a delay time (T1), as shown in Figures 2A and 2B. In this way, normal communication can be disturbed, causing communication errors. Since the new integrated circuit bus slave, that is, the I2C slave 23 in the 2C and 2D diagrams, is actively sent when it is added to the integrated circuit bus 30, the I2C master 10 has the opportunity to determine that there is an I2C slave 23. join in. If there is no I2C communication error, then go to step S108.

步驟S104:SDA腳位為低位準且持續一延遲時間?此由I2C主機10進行判斷,若SDA腳位為低位準,則進入步驟S105。反之,回到步驟S102。低位準之時間長度,也就是延遲時間T1的長度,不小於最長資料傳輸封包的時間,或系統相互定義的Time-out時間。(P.S.亦即涵蓋到不少於一個START/STOP的範圍) Step S104: Is the SDA pin low and lasts for a delay time? This is determined by the I2C host 10, and if the SDA pin is at a low level, step S105 is entered. Otherwise, return to step S102. The time length of the low level, that is, the length of the delay time T1, is not less than the time of the longest data transmission packet, or the Time-out time defined by the system. (P.S. That is, it covers no less than one START/STOP range)

步驟S105:確認I2C BUS有新連接裝置。由於滿足了前述的判斷條件,其一是偵測到通訊錯誤,其二是偵測到SDA持續的低位準,其三是持續的低位準滿足預設延遲時間的條件,如此,即可確認I2C BUS有了新的I2C從機加入,如第2C、2D圖的I2C從機23。 Step S105: Confirm that there is a new connection device for the I2C BUS. Since the aforementioned judgment conditions are met, one is the detection of a communication error, the other is the detection of a continuous low level of SDA, and the third is that the continuous low level meets the condition of the preset delay time. In this way, I2C can be confirmed. BUS has a new I2C slave to join, such as the I2C slave 23 in the 2C and 2D diagrams.

步驟S106:確認I2C BUS無任何新連接裝置。回到步驟S102。 Step S106: Confirm that there is no new connection device in the I2C BUS. Return to step S102.

步驟S107:使用者停止通訊?系統可根據使用者設定判斷是 否繼續偵測即時連接訊號,若沒有,則回到步驟S102繼續流程。若已達到使用者設定的停止通訊狀態,則進入步驟S108。 Step S107: Does the user stop communication? The system can determine whether it is based on user settings Whether to continue to detect the real-time connection signal, if not, return to step S102 to continue the process. If the communication stop state set by the user has been reached, step S108 is entered.

步驟S108:I2C裝置通訊流程結束。 Step S108: The communication process of the I2C device ends.

由以上說明可知,本發明的積體電路匯流排(I2C)即時偵測連接狀態的裝置運用三個判斷條件來判斷是否有新積體電路匯流排從機加入積體電路匯流排,一是偵測到通訊錯誤,或是偵測到SDA持續的低位準,及持續的低位準滿足預設延遲時間。而這個低位準延遲時間係由新加入的新積體電路匯流排從機所產生。因此,積體電路匯流排從機具有以下的特點:於插入積體電路匯流排(I2C)時,於系統資料線SDA持續輸出低位準且持續一延遲時間後復原;其中延遲時間不小於最長資料傳輸封包的時間,或系統相互定義的Time-out時間。 It can be seen from the above description that the device for real-time detection of the connection status of the integrated circuit bus (I2C) of the present invention uses three judgment conditions to determine whether a new integrated circuit bus slave is added to the integrated circuit bus. A communication error is detected, or a continuous low level of SDA is detected, and the continuous low level meets the preset delay time. And this low-level delay time is produced by the newly added new integrated circuit bus slave. Therefore, the integrated circuit bus slave has the following characteristics: when inserting the integrated circuit bus (I2C), the system data line SDA continues to output the low level and resumes after a delay time; the delay time is not less than the longest data The time to transmit the packet, or the Time-out time defined by the system.

接著,請參考第4圖,其為本發明之積體電路匯流排(I2C)即時偵測連接狀態的方法流程圖,用以識別與控制一個或複數個積體電路匯流排從機之拔除偵測功能,該積體電路匯流排包括一系統時脈線(SCL)與一系統資料線(SDA),包含以下步驟:步驟S111:I2C裝置拔除偵測流程開始。 Next, please refer to Figure 4, which is a flow chart of the method for real-time detection of the connection status of the integrated circuit bus (I2C) of the present invention, which is used to identify and control the removal of one or more IC bus slaves. The integrated circuit bus includes a system clock line (SCL) and a system data line (SDA), including the following steps: Step S111: I2C device removal detection process starts.

步驟S112:判斷所有的I2C從機是否已指定位址?如第2C圖所示,I2C從機21、I2C從機22、I2C從機23,分為具有指定位址ID1、ID2、ID3。如果在接上的I2C從機21、I2C從機22還沒有指定位址時,進步步驟S113;反之,若有指定位址,則進入步驟S114。 Step S112: Determine whether all I2C slaves have assigned addresses? As shown in Figure 2C, the I2C slave 21, the I2C slave 22, and the I2C slave 23 are divided into designated addresses ID1, ID2, and ID3. If the connected I2C slave 21 and I2C slave 22 have not designated addresses, proceed to step S113; otherwise, if there is a designated address, proceed to step S114.

步驟S113:執行I2C從機位址指定流程。一般來說,I2C從機 數量可由固定的7位元位址來判別,此即為硬件碼判定方法。當7位元的硬件碼位址不敷使用時(可能不小心選到了相同硬件碼的I2C從機),可採用額外的位址指定(軟件碼),也就是,由I2C主機10來指定新的位址給現有的I2C從機們。例如,在原來的7位元位址之外的第二個位元組(Byte 2)或第二個、第三個位元組(Byte 3),來做為新的指定位址。由於此一指定為I2C主機10對現有的I2C從機所指定,因此,不會有重疊的問題。須由I2C主機、I2C從機彼此搭配運用,換言之,此為標準的I2C通訊協定所沒有的,其為本發明所開發的新的補充通訊協定。一旦指定後,如I2C從機21、I2C從機22、I2C從機23等,皆可具有指定位址ID1、ID2、ID3。例如,ID1、ID2、ID3可為SDA的Byte 2分別為0000-0001、0000-0010、0000-0011。此為本發明的自動位址指定流程。 Step S113: Execute the I2C slave address designation process. Generally speaking, I2C slave The number can be judged by a fixed 7-bit address, which is the hardware code judgment method. When the 7-bit hardware code address is insufficient (you may accidentally select an I2C slave with the same hardware code), you can use an additional address specification (software code), that is, the I2C host 10 specifies the new The address is given to the existing I2C slaves. For example, the second byte (Byte 2) or the second and third byte (Byte 3) outside the original 7-bit address are used as the new designated address. Since this designation is designated by the I2C master 10 to the existing I2C slaves, there will be no overlap problem. The I2C master and the I2C slave must be used in conjunction with each other. In other words, this is not available in the standard I2C communication protocol, and it is a new supplementary communication protocol developed by the present invention. Once designated, such as I2C slave 21, I2C slave 22, I2C slave 23, etc., all have designated addresses ID1, ID2, and ID3. For example, ID1, ID2, and ID3 can be Byte 2 of SDA as 0000-0001, 0000-0010, 0000-0011, respectively. This is the automatic address assignment process of the present invention.

步驟S113亦可增加至步驟S105當中,換言之,當I2C主機10確認有新的I2C從機(如第2C、2D圖的I2C從機23)加入後,即可執行I2C從機位址指定流程。 Step S113 can also be added to step S105. In other words, when the I2C master 10 confirms that a new I2C slave (such as the I2C slave 23 in the 2C and 2D diagrams) has been added, the I2C slave address specification process can be executed.

步驟S114:詢問I2C從機裝置識別碼,並統計與紀錄數量。以第2D圖為例,I2C主機10偵測到的從機數量為3。 Step S114: Query the identification code of the I2C slave device, and count and record the number. Taking Figure 2D as an example, the number of slaves detected by the I2C master 10 is 3.

步驟S115:I2C從機裝置識別碼統計數量減少?當由第2D圖的狀態改為第2C圖的狀態時,從機數量將減少為2。此時,I2C主機10即可確認少了一台,而判斷出從機數量減少,而可進入步驟S116。若沒有減少,則進入步驟S117。 Step S115: Decrease the number of I2C slave device identification codes? When the state of the 2D diagram is changed to the state of the 2C diagram, the number of slaves will be reduced to 2. At this time, the I2C host 10 can confirm that one is missing, and it is judged that the number of slaves has decreased, and the process can proceed to step S116. If there is no decrease, go to step S117.

步驟S116:產生I2C從機拔出警示訊號。I2C主機10可發出訊 號至主機板系統,再由主機板系統發出警示訊息給使用者。接著,進入步驟S117。 Step S116: Generate an I2C slave pull-out warning signal. I2C host 10 can send out signals To the motherboard system, and then the motherboard system sends out warning messages to the user. Then, it progresses to step S117.

步驟S117:使用者停止I2C裝置拔出偵測功能?系統根據使用者設定判斷是否繼續偵測數量,若未滿足停止裝置拔出偵測條件,則回到步驟S112,繼續進行偵測。 Step S117: Does the user stop the I2C device disconnection detection function? The system determines whether to continue detecting the number according to the user setting. If the detection condition for stopping the device removal is not met, it returns to step S112 to continue the detection.

步驟S118:I2C裝置拔除偵測流程結束。 Step S118: The I2C device removal detection process ends.

由以上的流程可知,積體電路匯流排(I2C)即時偵測連接狀態的裝置,也就是I2C主機10,可另外包括有拔除偵測功能,拔除偵測功能包含:詢問該些積體電路匯流排從機之裝置識別碼,並統計與紀錄該些積體電路匯流排之從機數量;及當判斷該從機數量減少時,確認有從機移除狀態。 From the above process, it can be seen that the device for the integrated circuit bus (I2C) to detect the connection status in real time, that is, the I2C host 10, can additionally include a disconnection detection function. The disconnection detection function includes: inquiring about the integrated circuit bus Arrange the device identification codes of the slaves, and count and record the number of slaves of the integrated circuit bus; and when it is judged that the number of slaves has decreased, confirm that there is a slave removal status.

進一步地,積體電路匯流排(I2C)即時偵測連接狀態的裝置更包含特徵在於:當確認有該從機移除狀態時,產生一拔出警示訊號。其中,積體電路匯流排(I2C)即時偵測連接狀態的裝置更包含特徵在於:判斷該新積體電路匯流排從機是否已有一指定位址,當該新積體電路匯流排從機不具有該指定位址時,提供該新積體電路匯流排從機予一新指定位址。 Furthermore, the device for real-time detection of the connection status of the integrated circuit bus (I2C) further includes the feature that when the slave device is confirmed to be removed, a pull-out warning signal is generated. Among them, the device for real-time detection of the connection status of the integrated circuit bus (I2C) further includes the feature of judging whether the new integrated circuit bus slave machine has a designated address, and when the new integrated circuit bus slave machine is not When the designated address is available, the new integrated circuit bus slave is provided to a new designated address.

由以上的說明可知,本發明藉由I2C從機於新加入積體電路匯流排(I2C)時,主動於通訊流程中,輸出SDA低位準的訊號,強迫SDA產生錯誤的通訊結果,讓I2C主機10偵測到此錯誤後,即可進一步藉由低位準訊號的延遲時間(T1)來判斷新的I2C從機的加入。接著,藉由既有的硬體位址來做為裝置識別碼,或者,於既有的硬體位址不同而給予新的軟體位址來 做為裝置是別碼,來確認新加入的I2C從機。由於已經掌握了新舊加入的I2C從機的數量,因此,在使用者將I2C從機拔除後,I2C主機10也可由I2C從機的數量以及指定位址,掌握到哪個I2C從機被拔除。 It can be seen from the above description that the present invention uses the I2C slave to actively output the low-level signal of the SDA during the communication process when the integrated circuit bus (I2C) is newly added, forcing the SDA to generate an incorrect communication result, so that the I2C master 10 After detecting this error, the delay time (T1) of the low-level signal can be further used to determine the addition of a new I2C slave. Then, use the existing hardware address as the device identification code, or give a new software address if the existing hardware address is different As a device, it is a code to confirm the newly added I2C slave. Since the number of new and old added I2C slaves has been known, after the user unplugs the I2C slave, the I2C master 10 can also use the number of I2C slaves and the designated address to know which I2C slave is unplugged.

此外,I2C主機在非I2C通訊流程過程中,同樣可透過偵測SDA準位,來進一步藉由此低位準訊號的延遲時間(T1)來判斷新的I2C從機的加入,流程圖如第5圖。 In addition, the I2C master can also detect the SDA level during the non-I2C communication process to further determine the addition of a new I2C slave by the delay time (T1) of the low-level signal. The flowchart is as shown in section 5. picture.

步驟S121:I2C裝置非通訊偵測流程開始。 Step S121: The non-communication detection process of the I2C device starts.

步驟S122:偵測SDA腳位準位;偵測系統資料線之準位的方式可為系統中斷或系統輪詢。 Step S122: Detect the level of the SDA pin; the method of detecting the level of the system data line can be system interrupt or system polling.

步驟S123:SDA腳位為低位準且持續一延遲時間?若滿足此條件,執行步驟S124,以進一步與可能的I2C裝置通訊,進而確認是否有新的I2C裝置;若否,則回到步驟S122。 Step S123: Is the SDA pin at a low level for a delay time? If this condition is met, step S124 is executed to further communicate with possible I2C devices to confirm whether there is a new I2C device; if not, go back to step S122.

步驟S124:執行I2C通訊流程;進行I2C通訊,以確認有新的I2C裝置,並進一步界定其裝置識別碼,以做後續的通訊。 Step S124: Execute the I2C communication process; perform I2C communication to confirm that there is a new I2C device, and further define its device identification code for subsequent communication.

步驟S125:確認I2C BUS有新連接裝置;由於滿足了前述的判斷條件,偵測到通訊錯誤,偵測到SDA持續的低位準,且持續的低位準滿足預設延遲時間的條件,如此,即可確認I2C BUS有了新的I2C從機加入,如第2C、2D圖的I2C從機23。 Step S125: Confirm that there is a new device connected to the I2C BUS; since the aforementioned judgment conditions are met, a communication error is detected, and the continuous low level of SDA is detected, and the continuous low level meets the condition of the preset delay time, so, that is It can be confirmed that a new I2C slave is added to the I2C BUS, such as the I2C slave 23 in the 2C and 2D diagrams.

步驟S126:使用者停止通訊?系統可根據使用者設定判斷是否繼續偵測即時連接訊號,若沒有,則回到步驟S122繼續流程。若已達到使用者設定的停止通訊狀態,則進入步驟S127。 Step S126: Does the user stop communication? The system can determine whether to continue detecting the real-time connection signal according to the user setting, if not, it returns to step S122 to continue the process. If the communication stop state set by the user has been reached, step S127 is entered.

步驟S127:I2C裝置偵測流程結束。 Step S127: The I2C device detection process ends.

由以上不同的實施例可知,本發明藉由偵測SDA腳位準位的變化,來確認是否有新的I2C裝置加入系統。然而,這項技術必須搭配I2C裝置增加的功能:於插入該積體電路匯流排時,於該系統資料線持續輸出低位準且持續一延遲時間後復原。此一增加至I2C從機的功能,可於I2C通訊的時候即執行,亦可於I2C非通訊的過程執行。而I2C主機,則可隨時偵測此一狀況是否發生,也就是,SDA腳位準位被拉低的狀態,亦即,第3圖或第5圖的實施例所述者。因此,運用本發明的技術,可充分實現I2C系統的隨插即用功能。讓原本沒有隨插即用功能的I2C系統獲得此一功能,讓系統運用更具有彈性,應用範圍與方式更廣。 It can be seen from the above different embodiments that the present invention determines whether a new I2C device is added to the system by detecting the change of the SDA pin level. However, this technology must be combined with the added function of the I2C device: when the integrated circuit bus is inserted, the system data line will continue to output a low level and recover after a delay time. This function added to the I2C slave can be executed during I2C communication or in the process of I2C non-communication. The I2C host can detect whether this situation occurs at any time, that is, the state where the SDA pin level is pulled low, that is, as described in the embodiment in FIG. 3 or FIG. 5. Therefore, by using the technology of the present invention, the plug-and-play function of the I2C system can be fully realized. Let the I2C system that does not have the plug-and-play function obtain this function, so that the system is more flexible, and the application range and methods are wider.

雖然本發明的技術內容已經以較佳實施例揭露如上,然其並非用以限定本發明,任何熟習此技藝者,在不脫離本發明之精神所作些許之更動與潤飾,皆應涵蓋於本發明的範疇內,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 Although the technical content of the present invention has been disclosed in the preferred embodiments as above, it is not intended to limit the present invention. Anyone who is familiar with this technique and makes some changes and modifications without departing from the spirit of the present invention should be covered by the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of the attached patent application.

10:I2C主機 10: I2C host

21、22、23:I2C從機 21, 22, 23: I2C slave

30:積體電路匯流排 30: Integrated circuit bus

43:I2C連接器 43: I2C connector

53:低位準 53: low level

Claims (19)

一種積體電路匯流排(I2C)即時偵測連接狀態的裝置,用以識別與控制一個或複數個積體電路匯流排從機並執行即插即用功能,該積體電路匯流排包括一系統時脈線(SCL)與一系統資料線(SDA),其特徵在於:執行通訊流程;偵測到通訊錯誤時,判斷是否該系統資料線為低位準,若為低位準且持續一延遲時間後復原,則判斷有一新積體電路匯流排從機加入;及其中該通訊錯誤係由該新積體電路匯流排從機加入該積體電路匯流排,並由新積體電路匯流排從機於通訊開始後,於該系統資料線(SDA)持續輸出低位準該延遲時間所致。 An integrated circuit bus (I2C) device for real-time detection of connection status, used to identify and control one or more integrated circuit bus slaves and perform plug-and-play functions. The integrated circuit bus includes a system The clock line (SCL) and a system data line (SDA) are characterized by: executing the communication process; when a communication error is detected, it is judged whether the system data line is low level, if it is low level and after a delay time Recovery, it is judged that a new integrated circuit bus slave is added; and the communication error is added to the integrated circuit bus by the new integrated circuit bus slave, and the new integrated circuit bus slave is added to the integrated circuit bus. After the communication started, the system data line (SDA) continued to output the low level for the delay time. 如請求項1所述之積體電路匯流排(I2C)即時偵測連接狀態的裝置,其中該延遲時間不小於最長資料傳輸封包的時間,或系統相互定義的Time-out時間。 An integrated circuit bus (I2C) device for real-time detection of connection status as described in claim 1, wherein the delay time is not less than the time of the longest data transmission packet, or the time-out time defined by the system. 如請求項1所述之積體電路匯流排(I2C)即時偵測連接狀態的裝置,其中該積體電路匯流排(I2C)即時偵測連接狀態的裝置更包含特徵在於:詢問該些積體電路匯流排從機之裝置識別碼,並統計與紀錄該些積體電路匯流排之從機數量;及當判斷該從機數量減少時,確認有從機移除狀態。 The integrated circuit bus (I2C) device for real-time detection of the connection status as described in claim 1, wherein the device for real-time detection of the connection status of the integrated circuit bus (I2C) further includes the feature of querying the integrated circuits The device identification code of the slaves of the circuit bus, and count and record the number of slaves of the integrated circuit bus; and when it is judged that the number of the slaves is reduced, confirm that the slave is removed. 如請求項3所述之積體電路匯流排(I2C)即時偵測連接狀態的裝置,其中該積體電路匯流排(I2C)即時偵測連接狀態的裝置更包含特徵在於:當確認有該從機移除狀態時,產生一拔出警示訊號。 The integrated circuit bus (I2C) device for real-time detection of the connection status as described in claim 3, wherein the device for real-time detection of the connection status of the integrated circuit bus (I2C) further includes the feature that: when the slave is confirmed When the machine is removed, a pull-out warning signal is generated. 如請求項1或3所述之積體電路匯流排(I2C)即時偵測連接狀態的裝置,其 中該積體電路匯流排(I2C)即時偵測連接狀態的裝置更包含特徵在於:判斷該新積體電路匯流排從機是否已有一指定位址,當該新積體電路匯流排從機不具有該指定位址時,提供該新積體電路匯流排從機予一新指定位址。 The integrated circuit bus (I2C) described in claim 1 or 3 is a device for real-time detection of connection status, which The device for real-time detection of the connection status of the integrated circuit bus (I2C) further includes the feature of judging whether the new integrated circuit bus slave machine has a designated address, and when the new integrated circuit bus slave machine is not When the designated address is available, the new integrated circuit bus slave is provided to a new designated address. 一種積體電路匯流排(I2C)即時偵測連接狀態的裝置,用以識別與控制一個或複數個積體電路匯流排從機並執行即插即用功能,該積體電路匯流排包括一系統時脈線(SCL)與一系統資料線(SDA),其特徵在於:偵測該系統資料線之準位,若為低位準且持續一延遲時間後復原,則判斷有一新積體電路匯流排從機加入;詢問該些積體電路匯流排從機之裝置識別碼,並統計與紀錄該些積體電路匯流排從機之數量;及當判斷該從機數量減少時,確認有從機移除之狀態。 An integrated circuit bus (I2C) device for real-time detection of connection status, used to identify and control one or more integrated circuit bus slaves and perform plug-and-play functions. The integrated circuit bus includes a system A clock line (SCL) and a system data line (SDA) are characterized by: detecting the level of the system data line, if it is a low level and recovering after a delay time, it is determined that there is a new integrated circuit bus Add from the machine; query the device identification codes of the IC bus slaves, and count and record the number of the IC bus slaves; and when it is judged that the number of the slaves is reduced, confirm that there is a slave transfer In addition to the state. 如請求項6所述之積體電路匯流排(I2C)即時偵測連接狀態的裝置,其中該延遲時間係不小於最長資料傳輸封包的時間,或系統相互定義的Time-out時間。 An integrated circuit bus (I2C) device for real-time detection of connection status as described in claim 6, wherein the delay time is not less than the time of the longest data transmission packet, or the time-out time defined by the system. 如請求項6所述之積體電路匯流排(I2C)即時偵測連接狀態的裝置,其中該積體電路匯流排(I2C)即時偵測連接狀態的裝置更包含特徵在於:當確認有該從機移除狀態時,產生一拔出警示訊號。 The integrated circuit bus (I2C) device for real-time detection of connection status as described in claim 6, wherein the device for real-time detection of the connection status of the integrated circuit bus (I2C) further includes the feature that: when the slave is confirmed When the machine is removed, a pull-out warning signal is generated. 如請求項6所述之積體電路匯流排(I2C)即時偵測連接狀態的裝置,其中該積體電路匯流排(I2C)即時偵測連接狀態的裝置更包含特徵在於:判斷該新積體電路匯流排從機是否已有一指定位址,當該新積體電路匯流 排從機不具有該指定位址時,提供該新積體電路匯流排從機予一新指定位址。 The integrated circuit bus (I2C) device for real-time detection of connection status as described in claim 6, wherein the device for real-time detection of connection status of the integrated circuit bus (I2C) further includes the feature of: judging the new integrated circuit Whether the circuit bus slave has a designated address, when the new integrated circuit bus When the row slave does not have the designated address, the new integrated circuit bus slave is provided with a new designated address. 如請求項6所述之積體電路匯流排(I2C)即時偵測連接狀態的裝置,其中偵測該系統資料線之準位的方式可為系統中斷或系統輪詢。 An integrated circuit bus (I2C) device for real-time detection of connection status as described in claim 6, wherein the method of detecting the level of the system data line can be system interruption or system polling. 一種積體電路匯流排(I2C)從機,可於包括一系統時脈線(SCL)與一系統資料線(SDA)之一積體電路匯流排即插即用,其特徵在於:於插入該積體電路匯流排時,於該系統資料線持續輸出低位準且持續一延遲時間後復原;及於該系統資料線持續輸出低位準且持續該延遲時間後復原,係於系統通訊開始後執行。 An integrated circuit bus (I2C) slave, which can be plug-and-played on an integrated circuit bus including a system clock line (SCL) and a system data line (SDA), and is characterized in that: When the integrated circuit bus is used, the system data line continues to output a low level and resumes after a delay time; and when the system data line continues to output a low level and continues for the delay time, the recovery is performed after the system communication starts. 如請求項11所述之積體電路匯流排(I2C)從機,其中該延遲時間係不小於最長資料傳輸封包的時間,或系統相互定義的Time-out時間。 The integrated circuit bus (I2C) slave described in claim 11, wherein the delay time is not less than the time of the longest data transmission packet, or the time-out time defined by the system. 一種積體電路匯流排(I2C)即時偵測連接狀態的方法,用以識別與控制複數個積體電路匯流排從機之即插即用功能,該積體電路匯流排包括一系統時脈線(SCL)與一系統資料線(SDA),包含:執行通訊流程;偵測到通訊錯誤時,判斷是否該系統資料線為低位準,若為低位準且持續一延遲時間後復原,則判斷有一新積體電路匯流排從機加入;及其中該通訊錯誤係由該新積體電路匯流排從機加入該積體電路匯流排,並由新積體電路匯流排從機於通訊開始後,於該系統資料線(SDA)持續輸出低位準該延遲時間所致。 An integrated circuit bus (I2C) method for real-time detection of connection status, used to identify and control the plug-and-play function of a plurality of integrated circuit bus slaves, the integrated circuit bus includes a system clock line (SCL) and a system data line (SDA), including: execute the communication process; when a communication error is detected, determine whether the system data line is low level, if it is low level and recover after a delay time, it is determined that there is a The new integrated circuit bus slave machine is added; and the communication error is added to the integrated circuit bus by the new integrated circuit bus slave machine, and the new integrated circuit bus slave machine starts communication after the start of communication. The system data line (SDA) continues to output the low level due to the delay time. 如請求項13所述之積體電路匯流排(I2C)即時偵測連接狀態的方法,其中該延遲時間係不小於最長資料傳輸封包的時間,或系統相互定義的Time-out時間。 The integrated circuit bus (I2C) method for real-time detection of connection status as described in claim 13, wherein the delay time is not less than the time of the longest data transmission packet, or the time-out time defined by the system. 一種積體電路匯流排(I2C)即時偵測連接狀態的方法,用以識別與控制複數個積體電路匯流排從機之即插即用功能,該積體電路匯流排包括一系統時脈線(SCL)與一系統資料線(SDA),包含:偵測該系統資料線為之準位,若為低位準且持續一延遲時間後復原,則判斷有一新積體電路匯流排從機加入。 An integrated circuit bus (I2C) method for real-time detection of connection status, used to identify and control the plug-and-play function of a plurality of integrated circuit bus slaves, the integrated circuit bus includes a system clock line (SCL) and a system data line (SDA), including: detecting the level of the system data line, if it is a low level and recovering after a delay time, it is determined that a new integrated circuit bus slave has been added. 如請求項15所述之積體電路匯流排(I2C)即時偵測連接狀態的方法,其中該延遲時間係不小於最長資料傳輸封包的時間,或系統相互定義的Time-out時間以上。 The integrated circuit bus (I2C) method for real-time detection of connection status as described in claim 15, wherein the delay time is not less than the time of the longest data transmission packet, or more than the time-out time defined by the system. 如請求項15所述之積體電路匯流排(I2C)即時偵測連接狀態的方法,其中偵測該系統資料線之準位的方式可為系統中斷或系統輪詢。 The method for real-time detection of the connection status of an integrated circuit bus (I2C) as described in claim 15, wherein the method of detecting the level of the system data line can be system interruption or system polling. 一種積體電路匯流排(I2C)即時偵測連接狀態的方法,用以識別與控制複數個積體電路匯流排從機之拔除偵測功能,該積體電路匯流排包括一系統時脈線(SCL)與一系統資料線(SDA),包含:詢問該些積體電路匯流排從機之裝置識別碼,並統計與紀錄該些積體電路匯流排之從機數量;及當判斷該從機數量減少時,確認有從機移除狀態;當確認有該從機移除狀態時,產生一拔出警示訊號。 An integrated circuit bus (I2C) method for real-time detection of connection status, used to identify and control the removal detection function of a plurality of integrated circuit bus slaves, the integrated circuit bus includes a system clock line ( SCL) and a system data line (SDA), including: querying the device identification codes of the IC bus slaves, and counting and recording the number of IC bus slaves; and when judging the slaves When the number is reduced, confirm that the slave is removed; when the slave is confirmed to be removed, a pull-out warning signal is generated. 如請求項18所述之積體電路匯流排(I2C)即時偵測連接狀態的裝置,其中 該積體電路匯流排(I2C)即時偵測連接狀態的裝置更包含特徵在於:判斷該新積體電路匯流排從機是否已有一指定位址,當該新積體電路匯流排從機不具有該指定位址時,提供該新積體電路匯流排從機予一新指定位址。 An integrated circuit bus (I2C) device for real-time detection of connection status as described in claim 18, wherein The device for real-time detection of the connection status of the integrated circuit bus (I2C) further includes the feature of judging whether the new integrated circuit bus slave machine has a designated address, when the new integrated circuit bus slave machine does not have When the designated address, the new integrated circuit bus slave is provided to a new designated address.
TW108143350A 2019-11-28 2019-11-28 Method and device of real time monitoring the connection status of i2c devices TWI741417B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW108143350A TWI741417B (en) 2019-11-28 2019-11-28 Method and device of real time monitoring the connection status of i2c devices

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW108143350A TWI741417B (en) 2019-11-28 2019-11-28 Method and device of real time monitoring the connection status of i2c devices

Publications (2)

Publication Number Publication Date
TW202121183A TW202121183A (en) 2021-06-01
TWI741417B true TWI741417B (en) 2021-10-01

Family

ID=77516730

Family Applications (1)

Application Number Title Priority Date Filing Date
TW108143350A TWI741417B (en) 2019-11-28 2019-11-28 Method and device of real time monitoring the connection status of i2c devices

Country Status (1)

Country Link
TW (1) TWI741417B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI817831B (en) * 2022-11-16 2023-10-01 旺玖科技股份有限公司 Serial-bus system having dynamic address table and its method for controlling the same
TWI829505B (en) * 2023-01-12 2024-01-11 旺玖科技股份有限公司 Serial-bus system provided with dynamic address assignment and its method for controlling the same

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2859659Y (en) * 2005-06-14 2007-01-17 浙江中控电气技术有限公司 IC interface and main apparatus realizing IC device plug-in and pull-out
TW201303604A (en) * 2011-06-10 2013-01-16 Intersil Americas LLC System and method for operating a one-wire protocol slave in a two-wire protocol bus environment
US20140372643A1 (en) * 2013-06-12 2014-12-18 Qualcomm Incorporated Camera control interface extension bus
TWI588660B (en) * 2015-11-24 2017-06-21 廣達電腦股份有限公司 Method of detecting fault on communication bus using baseboard management controller and fault detector for network system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2859659Y (en) * 2005-06-14 2007-01-17 浙江中控电气技术有限公司 IC interface and main apparatus realizing IC device plug-in and pull-out
TW201303604A (en) * 2011-06-10 2013-01-16 Intersil Americas LLC System and method for operating a one-wire protocol slave in a two-wire protocol bus environment
US20140372643A1 (en) * 2013-06-12 2014-12-18 Qualcomm Incorporated Camera control interface extension bus
TWI588660B (en) * 2015-11-24 2017-06-21 廣達電腦股份有限公司 Method of detecting fault on communication bus using baseboard management controller and fault detector for network system

Also Published As

Publication number Publication date
TW202121183A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
EP3234788B1 (en) DATA TRANSMISSION USING PCIe PROTOCOL VIA USB PORT
US9940282B2 (en) Bus serialization for devices without multi-device support
US7039734B2 (en) System and method of mastering a serial bus
US20060140211A1 (en) Blade server system with a management bus and method for managing the same
US20160012000A1 (en) Methods and apparatus for reliable detection and enumeration of devices
US20100223486A1 (en) Method and system for i2c clock generation
US9940277B2 (en) Multi-channel peripheral interconnect supporting simultaneous video and bus protocols
CN108008980B (en) Method and apparatus for initiating re-enumeration of USB3.0 compatible devices
US20050027889A1 (en) USB extender
TWI741417B (en) Method and device of real time monitoring the connection status of i2c devices
JP2017525200A (en) Link layer / physical layer (PHY) serial interface
JP2021531569A (en) DisplayPort Alternate Mode Communication Detection
CN110647486B (en) PCIe link training method, end equipment and communication system
WO2007030978A1 (en) Method, reset apparatus and equipment for realizing reset of master device in i2c bus
KR20210075878A (en) I3c hub promoting backward compatibility with i2c
US7391788B2 (en) Method and system for a three conductor transceiver bus
CN114936177B (en) Hot plug controller and hot plug control system
JP2001306413A (en) Usb communication device
JP2001177543A (en) Device and system for bus connection
US20150095540A1 (en) External device and a transmission system and the method of the heterogeneous device
KR20090024419A (en) Communication mehod and communication apparatus using usb
CN111221760A (en) Communication control method and device of I2C bus and storage medium
US11513978B2 (en) Dual data ports with shared detection line
EP1425674A1 (en) Method for automatically recovering from a suspend state in a usb interface
US20230273888A1 (en) USB-C Orientation Detection