TWI829474B - Slave device and addressing method for communication system - Google Patents

Slave device and addressing method for communication system Download PDF

Info

Publication number
TWI829474B
TWI829474B TW111148094A TW111148094A TWI829474B TW I829474 B TWI829474 B TW I829474B TW 111148094 A TW111148094 A TW 111148094A TW 111148094 A TW111148094 A TW 111148094A TW I829474 B TWI829474 B TW I829474B
Authority
TW
Taiwan
Prior art keywords
address
sequence
slave device
address information
address sequence
Prior art date
Application number
TW111148094A
Other languages
Chinese (zh)
Other versions
TW202424766A (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 TW111148094A priority Critical patent/TWI829474B/en
Application granted granted Critical
Publication of TWI829474B publication Critical patent/TWI829474B/en
Publication of TW202424766A publication Critical patent/TW202424766A/en

Links

Images

Landscapes

  • Computer And Data Communications (AREA)
  • Communication Control (AREA)
  • Multi Processors (AREA)
  • Small-Scale Networks (AREA)

Abstract

The present application is related to a slave device and an addressing method for a communication system. The slave device is configured with an address receiving end, an address outputting end and a microcontroller. An address setting module is executed by the microcontroller for executing the steps: receiving an address sequence having multiple of address information groups by the address receiving end, obtaining one address information group from the address sequence as a communication address of the slave device, generating a renewed address sequence base on the address sequence and providing the renewed address sequence to the electronic device connected in series to the slave device by the address outputting end. The number of the address information groups of the renewed address sequence is less than the number of the address information groups of the address sequence.

Description

通訊系統的從屬裝置及其定址方法Slave devices of communication systems and their addressing methods

本申請係有關於一種通訊系統,尤指一種通訊系統的從屬裝置及其定址方法。The present application relates to a communication system, and in particular to a slave device of the communication system and its addressing method.

電子設備為了實現各種不同的功能,需要以多種不同的電子元件(晶片、感測器等)來協同運作。然而,每個電子元件都需要透過線路進行訊號的傳送或交換,越多的電子元件代表需要越多的通訊線路,過多的線路將會導致電子設備具有過大的體積。因此,一種可以精簡通訊線路的積體匯流排電路(Inter-Integrated Circuit, C)被提出。藉由積體匯流排電路的架構以及通訊協定,多個周邊裝置僅需透過一條時脈訊號線以及一條資料傳輸線,即可與主控端進行訊號交換,有效減少通訊線路的數量。 In order to achieve various functions, electronic devices require a variety of different electronic components (chips, sensors, etc.) to work together. However, each electronic component needs to transmit or exchange signals through lines. The more electronic components, the more communication lines are needed. Too many lines will cause the electronic device to be too large. Therefore, an integrated bus circuit (Inter-Integrated Circuit, C) was proposed. Through the architecture and communication protocols of the integrated bus circuit, multiple peripheral devices can exchange signals with the host through only one clock signal line and one data transmission line, effectively reducing the number of communication lines.

在積體匯流排電路的架構中,在匯流排上的周邊裝置都被分配一位址,藉由此位址,主控端可以精準的與周邊裝置進行資料交換。然而,由於匯流排上的周邊裝置數量眾多,容易發生位址衝突的情況。In the architecture of the integrated bus circuit, peripheral devices on the bus are assigned an address. Through this address, the host can accurately exchange data with the peripheral devices. However, due to the large number of peripheral devices on the bus, address conflicts are prone to occur.

因此,如何提供一種可實現精準且快速定址的從屬裝置以及定址方法,乃為此業界急欲解決的問題之一。Therefore, how to provide a slave device and an addressing method that can achieve accurate and fast addressing is one of the problems that the industry is eager to solve.

為了解決上述之技術問題,本申請提出一種通訊系統的從屬裝置及其定址方法,使從屬裝置由包括位址資訊組的位址序列讀取相應的位址資訊,將相應的位址資訊作為通訊位址,並將位址序列傳遞至下一電子裝置。藉此,可精準且快速的以位址序列完成從屬裝置的定址。In order to solve the above technical problems, this application proposes a slave device of a communication system and its addressing method, which enables the slave device to read the corresponding address information from the address sequence including the address information group, and use the corresponding address information as a communication address, and pass the address sequence to the next electronic device. In this way, the addressing of the slave device can be completed accurately and quickly using the address sequence.

本申請的一實施例提出一種通訊系統之定址方法,通訊系統包括複數個從屬裝置,複數個從屬裝置彼此串接,每一從屬裝置包括位址接收端以及位址輸出端。每一從屬裝置執行以下步驟:使位址接收端接收位址序列,位址序列包括複數位址資訊組;讀取位址序列中的一位址資訊組,使位址資訊組做為從屬裝置的通訊位址;以位址序列產生更新位址序列,以位址輸出端將更新位址序列提供至與從屬裝置串接的下一個電子裝置,其中,更新位址序列中的位址資訊組的數量少於位址序列的複數位址資訊組的數量。An embodiment of the present application provides an addressing method for a communication system. The communication system includes a plurality of slave devices, and the plurality of slave devices are connected in series. Each slave device includes an address receiving end and an address output end. Each slave device performs the following steps: causing the address receiving end to receive an address sequence, which includes a plurality of address information groups; reading an address information group in the address sequence, and using the address information group as a slave device The communication address; using the address sequence to generate an update address sequence, and using the address output terminal to provide the update address sequence to the next electronic device connected in series with the slave device, wherein the address information group in the update address sequence The number is less than the number of complex address information groups of the address sequence.

本申請的另一實施例提出一種通訊系統之定址方法,通訊系統包括第一從屬裝置以及複數個從屬裝置,第一從屬裝置與複數個從屬裝置依序串接。所述定址方法的步驟包括:使第一從屬裝置由一通訊匯流排接收一設定位址資訊以及一位址序列資訊,且以設定位址資訊做為第一從屬裝置的通訊位址;使第一從屬裝置以位址序列資訊產生一初始位址序列,且將初始位址序列作為一位址序列提供至與第一從屬裝置串接的從屬裝置。複數個從屬裝置的每一個執行以下步驟:接收位址序列,位址序列包括複數位址資訊組;讀取位址序列中的一位址資訊組,使位址資訊組做為從屬裝置的通訊位址;以位址序列產生更新位址序列,以位址輸出端將更新位址序列提供至與從屬裝置串接的下一個從屬裝置,其中,更新位址序列中的複數位址資訊組的數量少於位址序列中的複數位址資訊組的數量。Another embodiment of the present application provides an addressing method for a communication system. The communication system includes a first slave device and a plurality of slave devices, and the first slave device and the plurality of slave devices are connected in series. The steps of the addressing method include: causing the first slave device to receive a setting address information and an address sequence information from a communication bus, and using the setting address information as the communication address of the first slave device; making the first slave device A slave device generates an initial address sequence using the address sequence information, and provides the initial address sequence as an address sequence to the slave device connected in series with the first slave device. Each of the plurality of slave devices performs the following steps: receives an address sequence, the address sequence includes a plurality of address information groups; reads an address information group in the address sequence, and causes the address information group to be used for communication by the slave device address; generate an update address sequence from the address sequence, and provide the update address sequence to the next slave device connected in series with the slave device using the address output terminal, wherein the plurality of address information groups in the update address sequence The number is less than the number of complex address information groups in the address sequence.

本申請的又一實施例提出一種通訊系統之從屬裝置,其包括儲存位址設定模組的記憶體、位址接收端、位址輸出端以及微控制器。微控制器與記憶體、位址接收端以及位址輸出端電性連接,用以執行位址設定模組,使從屬裝置執行以下步驟:使位址接收端接收位址序列,位址序列包括複數位址資訊組;讀取位址序列中的一位址資訊組,使位址資訊組做為從屬裝置的通訊位址;以位址序列產生更新位址序列,以位址輸出端將更新位址序列提供至與從屬裝置串接的下一個電子裝置,其中,更新位址序列中的位址資訊組的數量少於位址序列的複數位址資訊組的數量。Another embodiment of the present application provides a slave device of a communication system, which includes a memory storing an address setting module, an address receiving end, an address output end, and a microcontroller. The microcontroller is electrically connected to the memory, the address receiving end and the address output end, and is used to execute the address setting module, causing the slave device to perform the following steps: causing the address receiving end to receive an address sequence, and the address sequence includes Complex address information group; read an address information group in the address sequence, use the address information group as the communication address of the slave device; generate an update address sequence with the address sequence, and update the address information with the address output terminal The address sequence is provided to the next electronic device connected in series with the slave device, wherein the number of address information groups in the updated address sequence is less than the number of complex address information groups of the address sequence.

在本申請實施例中,從屬裝置包括定址專用的位址接收端以及位址輸出端,使從屬裝置可以直接接收與位址資訊相關聯的位址序列,以快速進行通訊位址的設定。此外,複數個從屬裝置可透過位址接收端以及位址輸出端彼此串接,接收來自串接的從屬裝置的位址序列,並在完成定址後將位址序列提供至下一個串接的從屬裝置,使複數個從屬裝置可精準地由位址序列中提取相應的位址資訊組以設定其通訊位址。因此,本申請可達到精準且快速的完成從屬裝置的定址的目的。In the embodiment of the present application, the slave device includes a dedicated address receiving end and an address output end, so that the slave device can directly receive the address sequence associated with the address information to quickly set the communication address. In addition, multiple slave devices can be connected in series to each other through the address receiving end and the address output end, receiving the address sequence from the serially connected slave device, and providing the address sequence to the next connected slave device after completing the addressing. The device enables multiple slave devices to accurately extract the corresponding address information group from the address sequence to set their communication addresses. Therefore, this application can achieve the purpose of accurately and quickly completing the addressing of the slave device.

關於本申請通訊系統實施例,請參考圖1,通訊系統1包括一位址控制電路110以及複數個從屬裝置200(200a、200b……200n),其中,位址控制電路110以及複數個從屬裝置200透過通訊匯流排的時脈訊號線SCL以及資料傳輸線SDA電性連接,且複數個從屬裝置200基於積體匯流排電路通訊協定與通訊系統之主控裝置(未繪示)來進行訊號交換。進一步地,位址控制電路110以及複數個從屬裝置200彼此串接,如圖1所示,位址控制電路110、從屬裝置200a、從屬裝置200b至從屬裝置200n依序串接,形成一位址序列傳輸迴路。Regarding the communication system embodiment of the present application, please refer to Figure 1. The communication system 1 includes an address control circuit 110 and a plurality of slave devices 200 (200a, 200b...200n), wherein the address control circuit 110 and a plurality of slave devices 200 200 is electrically connected through the clock signal line SCL and the data transmission line SDA of the communication bus, and the plurality of slave devices 200 perform signal exchange with the master control device (not shown) of the communication system based on the integrated bus circuit communication protocol. Further, the address control circuit 110 and a plurality of slave devices 200 are connected in series with each other. As shown in FIG. 1 , the address control circuit 110, the slave device 200a, the slave device 200b and the slave device 200n are connected in series in order to form an address. Sequence transmission loop.

在此實施例中,位址控制電路110用以提供一初始位址序列,作為從屬裝置200a讀取的位址序列。從屬裝置200a讀取位址序列的其中一位址資訊組,並使讀取的位址資訊組做為從屬裝置200a的通訊位址,從屬裝置200a並以位址序列產生更新位址序列,且將更新位址序列提供至串接的從屬裝置200b。從屬裝置200b至從屬裝置200n的作動與從屬裝置200a相同,因此於此不再贅述。In this embodiment, the address control circuit 110 is used to provide an initial address sequence as an address sequence read by the slave device 200a. The slave device 200a reads one of the address information groups in the address sequence, and uses the read address information group as the communication address of the slave device 200a. The slave device 200a uses the address sequence to generate an updated address sequence, and An updated address sequence is provided to the tandem slave device 200b. The operations of the slave device 200b to the slave device 200n are the same as those of the slave device 200a, and therefore will not be described again.

藉此,本申請之通訊系統可使從屬裝置由包括位址資訊組的位址序列讀取相應的位址資訊,將相應的位址資訊作為通訊位址,並將位址序列傳遞至下一從屬裝置,達到精準且快速的完成從屬裝置的定址的目的。再者,以位址控制電路110提供初始位址序列來實現上述之定址操作,從屬裝置200在通訊匯流排上的通訊位址將可靈活地藉由位址序列而改變,即從屬裝置200的通訊位址無須被限制在固定位址,而可以根據系統配置需求而變更,更增加通訊系統建置的便利性。In this way, the communication system of the present application can enable the slave device to read the corresponding address information from the address sequence including the address information group, use the corresponding address information as the communication address, and pass the address sequence to the next The slave device achieves the purpose of accurately and quickly completing the addressing of the slave device. Furthermore, the address control circuit 110 provides an initial address sequence to implement the above addressing operation. The communication address of the slave device 200 on the communication bus will be flexibly changed by the address sequence, that is, the slave device 200's communication address. The communication address does not need to be limited to a fixed address, but can be changed according to system configuration requirements, which further increases the convenience of communication system construction.

在此實施例中,複數個從屬裝置200例如為晶片、溫度感測器、燈條等周邊裝置,且本申請不以此為限制。In this embodiment, the plurality of slave devices 200 are, for example, peripheral devices such as chips, temperature sensors, light bars, etc., and the present application is not limited thereto.

在一實施例中,位址控制電路110可由上述之主控裝置實現,主控裝置例如為微處理器等可產生控制指令之電路或裝置,且本申請不以此為限制。In one embodiment, the address control circuit 110 can be implemented by the above-mentioned main control device. The main control device is, for example, a microprocessor or other circuit or device that can generate control instructions, and this application is not limited thereto.

請參考圖2,圖2為本申請從屬裝置200之實施例示意圖。從屬裝置200至少包括一微控制器210、一位址接收端220、一位址輸出端230、一時脈訊號接收端240、一資料交換端250以及一記憶體260,其中,微控制器210與位址接收端220、位址輸出端230、時脈訊號接收端240、資料交換端250以及記憶體260電性連接。Please refer to FIG. 2 , which is a schematic diagram of a slave device 200 according to an embodiment of the present application. The slave device 200 at least includes a microcontroller 210, an address receiving end 220, an address output end 230, a clock signal receiving end 240, a data exchange end 250 and a memory 260, wherein the microcontroller 210 and The address receiving end 220, the address output end 230, the clock signal receiving end 240, the data exchange end 250 and the memory 260 are electrically connected.

請同時參考圖1及圖2,位址接收端220與前一個電子裝置電性連接,用以接收來自前一個電子裝置的位址序列。位址輸出端230則與下一個電子裝置電性連接,用以將產生的更新位址序列傳送至下一個電子裝置。即從屬裝置200透過其位址接收端220以及位址輸出端230與其他電子裝置串接。Please refer to FIG. 1 and FIG. 2 at the same time. The address receiving end 220 is electrically connected to the previous electronic device for receiving the address sequence from the previous electronic device. The address output terminal 230 is electrically connected to the next electronic device for transmitting the generated updated address sequence to the next electronic device. That is, the slave device 200 is connected in series with other electronic devices through its address receiving end 220 and address output end 230 .

在一實施例中,位址接收端220接收的位址序列為位址控制電路110提供的初始位址序列,或者為由前一個從屬裝置200所產生的更新位址序列。舉例來說,從屬裝置200a所接收的位址序列為位址控制電路110提供的初始位址序列,從屬裝置200b所接收的位址序列為從屬裝置200a提供的更新位址序列。In one embodiment, the address sequence received by the address receiving end 220 is an initial address sequence provided by the address control circuit 110 or an updated address sequence generated by the previous slave device 200 . For example, the address sequence received by the slave device 200a is an initial address sequence provided by the address control circuit 110, and the address sequence received by the slave device 200b is an updated address sequence provided by the slave device 200a.

在一實施例中,上述的電子裝置為串接的從屬裝置200或位址控制電路110。舉例來說,與從屬裝置200a串接的前一個電子裝置為位址控制電路110,與從屬裝置200a串接的下一個電子裝置為從屬裝置200b,與從屬裝置200b串接的前一個電子裝置為從屬裝置200a,與從屬裝置200b串接的下一個電子裝置為從屬裝置(未繪示)。In one embodiment, the above-mentioned electronic device is a serially connected slave device 200 or the address control circuit 110 . For example, the previous electronic device connected in series with the slave device 200a is the address control circuit 110, the next electronic device connected in series with the slave device 200a is the slave device 200b, and the previous electronic device connected in series with the slave device 200b is the address control circuit 110. The slave device 200a, and the next electronic device connected in series with the slave device 200b is a slave device (not shown).

請參考圖2,時脈訊號接收端240為訊號交換介面,用以與通訊匯流排的時脈訊號線SCL電性連接,以接收時脈訊號線SCL上的時脈訊號。資料交換端250為訊號交換介面,用以與通訊匯流排的資料傳輸線SDA電性連接,以接收資料傳輸線SDA上的控制指令。Please refer to FIG. 2. The clock signal receiving end 240 is a signal exchange interface for electrically connecting with the clock signal line SCL of the communication bus to receive the clock signal on the clock signal line SCL. The data exchange terminal 250 is a signal exchange interface for electrically connecting with the data transmission line SDA of the communication bus to receive control instructions on the data transmission line SDA.

請參考圖2,記憶體260用以儲存從屬裝置200運作時所需之韌體或軟體。進一步的,記憶體260並儲存有相應於本申請之定址方法的位址設定模組261。因此,從屬裝置200可透過執行位址設定模組261來實現本申請之定址方法。Referring to FIG. 2 , the memory 260 is used to store firmware or software required for the operation of the slave device 200 . Furthermore, the memory 260 stores an address setting module 261 corresponding to the addressing method of the present application. Therefore, the slave device 200 can implement the addressing method of the present application by executing the address setting module 261 .

在此實施例中,位址設定模組261可以韌體或軟體來實現,且本申請不以此為限制。In this embodiment, the address setting module 261 can be implemented by firmware or software, and this application is not limited thereto.

在一實施例中,記憶體260可為微控制器210之內建記憶體,且本申請不以此為限制。In one embodiment, the memory 260 can be a built-in memory of the microcontroller 210, and this application is not limited thereto.

在一實施例中,記憶體260可為快閃記憶體(Flash memory),且本申請不以此為限制。In one embodiment, the memory 260 may be a flash memory, and this application is not limited thereto.

請參考圖2,微控制器210至少用以讀取並執行記憶體260儲存的位址設定模組261,以使從屬裝置200執行於位址設定模式。於位址設定模式,微控制器210使位址接收端220接收位址序列,並讀取位址序列的其中一位址資訊組,且使讀取的位址資訊組做為從屬裝置的通訊位址,並以接收的位址序列產生更新位址序列,以位址輸出端230將更新位址序列提供至串接的下一個電子裝置,且更新位址序列中的位址資訊組的數量少於接收的位址序列的位址資訊組的數量。進一步地,微控制器210執行位址設定模式,以位址序列中不包括讀取的位址資訊組的其他位址資訊組產生更新位址序列。進一步地,微控制器210執行位址設定模式,以位址序列中時序晚於讀取的位址資訊組的其他位址資訊組產生更新位址序列。Referring to FIG. 2 , the microcontroller 210 is at least used to read and execute the address setting module 261 stored in the memory 260 so that the slave device 200 executes in the address setting mode. In the address setting mode, the microcontroller 210 causes the address receiving end 220 to receive the address sequence, read one of the address information groups in the address sequence, and use the read address information group as a slave device for communication. address, and generate an updated address sequence using the received address sequence, provide the updated address sequence to the next electronic device connected in series with the address output terminal 230, and update the number of address information groups in the address sequence. Less than the number of address packets in the received address sequence. Further, the microcontroller 210 executes the address setting mode to generate an update address sequence using other address information groups in the address sequence that do not include the read address information group. Further, the microcontroller 210 executes the address setting mode to generate an update address sequence using other address information groups in the address sequence whose timing is later than the read address information group.

藉此,本申請之從屬裝置200可透過位址接收端220以及位址輸出端230與通訊系統上的電子裝置串接,並以位址接收端220以及位址輸出端230直接接收並輸出位址序列,且以接收的位址序列快速地完成通訊位址的取得及設定,因此可達到快速完成從屬裝置的定址的目的。此外,從屬裝置200輸出的位址序列不包括其通訊位址,串接的下一個從屬裝置200不會由接收的位址序列讀取到上一個電子裝置使用的通訊位址,有效避免從屬裝置200提取錯誤的位址資訊而發生位址衝突的情況發生,因此本申請更可達到精準完成從屬裝置的定址的目的。Thereby, the slave device 200 of the present application can be connected in series with the electronic device on the communication system through the address receiving end 220 and the address output end 230, and directly receive and output bits through the address receiving end 220 and the address output end 230. Address sequence, and quickly complete the acquisition and setting of the communication address with the received address sequence, so the purpose of quickly completing the addressing of the slave device can be achieved. In addition, the address sequence output by the slave device 200 does not include its communication address. The next slave device 200 connected in series will not read the communication address used by the previous electronic device from the received address sequence, effectively preventing the slave device from reading the communication address used by the previous electronic device. 200 may extract incorrect address information and cause an address conflict. Therefore, this application can further achieve the purpose of accurately completing the addressing of the slave device.

以下將配合圖1、圖3以及圖4說明本申請之定址方法,其中,圖3為位址序列實施例示意圖。請先參考圖3,圖3包括位址序列DS、DS1、DS2、DS3。在本實施例中,位址序列DS包括有位址A、位址B、位址C以及位址D等複數個位址資訊組,位址序列DS1包括有位址B、位址C以及位址D等複數個位址資訊組,位址序列DS2包括有位址C以及位址D等複數個位址資訊組,位址序列DS3包括有位址D的位址資訊組,其中,位址A的時序早於位址B、位址B的時序早於位址C、位址C的時序早於位址D。The addressing method of the present application will be described below with reference to Figures 1, 3 and 4. Figure 3 is a schematic diagram of an address sequence embodiment. Please refer to Figure 3 first. Figure 3 includes the address sequence DS, DS1, DS2, and DS3. In this embodiment, the address sequence DS includes a plurality of address information groups such as address A, address B, address C, and address D. The address sequence DS1 includes address B, address C, and address information. The address sequence DS2 includes a plurality of address information groups such as the address C and the address D, and the address sequence DS3 includes an address information group including the address D, where the address The timing of A is earlier than that of address B, the timing of address B is earlier than that of address C, and the timing of address C is earlier than that of address D.

在本實施例中,初始位址序列的位址資訊組的數量等於或大於複數個從屬裝置200的數量。舉例來說,通訊系統1所配置的從屬裝置200例如為五個,初始位址序列的位址資訊組因此可配置為五組或六組。In this embodiment, the number of address information groups of the initial address sequence is equal to or greater than the number of slave devices 200 . For example, the communication system 1 is configured with five slave devices 200 , and therefore the address information groups of the initial address sequence can be configured as five or six groups.

在一實施例中,每一位址資訊組包括七位元的位址資訊,且本申請不以此為限制。In one embodiment, each address information group includes seven bits of address information, and this application is not limited to this.

在本實施例中,位址序列DS為上述之初始位址序列,位址序列DS1、DS2、DS3為上述之位址序列及更新位址序列。舉例來說,從屬裝置200a接收位址序列DS,並基於位址序列DS產生位址序列DS1的更新位址序列,且將位址序列DS1提供至從屬裝置200b,作為從屬裝置200b接收的位址序列。從屬裝置200b接收位址序列DS1,並基於位址序列DS1產生位址序列DS2的更新位址序列,且將位址序列DS2提供至下一個從屬裝置,以下將不再贅述。In this embodiment, the address sequence DS is the above-mentioned initial address sequence, and the address sequences DS1, DS2, and DS3 are the above-mentioned address sequences and update address sequences. For example, the slave device 200a receives the address sequence DS, generates an updated address sequence of the address sequence DS1 based on the address sequence DS, and provides the address sequence DS1 to the slave device 200b as the address received by the slave device 200b sequence. The slave device 200b receives the address sequence DS1, generates an updated address sequence of the address sequence DS2 based on the address sequence DS1, and provides the address sequence DS2 to the next slave device, which will not be described in detail below.

在本實施例中,從屬裝置200產生的更新位址序列的位址資訊組的數量少於從屬裝置200接收的位址序列的位址資訊組的數量。舉例來說,從屬裝置200a以包括四個位置資訊組(位址A、位址B、位址C以及位址D)的位址序列DS,產生包括三個位置資訊組(位址B、位址C以及位址D)的位址序列DS1作為更新位址序列。In this embodiment, the number of address information groups of the update address sequence generated by the slave device 200 is less than the number of address information groups of the address sequence received by the slave device 200 . For example, the slave device 200a uses an address sequence DS including four location information groups (address A, address B, address C, and address D) to generate three location information groups (address B, address D). The address sequence DS1 of address C and address D) is used as the update address sequence.

接著請參考圖4,圖4為根據本申請之定址方法流程示意圖,其包括步驟S110、S130、S150。在步驟S110,執行位址設定操作。在此步驟中,位址控制電路110產生一初始位址序列,並將初始位址序列傳送至串接的從屬裝置200,例如為從屬裝置200a。於步驟S130,複數個從屬裝置依序接收並傳遞位址序列。在此步驟中,複數個從屬裝置200(200a、200b……200n)依序由前一個電子裝置接收位址序列,並以接收的位址序列產生更新位址序列,且將更新位址序列提供至串接的下一個電子裝置。在步驟S150中,結束位址設定操作。複數個從屬裝置200(200a、200b……200n)以接收的位址序列完成通訊位址的設定後,結束位址設定操作。位址控制電路110根據結束設定訊號結束位址設定操作。在一實施例中,結束設定訊號為接續在位址序列後的訊號序列,例如為包括複數個位元的序列,且複數個位元中的每一個的值為0。在另一實施例中,位址控制電路110在接收到來自最後一個從屬裝置200(例如為從屬裝置200n)提供的位址序列後,結束位址設定操作。由於位址控制電路110接收到位址序列,代表位址序列已傳送至最後一個從屬裝置200,且串接的複數個從屬裝置200已完成其定址操作,因此位址控制電路110可據以結束位址設定操作。Next, please refer to Figure 4. Figure 4 is a schematic flow chart of the addressing method according to the present application, which includes steps S110, S130, and S150. In step S110, an address setting operation is performed. In this step, the address control circuit 110 generates an initial address sequence and transmits the initial address sequence to the serially connected slave device 200, such as the slave device 200a. In step S130, a plurality of slave devices sequentially receive and transmit the address sequence. In this step, a plurality of slave devices 200 (200a, 200b...200n) sequentially receive the address sequence from the previous electronic device, generate an update address sequence using the received address sequence, and provide the update address sequence. to the next electronic device in series. In step S150, the address setting operation is ended. After the plurality of slave devices 200 (200a, 200b...200n) complete the communication address setting with the received address sequence, the address setting operation ends. The address control circuit 110 ends the address setting operation according to the end setting signal. In one embodiment, the end setting signal is a signal sequence following the address sequence, for example, a sequence including a plurality of bits, and the value of each of the plurality of bits is 0. In another embodiment, the address control circuit 110 ends the address setting operation after receiving the address sequence provided from the last slave device 200 (for example, the slave device 200n). Since the address control circuit 110 receives the address sequence, it means that the address sequence has been transmitted to the last slave device 200 and the plurality of slave devices 200 connected in series have completed their addressing operations. Therefore, the address control circuit 110 can end the bit sequence accordingly. address setting operation.

進一步的,請參考圖1、圖3、圖4及圖5,步驟S130更可包括步驟S131~S139,以下並以從屬裝置200a為例來說明。Further, please refer to FIG. 1 , FIG. 3 , FIG. 4 and FIG. 5 . Step S130 may further include steps S131 to S139 . The following description takes the slave device 200 a as an example.

在步驟S131,上電初始狀態。在此步驟中,從屬裝置200a為上電之後的初始狀態,並等待進行位址設定操作。In step S131, power on initial state. In this step, the slave device 200a is in an initial state after being powered on and is waiting for an address setting operation.

在步驟S133,接收位址序列。在此步驟中,從屬裝置200a接收來自於位址控制電路110的初始位址序列,並進行位址設定操作。In step S133, an address sequence is received. In this step, the slave device 200a receives the initial address sequence from the address control circuit 110 and performs an address setting operation.

步驟S135,讀取位址資訊並設定通訊位址。在此步驟中,從屬裝置200讀取位址序列的其中一位址資訊組,使位址資訊組做為從屬裝置200的通訊位址。進一步地,從屬裝置200a讀取並提取初始位址序列中的第一個位址資訊組(如圖3所示的位址A),並將位址A設定為從屬裝置200a在通訊匯流排上的通訊位址。即從屬裝置200將位址序列中,時序早於其他位址資訊組的第一組位址資訊組作為其通訊位址。由於從屬裝置200是將位址序列中的第一個位址資訊組作為其通訊位址,從屬裝置200不會提取其他從屬裝置200所使用的位址通訊組(例如位址B或位址C),因此更提升了從屬裝置200定址的精準度。Step S135: Read the address information and set the communication address. In this step, the slave device 200 reads one of the address information groups in the address sequence, and uses the address information group as the communication address of the slave device 200 . Further, the slave device 200a reads and extracts the first address information group (address A shown in Figure 3) in the initial address sequence, and sets address A as the slave device 200a on the communication bus. correspondence address. That is, the slave device 200 uses the first group of address information groups in the address sequence whose timing is earlier than other groups of address information as its communication address. Since the slave device 200 uses the first address information group in the address sequence as its communication address, the slave device 200 will not extract the address communication groups used by other slave devices 200 (such as address B or address C). ), thereby further improving the accuracy of addressing the slave device 200.

步驟S137,以位址序列產生並輸出更新位址序列。在此步驟中,從屬裝置200以位址序列產生更新位址序列,將更新位址序列提供至與從屬裝置200串接的下一個電子裝置。進一步地,從屬裝置200以位址序列中不包括作為從屬裝置200的通訊位址的其他位址資訊組產生更新位址序列。在此實施例中,從屬裝置200a以不包括位址A的位址B~D產生更新位址序列(位址序列DS1),且將更新位址序列(位址序列DS1)提供給與從屬裝置200a串接的從屬裝置200b。因此,從屬裝置200所產生的更新位址序列中的位址資訊組的數量少於從屬裝置200接收的位址序列中的位址資訊組的數量,且以位址序列中,時序晚於第一組位址資訊組的其他位址資訊組產生更新位址序列。接著進行步驟S139,即執行步驟S150。Step S137: Generate and output an updated address sequence in the address sequence. In this step, the slave device 200 generates an update address sequence based on the address sequence, and provides the update address sequence to the next electronic device connected in series with the slave device 200 . Further, the slave device 200 generates an update address sequence using other address information groups that do not include the communication address of the slave device 200 in the address sequence. In this embodiment, the slave device 200a generates an update address sequence (address sequence DS1) using addresses B~D excluding address A, and provides the update address sequence (address sequence DS1) to the slave device. 200a serially connected slave device 200b. Therefore, the number of address information groups in the update address sequence generated by the slave device 200 is less than the number of address information groups in the address sequence received by the slave device 200, and the timing in the address sequence is later than the Another set of address information of one set of address information generates an updated address sequence. Next, step S139 is performed, that is, step S150 is performed.

藉此,本申請之定址方法使從屬裝置200與通訊系統上的電子裝置串接以傳遞位址序列,並使從屬裝置200以位址序列快速得到相應的位址資訊,達到快速完成從屬裝置200的定址的目的。此外,從屬裝置200輸出的位址序列不包括自身的通訊位址,串接的下一個從屬裝置200不會由接收的位址序列讀取到上一個從屬裝置200使用的通訊位址,可有效避免從屬裝置200提取錯誤的位址資訊而發生位址衝突的情況發生,更可達到精準完成從屬裝置200的定址的目的。In this way, the addressing method of the present application enables the slave device 200 to be connected in series with the electronic device on the communication system to transfer the address sequence, and allows the slave device 200 to quickly obtain the corresponding address information based on the address sequence, thereby quickly completing the slave device 200 the purpose of addressing. In addition, the address sequence output by the slave device 200 does not include its own communication address. The next slave device 200 connected in series will not read the communication address used by the previous slave device 200 from the received address sequence, which can effectively This prevents the slave device 200 from extracting erroneous address information and causing an address conflict, and further achieves the goal of accurately completing the addressing of the slave device 200 .

關於本申請通訊系統的另一實施例,請參考圖6,圖6實施例與圖1的差別在於,通訊系統2更包括一第一從屬裝置300以及一主控裝置100。第一從屬裝置300、主控裝置100以及複數個從屬裝置200透過通訊匯流排的時脈訊號線SCL以及資料傳輸線SDA電性連接,且第一從屬裝置300以及複數個從屬裝置200基於積體匯流排電路通訊協定與主控裝置100來進行訊號交換。Regarding another embodiment of the communication system of the present application, please refer to FIG. 6 . The difference between the embodiment of FIG. 6 and FIG. 1 is that the communication system 2 further includes a first slave device 300 and a master control device 100 . The first slave device 300, the master device 100 and the plurality of slave devices 200 are electrically connected through the clock signal line SCL and the data transmission line SDA of the communication bus, and the first slave device 300 and the plurality of slave devices 200 are based on the integrated bus The circuit communication protocol is arranged with the main control device 100 to exchange signals.

進一步地,第一從屬裝置300以及複數個從屬裝置200彼此串接,如圖6所示,第一從屬裝置300、從屬裝置200a、從屬裝置200b至從屬裝置200n依序串接,形成一位址序列傳輸路徑。進一步地,第一從屬裝置300用以接收一第一控制訊號CS1,以回應於第一控制訊號CS1進行相應的位址設定操作,複數個從屬裝置200用以接收一第二控制訊號CS2,以回應於第二控制訊號CS2進行相應的位址設定操作。在一實施例中,當第一從屬裝置300以及複數個從屬裝置200上電時,第一控制訊號CS1被提供至第一從屬裝置300,第二控制訊號CS2被提供至複數個從屬裝置200,且第一控制訊號CS1為具低電壓準位的電壓值,第二控制訊號CS2為具高電壓準位的電壓值,且本申請不以此為限制。Further, the first slave device 300 and the plurality of slave devices 200 are connected in series with each other. As shown in Figure 6, the first slave device 300, the slave device 200a, the slave device 200b and the slave device 200n are connected in series in order to form an address. Sequence transmission path. Further, the first slave device 300 is used to receive a first control signal CS1 to perform a corresponding address setting operation in response to the first control signal CS1, and the plurality of slave devices 200 is used to receive a second control signal CS2 to respond to the first control signal CS1. In response to the second control signal CS2, a corresponding address setting operation is performed. In one embodiment, when the first slave device 300 and the plurality of slave devices 200 are powered on, the first control signal CS1 is provided to the first slave device 300 and the second control signal CS2 is provided to the plurality of slave devices 200. Moreover, the first control signal CS1 has a voltage value with a low voltage level, and the second control signal CS2 has a voltage value with a high voltage level, and this application is not limited thereto.

第一從屬裝置300回應於第一控制訊號CS1,由通訊匯流排接收來自主控裝置100的設定位址資訊以及位址序列資訊,且以設定位址資訊做為第一從屬裝置300於通訊匯流排上的通訊位址,並以位址序列資訊產生上述之初始位址序列(如圖3的位址序列DS),且將初始位址序列提供至與第一從屬裝置300串接的從屬裝置200(例如圖6所示之從屬裝置200a)。The first slave device 300 responds to the first control signal CS1, receives the set address information and address sequence information from the master device 100 via the communication bus, and uses the set address information as the first slave device 300 in the communication bus. The communication address in the queue is used to generate the above-mentioned initial address sequence (address sequence DS in Figure 3) using the address sequence information, and the initial address sequence is provided to the slave device connected in series with the first slave device 300 200 (such as slave device 200a shown in Figure 6).

複數個從屬裝置200回應於第二控制訊號CS2,進行上述圖4或圖5之位址設定操作,因此於此不再贅述。The plurality of slave devices 200 respond to the second control signal CS2 and perform the address setting operation of FIG. 4 or FIG. 5 , so the details will not be described again.

在此實施例中,第一從屬裝置300以及複數個從屬裝置200可由圖2之實施例來實現。進一步地,第一從屬裝置300的位址接收端(如圖2所示的位址接收端220)用以接收第一控制訊號CS1,複數個從屬裝置200的位址接收端(如圖2所示的位址接收端220)用以接收第二控制訊號CS2。需注意的是,在此實施例中,最後一個從屬裝置200將不執行產生更新位址序列的操作,亦不透過其位址輸出端230與其他電子裝置電性連接,如從屬裝置200n所示。In this embodiment, the first slave device 300 and the plurality of slave devices 200 can be implemented by the embodiment of FIG. 2 . Further, the address receiving end of the first slave device 300 (the address receiving end 220 shown in FIG. 2) is used to receive the first control signal CS1, and the address receiving ends (shown in FIG. 2) of a plurality of slave devices 200 The address receiving end 220 shown in the figure is used to receive the second control signal CS2. It should be noted that in this embodiment, the last slave device 200 will not perform the operation of generating the update address sequence, nor will it be electrically connected to other electronic devices through its address output terminal 230, as shown in the slave device 200n. .

藉此,本申請之通訊系統2可使接收第一控制訊號CS1的第一從屬裝置300產生位址序列,使得其他從屬裝置200由位址序列準確且快速地讀取相應的位址資訊以設定其通訊位址,並將位址序列傳遞至下一從屬裝置200,即本申請之通訊系統僅藉由從屬裝置200即可實現,並可達到精準且快速的完成從屬裝置的定址的目的。再者,以主控裝置100提供位址序列資訊來實現上述之定址操作,從屬裝置200在通訊匯流排上的通訊位址將可靈活地藉由位址序列而改變,即從屬裝置200的通訊位址無須被限制在固定位址,而可以根據系統配置需求而變更,更增加通訊系統建置的便利性。Thereby, the communication system 2 of the present application can enable the first slave device 300 that receives the first control signal CS1 to generate an address sequence, so that other slave devices 200 can accurately and quickly read the corresponding address information from the address sequence to set the address. Its communication address is passed to the next slave device 200, that is, the communication system of the present application can be implemented only by the slave device 200, and can achieve the purpose of accurately and quickly completing the addressing of the slave device. Furthermore, with the master device 100 providing address sequence information to implement the above addressing operation, the communication address of the slave device 200 on the communication bus will be flexibly changed by the address sequence, that is, the communication address of the slave device 200 The address does not need to be limited to a fixed address, but can be changed according to system configuration requirements, which further increases the convenience of communication system construction.

進一步地,請參考圖7,圖7為本申請通訊系統之定址方法實施例示意圖。在步驟S210,使從屬裝置初始化。在此步驟中,使第一從屬裝置300以及複數個從屬裝置200上電,並將第一控制訊號CS1提供至第一從屬裝置300,將第二控制訊號CS2提供至複數個從屬裝置200。Further, please refer to FIG. 7 , which is a schematic diagram of an embodiment of the addressing method of the communication system of the present application. In step S210, the slave device is initialized. In this step, the first slave device 300 and the plurality of slave devices 200 are powered on, the first control signal CS1 is provided to the first slave device 300 , and the second control signal CS2 is provided to the plurality of slave devices 200 .

在步驟S220,執行位址設定操作。在此步驟中,主控裝置100以通訊匯流排提供起始指令,使第一從屬裝置300以及複數個從屬裝置200基於起始指令執行於位址設定模式,且主控裝置100基於第一控制訊號CS1,產生並提供設定位址資訊以及位址序列資訊至接收第一控制訊號CS1的第一從屬裝置300。換言之,主控裝置100是將設定位址資訊以及位址序列資訊提供給接收第一控制訊號CS1的從屬裝置。在此實施例中,起始指令為連續的複數個讀取指令。在一實施例中,複數個讀取指令可以為預先指定的複數個讀取指令,且本申請不以此為限制。In step S220, an address setting operation is performed. In this step, the master control device 100 provides a start command through the communication bus, so that the first slave device 300 and the plurality of slave devices 200 execute in the address setting mode based on the start command, and the master control device 100 executes the address setting mode based on the first control device. The signal CS1 generates and provides setting address information and address sequence information to the first slave device 300 that receives the first control signal CS1. In other words, the master device 100 provides the set address information and the address sequence information to the slave device that receives the first control signal CS1. In this embodiment, the starting instruction is a plurality of consecutive read instructions. In one embodiment, the plurality of read instructions may be a plurality of pre-specified read instructions, and the present application is not limited thereto.

在步驟S230,產生初始位址序列。在此步驟中,使第一從屬裝置300回應於接收的設定位址資訊,基於設定位址資訊設定其通訊位址。舉例來說,將設定位址資訊中的位址資訊設定為其通訊位址。在此步驟中,第一從屬裝置300並回應於位址序列資訊,產生初始位址序列,且將初始位址序列提供至串接的從屬裝置200a。In step S230, an initial address sequence is generated. In this step, the first slave device 300 responds to the received set address information and sets its communication address based on the set address information. For example, set the address information in the set address information as its communication address. In this step, the first slave device 300 responds to the address sequence information, generates an initial address sequence, and provides the initial address sequence to the serially connected slave device 200a.

在步驟S240,複數個從屬裝置依序接收並傳遞位址序列。在此步驟中,複數個從屬裝置200執行如圖5所述之操作,因此於此不再贅述。In step S240, a plurality of slave devices sequentially receive and transmit the address sequence. In this step, a plurality of slave devices 200 perform operations as shown in FIG. 5 , so the details will not be described again.

在步驟S250,結束位址設定操作。在此步驟中,於複數個從屬裝置200完成通訊位址的設定後,結束位址設定操作。在一實施例中,複數個從屬裝置200以接收的位址序列完成通訊位址的設定,且接收到結束設定訊號後,結束位址設定操作。在一實施例中,結束設定訊號由第一從屬裝置300提供,結束設定訊號例如為包括複數個位元的序列,且複數個位元中的每一個的值為0。於此,結束本申請之通訊系統的定址方法。In step S250, the address setting operation ends. In this step, after the plurality of slave devices 200 complete the setting of communication addresses, the address setting operation ends. In one embodiment, the plurality of slave devices 200 complete the setting of communication addresses using the received address sequence, and after receiving the end-of-setting signal, the address setting operation is completed. In one embodiment, the end setting signal is provided by the first slave device 300. The end setting signal is, for example, a sequence including a plurality of bits, and the value of each of the plurality of bits is 0. At this point, the addressing method of the communication system of this application ends.

在此實施例中,本申請之通訊系統2的定址方法使接收第一控制訊號CS1的第一從屬裝置300產生位址序列,且其他從屬裝置200由位址序列讀取相應的位址資訊組以設定其通訊位址,並將位址序列傳遞至下一從屬裝置200,即本申請之通訊系統僅藉由從屬裝置即可實現,並可以專用的位址傳輸路徑達到精準且快速的完成從屬裝置的定址的目的。再者,以主控裝置100提供位址序列資訊來實現上述之定址操作,從屬裝置200在通訊匯流排上的通訊位址將可靈活地藉由位址序列而改變,即從屬裝置200的通訊位址無須被限制在固定位址,而可以根據系統配置需求而變更,更增加通訊系統建置的便利性。In this embodiment, the addressing method of the communication system 2 of the present application causes the first slave device 300 that receives the first control signal CS1 to generate an address sequence, and other slave devices 200 read the corresponding address information group from the address sequence. To set its communication address and pass the address sequence to the next slave device 200, that is, the communication system of this application can be implemented only through the slave device, and can achieve accurate and fast completion of the slave device through a dedicated address transmission path. The purpose of device addressing. Furthermore, with the master device 100 providing address sequence information to implement the above addressing operation, the communication address of the slave device 200 on the communication bus will be flexibly changed by the address sequence, that is, the communication address of the slave device 200 The address does not need to be limited to a fixed address, but can be changed according to system configuration requirements, which further increases the convenience of communication system construction.

綜上所述,由於本申請之從屬裝置包括定址專用的位址接收端以及位址輸出端,使從屬裝置可以直接接收與位址資訊相關聯的位址序列,以快速進行通訊位址的設定。此外,複數個從屬裝置可透過位址接收端以及位址輸出端彼此串接,接收來自串接的從屬裝置的位址序列,並在完成定址後將位址序列提供至下一個串接的從屬裝置,使複數個從屬裝置可精準地由位址序列中提取相應的位址資訊組以設定其通訊位址。因此,本申請可達到精準且快速的完成從屬裝置的定址的目的。再者,以位址序列來實現上述之定址操作,從屬裝置在通訊匯流排上的通訊位址將可靈活地藉由位址序列而改變,即從屬裝置的通訊位址無須被限制在固定位址,而可以根據系統配置需求而變更,更增加通訊系統建置的便利性。In summary, since the slave device of this application includes a dedicated address receiving end and an address output end, the slave device can directly receive the address sequence associated with the address information to quickly set the communication address. . In addition, multiple slave devices can be connected in series to each other through the address receiving end and the address output end, receiving the address sequence from the serially connected slave device, and providing the address sequence to the next connected slave device after completing the addressing. The device enables multiple slave devices to accurately extract the corresponding address information group from the address sequence to set their communication addresses. Therefore, this application can achieve the purpose of accurately and quickly completing the addressing of the slave device. Furthermore, by using an address sequence to implement the above addressing operation, the communication address of the slave device on the communication bus will be flexibly changed by the address sequence, that is, the communication address of the slave device does not need to be limited to a fixed position. The address can be changed according to system configuration requirements, which further increases the convenience of communication system construction.

1、2:通訊系統1, 2: Communication system

100:主控裝置100:Master control device

110:位址控制電路110:Address control circuit

200、200a、200b、200n:從屬裝置200, 200a, 200b, 200n: slave device

210:微控制器210:Microcontroller

220:位址接收端220: Address receiving end

230:位址輸出端230: Address output terminal

240:時脈訊號接收端240: Clock signal receiving end

250:資料交換端250: Data exchange terminal

260:記憶體260:Memory

261:位址設定模組261:Address setting module

300:第一從屬裝置300: First slave device

CS1:第一控制訊號CS1: first control signal

CS2:第二控制訊號CS2: second control signal

DS、DS1、DS2、DS3:位址序列DS, DS1, DS2, DS3: address sequence

SCL:時脈訊號線SCL: clock signal line

SDA:資料傳輸線SDA: data transmission line

S110、S130、S131、S133、S135、S137、S139、S150、S210、S220、S230、S240、S250:步驟S110, S130, S131, S133, S135, S137, S139, S150, S210, S220, S230, S240, S250: Steps

圖1為根據本申請之通訊系統實施例一示意圖; 圖2為根據本申請之從屬裝置實施例示意圖; 圖3為根據本申請之位址序列實施例示意圖; 圖4為根據本申請之定址方法實施例示意圖; 圖5為根據本申請之定址方法實施例示意圖二; 圖6為根據本申請之通訊系統實施例二示意圖;以及 圖7為根據本申請之定址方法實施例二示意圖。 Figure 1 is a schematic diagram of a communication system according to an embodiment of the present application; Figure 2 is a schematic diagram of an embodiment of a slave device according to the present application; Figure 3 is a schematic diagram of an address sequence embodiment according to the present application; Figure 4 is a schematic diagram of an embodiment of the addressing method according to the present application; Figure 5 is a schematic diagram of the second embodiment of the addressing method according to the present application; Figure 6 is a schematic diagram of a communication system according to Embodiment 2 of the present application; and Figure 7 is a schematic diagram of Embodiment 2 of the addressing method according to the present application.

200:從屬裝置 200:Slave device

210:微控制器 210:Microcontroller

220:位址接收端 220: Address receiving end

230:位址輸出端 230: Address output terminal

240:時脈訊號接收端 240: Clock signal receiving end

250:資料交換端 250: Data exchange terminal

260:記憶體 260:Memory

261:位址設定模組 261:Address setting module

Claims (7)

一種通訊系統之定址方法,該通訊系統包括複數個從屬裝置,該複數個從屬裝置彼此串接,每一該從屬裝置包括一位址接收端以及一位址輸出端,每一該從屬裝置執行以下步驟:使該位址接收端接收一位址序列,該位址序列包括依時序排列的複數位址資訊組;讀取該位址序列中的一位址資訊組,將該位址資訊組設定為該從屬裝置的通訊位址,其中,該位址資訊組的該時序早於該複數位址資訊組中的其他位址資訊組;以及以該位址序列產生一更新位址序列,以該複數位址資訊組中,該時序晚於該位址資訊組的該時序的該其他位址資訊組產生該更新位址序列,以該位址輸出端將該更新位址序列提供至與該從屬裝置串接的下一個電子裝置,其中,該更新位址序列中的位址資訊組的數量少於該位址序列的該複數位址資訊組的數量。 An addressing method for a communication system. The communication system includes a plurality of slave devices. The plurality of slave devices are connected in series. Each slave device includes an address receiving end and an address output end. Each slave device performs the following Step: Make the address receiving end receive an address sequence, the address sequence includes a plurality of address information groups arranged in time sequence; read an address information group in the address sequence, and set the address information group is the communication address of the slave device, wherein the timing of the address information group is earlier than other address information groups in the plural address information group; and an update address sequence is generated from the address sequence, using the address information group. In the plurality of address information groups, the other address information groups whose timing is later than the timing of the address information group generate the updated address sequence, and provide the updated address sequence to the slave through the address output terminal. The next electronic device connected in the device series, wherein the number of address information groups in the updated address sequence is less than the number of the complex address information groups of the address sequence. 如請求項1所述之通訊系統之定址方法,其中,該位址序列為一初始位址序列或由串接的前一個從屬裝置所產生的該更新位址序列。 The addressing method of the communication system as described in claim 1, wherein the address sequence is an initial address sequence or the updated address sequence generated by a previous slave device connected in series. 如請求項2所述之通訊系統之定址方法,其中,該初始位址序列的該複數位址資訊組的數量等於或大於該複數個從屬裝置的數量。 The addressing method of the communication system as described in claim 2, wherein the number of the plurality of address information groups of the initial address sequence is equal to or greater than the number of the plurality of slave devices. 如請求項1所述之通訊系統之定址方法,其中,該電子裝置為該複數個從屬裝置中的其中一者或一主控裝置。 The addressing method of the communication system as described in claim 1, wherein the electronic device is one of a plurality of slave devices or a master control device. 一種通訊系統之定址方法,該通訊系統包括一第一從屬裝置以及複數個從屬裝置,該第一從屬裝置與該複數個從屬裝置依序串接,該定址方法的步驟包括:使該第一從屬裝置由一通訊匯流排接收一設定位址資訊以及一位址序列資訊,且以該設定位址資訊做為該第一從屬裝置的通訊位址;以及使該第一從屬裝置以該位址序列資訊產生一初始位址序列,且將該初始位址序列作為一位址序列提供至與該第一從屬裝置串接的從屬裝置,其中,該複數個從屬裝置的每一個執行以下步驟:接收該位址序列,該位址序列包括依時序排列的複數位址資訊組;讀取該位址序列中的一位址資訊組,將該位址資訊組設定為該從屬裝置的通訊位址,其中,該位址資訊組的該時序早於該複數位址資訊組中的其他位址資訊組;以及以該位址序列產生一更新位址序列,以該複數位址資訊組中,該時序晚於該位址資訊組的該時序的該其他位址資訊組產生該更新位址序列,以一位址輸出端將該更新位址序列提供至與該從屬裝置串接的下一個從屬裝置,其中,該更新位址序列中的該複數位址資訊組的數量少於該位址序列中的該複數位址資訊組的數量。 An addressing method of a communication system. The communication system includes a first slave device and a plurality of slave devices. The first slave device and the plurality of slave devices are connected in series. The steps of the addressing method include: making the first slave device The device receives a setting address information and an address sequence information from a communication bus, and uses the setting address information as the communication address of the first slave device; and causes the first slave device to use the address sequence The information generates an initial address sequence, and the initial address sequence is provided as an address sequence to a slave device connected in series with the first slave device, wherein each of the plurality of slave devices performs the following steps: receiving the Address sequence, the address sequence includes a plurality of address information groups arranged in time sequence; read an address information group in the address sequence, and set the address information group to the communication address of the slave device, where , the timing of the address information group is earlier than other address information groups in the complex address information group; and an update address sequence is generated based on the address sequence, and the timing in the complex address information group is later The other address information group at the timing of the address information group generates the updated address sequence, and provides the updated address sequence to the next slave device connected in series with the slave device through an address output terminal, wherein , the number of the complex address information groups in the updated address sequence is less than the number of the complex address information groups in the address sequence. 如請求項5所述之通訊系統之定址方法,其中,以該位址序列產生一更新位址序列的步驟包括:以該位址序列中不包括該位址資訊組的其他位址資訊組產生該更新位址序列。 The addressing method of the communication system as described in claim 5, wherein the step of generating an updated address sequence using the address sequence includes: generating an updated address sequence using other address information groups that do not include the address information group in the address sequence. The updated address sequence. 一種通訊系統之從屬裝置,其包括:一記憶體,儲存一位址設定模組;一位址接收端;一位址輸出端;以及一微控制器,與該記憶體、該位址接收端以及該位址輸出端電性連接,其中,該微控制器用以執行該位址設定模組,使該從屬裝置執行以下步驟:使該位址接收端接收一位址序列,該位址序列包括依時序排列的複數位址資訊組;讀取該位址序列中一位址資訊組,將該位址資訊組設定為該從屬裝置的通訊位址,其中,該位址資訊組的該時序早於該複數位址資訊組中的其他位址資訊組;以及以該位址序列產生一更新位址序列,以該複數位址資訊組中,該時序晚於該位址資訊組的該時序的該其他位址資訊組產生該更新位址序列,以該位址輸出端將該更新位址序列提供至與該從屬裝置串接的下一個電子裝置,其中,該更新位址序列中的位址資訊組的數量少於該位址序列的該複數位址資訊組的數量。 A slave device of a communication system, which includes: a memory storing an address setting module; an address receiving end; an address output end; and a microcontroller, together with the memory and the address receiving end And the address output terminal is electrically connected, wherein the microcontroller is used to execute the address setting module, causing the slave device to perform the following steps: causing the address receiving end to receive an address sequence, the address sequence includes A plurality of address information groups arranged in time sequence; read an address information group in the address sequence, and set the address information group to the communication address of the slave device, where the time sequence of the address information group is earlier than other address information groups in the complex address information group; and generate an updated address sequence from the address sequence, with the timing in the complex address information group later than the timing in the address information group. The other address information group generates the updated address sequence, and uses the address output terminal to provide the updated address sequence to the next electronic device connected in series with the slave device, wherein the address in the updated address sequence The number of information groups is less than the number of plural address information groups for this address sequence.
TW111148094A 2022-12-14 2022-12-14 Slave device and addressing method for communication system TWI829474B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW111148094A TWI829474B (en) 2022-12-14 2022-12-14 Slave device and addressing method for communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW111148094A TWI829474B (en) 2022-12-14 2022-12-14 Slave device and addressing method for communication system

Publications (2)

Publication Number Publication Date
TWI829474B true TWI829474B (en) 2024-01-11
TW202424766A TW202424766A (en) 2024-06-16

Family

ID=90459093

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111148094A TWI829474B (en) 2022-12-14 2022-12-14 Slave device and addressing method for communication system

Country Status (1)

Country Link
TW (1) TWI829474B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103812962A (en) * 2014-02-12 2014-05-21 南京欧帝科技股份有限公司 Automatic device communication address allocation system based on serial interface and working method
US10289592B1 (en) * 2017-11-09 2019-05-14 Funai Electric Co., Ltd. Location-based address adapter and system
TWI732347B (en) * 2018-12-03 2021-07-01 美商惠普發展公司有限責任合夥企業 Logic circuitry
TWI757491B (en) * 2017-06-08 2022-03-11 日商索尼半導體解決方案公司 Communication device, communication method, program, and communication system
TW202215827A (en) * 2020-07-29 2022-04-16 香港商雅達電子國際有限公司 Systems, devices and methods for automatically addressing serially connected slave devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103812962A (en) * 2014-02-12 2014-05-21 南京欧帝科技股份有限公司 Automatic device communication address allocation system based on serial interface and working method
TWI757491B (en) * 2017-06-08 2022-03-11 日商索尼半導體解決方案公司 Communication device, communication method, program, and communication system
US10289592B1 (en) * 2017-11-09 2019-05-14 Funai Electric Co., Ltd. Location-based address adapter and system
TWI732347B (en) * 2018-12-03 2021-07-01 美商惠普發展公司有限責任合夥企業 Logic circuitry
TW202215827A (en) * 2020-07-29 2022-04-16 香港商雅達電子國際有限公司 Systems, devices and methods for automatically addressing serially connected slave devices

Also Published As

Publication number Publication date
TW202424766A (en) 2024-06-16

Similar Documents

Publication Publication Date Title
EP3086236B1 (en) Bus communications with multi-device messaging
CN105302484B (en) Batch reads the device and method of digital diagnostic information in Ethernet card optical module
US5031091A (en) Channel control system having device control block and corresponding device control word with channel command part and I/O command part
CN111540318B (en) LED control system, apparatus, method and storage medium
US20070088874A1 (en) Offload engine as processor peripheral
CN109359073B (en) Inter-device communication method and device based on SPI bus
CN105159860A (en) Inter-integrated circuit (IIC) extended system and method
CN101089838A (en) Method for implementing 12C read-write sequence
CN112003954B (en) Data communication method, data communication system, and computer-readable storage medium
CN116450552B (en) Asynchronous batch register reading and writing method and system based on I2C bus
CN111124972A (en) Chip extension method, system and storage medium based on same I2C address
CN113722261A (en) Method for expanding chip selection number and enhancing flexibility of read-write response time by SPI
TWI829474B (en) Slave device and addressing method for communication system
JP2006525724A (en) Clock time synchronization method
US20160232124A1 (en) Methods and apparatus for rapid switching of hardware configurations with a speed limited bus
CN113326220B (en) Method and equipment for acquiring information of peripheral electronic tag
CN112506108B (en) PLC system and method for realizing LVDS communication based on FPGA
TWI842273B (en) Slave device and addressing method for i2c communication system
TWI832612B (en) Target slave device and address change method for i2c communication system
CN107957969B (en) Method for judging device connection state and device type
TWI712289B (en) Identification number numbering method and multipoint communication system
CN114880270B (en) SPI device and data transmission method thereof
JP7547079B2 (en) Master-slave communication system and control method thereof
KR100295683B1 (en) General call acknowledge apparatus and method for inter-integrated circuit
CN111581140B (en) Data transmission and processing method and slave device