TWI829474B - Slave device and addressing method for communication system - Google Patents
Slave device and addressing method for communication system Download PDFInfo
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 106
- 238000000034 method Methods 0.000 title claims abstract description 26
- 238000010586 diagram Methods 0.000 description 10
- 230000005540 biological transmission Effects 0.000 description 9
- 239000008186 active pharmaceutical agent Substances 0.000 description 8
- 239000000284 extract Substances 0.000 description 5
- 230000002093 peripheral effect Effects 0.000 description 5
- 238000010276 construction Methods 0.000 description 4
- 230000004044 response Effects 0.000 description 2
- 108010076504 Protein Sorting Signals Proteins 0.000 description 1
- 230000006870 function Effects 0.000 description 1
Images
Landscapes
- Multi Processors (AREA)
- Computer And Data Communications (AREA)
- Communication Control (AREA)
- Small-Scale Networks (AREA)
Abstract
Description
本申請係有關於一種通訊系統,尤指一種通訊系統的從屬裝置及其定址方法。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
在此實施例中,位址控制電路110用以提供一初始位址序列,作為從屬裝置200a讀取的位址序列。從屬裝置200a讀取位址序列的其中一位址資訊組,並使讀取的位址資訊組做為從屬裝置200a的通訊位址,從屬裝置200a並以位址序列產生更新位址序列,且將更新位址序列提供至串接的從屬裝置200b。從屬裝置200b至從屬裝置200n的作動與從屬裝置200a相同,因此於此不再贅述。In this embodiment, the
藉此,本申請之通訊系統可使從屬裝置由包括位址資訊組的位址序列讀取相應的位址資訊,將相應的位址資訊作為通訊位址,並將位址序列傳遞至下一從屬裝置,達到精準且快速的完成從屬裝置的定址的目的。再者,以位址控制電路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
在此實施例中,複數個從屬裝置200例如為晶片、溫度感測器、燈條等周邊裝置,且本申請不以此為限制。In this embodiment, the plurality of
在一實施例中,位址控制電路110可由上述之主控裝置實現,主控裝置例如為微處理器等可產生控制指令之電路或裝置,且本申請不以此為限制。In one embodiment, the
請參考圖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
請同時參考圖1及圖2,位址接收端220與前一個電子裝置電性連接,用以接收來自前一個電子裝置的位址序列。位址輸出端230則與下一個電子裝置電性連接,用以將產生的更新位址序列傳送至下一個電子裝置。即從屬裝置200透過其位址接收端220以及位址輸出端230與其他電子裝置串接。Please refer to FIG. 1 and FIG. 2 at the same time. The
在一實施例中,位址接收端220接收的位址序列為位址控制電路110提供的初始位址序列,或者為由前一個從屬裝置200所產生的更新位址序列。舉例來說,從屬裝置200a所接收的位址序列為位址控制電路110提供的初始位址序列,從屬裝置200b所接收的位址序列為從屬裝置200a提供的更新位址序列。In one embodiment, the address sequence received by the
在一實施例中,上述的電子裝置為串接的從屬裝置200或位址控制電路110。舉例來說,與從屬裝置200a串接的前一個電子裝置為位址控制電路110,與從屬裝置200a串接的下一個電子裝置為從屬裝置200b,與從屬裝置200b串接的前一個電子裝置為從屬裝置200a,與從屬裝置200b串接的下一個電子裝置為從屬裝置(未繪示)。In one embodiment, the above-mentioned electronic device is a serially connected
請參考圖2,時脈訊號接收端240為訊號交換介面,用以與通訊匯流排的時脈訊號線SCL電性連接,以接收時脈訊號線SCL上的時脈訊號。資料交換端250為訊號交換介面,用以與通訊匯流排的資料傳輸線SDA電性連接,以接收資料傳輸線SDA上的控制指令。Please refer to FIG. 2. The clock
請參考圖2,記憶體260用以儲存從屬裝置200運作時所需之韌體或軟體。進一步的,記憶體260並儲存有相應於本申請之定址方法的位址設定模組261。因此,從屬裝置200可透過執行位址設定模組261來實現本申請之定址方法。Referring to FIG. 2 , the
在此實施例中,位址設定模組261可以韌體或軟體來實現,且本申請不以此為限制。In this embodiment, the
在一實施例中,記憶體260可為微控制器210之內建記憶體,且本申請不以此為限制。In one embodiment, the
在一實施例中,記憶體260可為快閃記憶體(Flash memory),且本申請不以此為限制。In one embodiment, the
請參考圖2,微控制器210至少用以讀取並執行記憶體260儲存的位址設定模組261,以使從屬裝置200執行於位址設定模式。於位址設定模式,微控制器210使位址接收端220接收位址序列,並讀取位址序列的其中一位址資訊組,且使讀取的位址資訊組做為從屬裝置的通訊位址,並以接收的位址序列產生更新位址序列,以位址輸出端230將更新位址序列提供至串接的下一個電子裝置,且更新位址序列中的位址資訊組的數量少於接收的位址序列的位址資訊組的數量。進一步地,微控制器210執行位址設定模式,以位址序列中不包括讀取的位址資訊組的其他位址資訊組產生更新位址序列。進一步地,微控制器210執行位址設定模式,以位址序列中時序晚於讀取的位址資訊組的其他位址資訊組產生更新位址序列。Referring to FIG. 2 , the
藉此,本申請之從屬裝置200可透過位址接收端220以及位址輸出端230與通訊系統上的電子裝置串接,並以位址接收端220以及位址輸出端230直接接收並輸出位址序列,且以接收的位址序列快速地完成通訊位址的取得及設定,因此可達到快速完成從屬裝置的定址的目的。此外,從屬裝置200輸出的位址序列不包括其通訊位址,串接的下一個從屬裝置200不會由接收的位址序列讀取到上一個電子裝置使用的通訊位址,有效避免從屬裝置200提取錯誤的位址資訊而發生位址衝突的情況發生,因此本申請更可達到精準完成從屬裝置的定址的目的。Thereby, the
以下將配合圖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
在一實施例中,每一位址資訊組包括七位元的位址資訊,且本申請不以此為限制。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
在本實施例中,從屬裝置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
接著請參考圖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
進一步的,請參考圖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
在步驟S131,上電初始狀態。在此步驟中,從屬裝置200a為上電之後的初始狀態,並等待進行位址設定操作。In step S131, power on initial state. In this step, the
在步驟S133,接收位址序列。在此步驟中,從屬裝置200a接收來自於位址控制電路110的初始位址序列,並進行位址設定操作。In step S133, an address sequence is received. In this step, the
步驟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
步驟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
藉此,本申請之定址方法使從屬裝置200與通訊系統上的電子裝置串接以傳遞位址序列,並使從屬裝置200以位址序列快速得到相應的位址資訊,達到快速完成從屬裝置200的定址的目的。此外,從屬裝置200輸出的位址序列不包括自身的通訊位址,串接的下一個從屬裝置200不會由接收的位址序列讀取到上一個從屬裝置200使用的通訊位址,可有效避免從屬裝置200提取錯誤的位址資訊而發生位址衝突的情況發生,更可達到精準完成從屬裝置200的定址的目的。In this way, the addressing method of the present application enables the
關於本申請通訊系統的另一實施例,請參考圖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
進一步地,第一從屬裝置300以及複數個從屬裝置200彼此串接,如圖6所示,第一從屬裝置300、從屬裝置200a、從屬裝置200b至從屬裝置200n依序串接,形成一位址序列傳輸路徑。進一步地,第一從屬裝置300用以接收一第一控制訊號CS1,以回應於第一控制訊號CS1進行相應的位址設定操作,複數個從屬裝置200用以接收一第二控制訊號CS2,以回應於第二控制訊號CS2進行相應的位址設定操作。在一實施例中,當第一從屬裝置300以及複數個從屬裝置200上電時,第一控制訊號CS1被提供至第一從屬裝置300,第二控制訊號CS2被提供至複數個從屬裝置200,且第一控制訊號CS1為具低電壓準位的電壓值,第二控制訊號CS2為具高電壓準位的電壓值,且本申請不以此為限制。Further, the
第一從屬裝置300回應於第一控制訊號CS1,由通訊匯流排接收來自主控裝置100的設定位址資訊以及位址序列資訊,且以設定位址資訊做為第一從屬裝置300於通訊匯流排上的通訊位址,並以位址序列資訊產生上述之初始位址序列(如圖3的位址序列DS),且將初始位址序列提供至與第一從屬裝置300串接的從屬裝置200(例如圖6所示之從屬裝置200a)。The
複數個從屬裝置200回應於第二控制訊號CS2,進行上述圖4或圖5之位址設定操作,因此於此不再贅述。The plurality of
在此實施例中,第一從屬裝置300以及複數個從屬裝置200可由圖2之實施例來實現。進一步地,第一從屬裝置300的位址接收端(如圖2所示的位址接收端220)用以接收第一控制訊號CS1,複數個從屬裝置200的位址接收端(如圖2所示的位址接收端220)用以接收第二控制訊號CS2。需注意的是,在此實施例中,最後一個從屬裝置200將不執行產生更新位址序列的操作,亦不透過其位址輸出端230與其他電子裝置電性連接,如從屬裝置200n所示。In this embodiment, the
藉此,本申請之通訊系統2可使接收第一控制訊號CS1的第一從屬裝置300產生位址序列,使得其他從屬裝置200由位址序列準確且快速地讀取相應的位址資訊以設定其通訊位址,並將位址序列傳遞至下一從屬裝置200,即本申請之通訊系統僅藉由從屬裝置200即可實現,並可達到精準且快速的完成從屬裝置的定址的目的。再者,以主控裝置100提供位址序列資訊來實現上述之定址操作,從屬裝置200在通訊匯流排上的通訊位址將可靈活地藉由位址序列而改變,即從屬裝置200的通訊位址無須被限制在固定位址,而可以根據系統配置需求而變更,更增加通訊系統建置的便利性。Thereby, the
進一步地,請參考圖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
在步驟S220,執行位址設定操作。在此步驟中,主控裝置100以通訊匯流排提供起始指令,使第一從屬裝置300以及複數個從屬裝置200基於起始指令執行於位址設定模式,且主控裝置100基於第一控制訊號CS1,產生並提供設定位址資訊以及位址序列資訊至接收第一控制訊號CS1的第一從屬裝置300。換言之,主控裝置100是將設定位址資訊以及位址序列資訊提供給接收第一控制訊號CS1的從屬裝置。在此實施例中,起始指令為連續的複數個讀取指令。在一實施例中,複數個讀取指令可以為預先指定的複數個讀取指令,且本申請不以此為限制。In step S220, an address setting operation is performed. In this step, the
在步驟S230,產生初始位址序列。在此步驟中,使第一從屬裝置300回應於接收的設定位址資訊,基於設定位址資訊設定其通訊位址。舉例來說,將設定位址資訊中的位址資訊設定為其通訊位址。在此步驟中,第一從屬裝置300並回應於位址序列資訊,產生初始位址序列,且將初始位址序列提供至串接的從屬裝置200a。In step S230, an initial address sequence is generated. In this step, the
在步驟S240,複數個從屬裝置依序接收並傳遞位址序列。在此步驟中,複數個從屬裝置200執行如圖5所述之操作,因此於此不再贅述。In step S240, a plurality of slave devices sequentially receive and transmit the address sequence. In this step, a plurality of
在步驟S250,結束位址設定操作。在此步驟中,於複數個從屬裝置200完成通訊位址的設定後,結束位址設定操作。在一實施例中,複數個從屬裝置200以接收的位址序列完成通訊位址的設定,且接收到結束設定訊號後,結束位址設定操作。在一實施例中,結束設定訊號由第一從屬裝置300提供,結束設定訊號例如為包括複數個位元的序列,且複數個位元中的每一個的值為0。於此,結束本申請之通訊系統的定址方法。In step S250, the address setting operation ends. In this step, after the plurality of
在此實施例中,本申請之通訊系統2的定址方法使接收第一控制訊號CS1的第一從屬裝置300產生位址序列,且其他從屬裝置200由位址序列讀取相應的位址資訊組以設定其通訊位址,並將位址序列傳遞至下一從屬裝置200,即本申請之通訊系統僅藉由從屬裝置即可實現,並可以專用的位址傳輸路徑達到精準且快速的完成從屬裝置的定址的目的。再者,以主控裝置100提供位址序列資訊來實現上述之定址操作,從屬裝置200在通訊匯流排上的通訊位址將可靈活地藉由位址序列而改變,即從屬裝置200的通訊位址無須被限制在固定位址,而可以根據系統配置需求而變更,更增加通訊系統建置的便利性。In this embodiment, the addressing method of the
綜上所述,由於本申請之從屬裝置包括定址專用的位址接收端以及位址輸出端,使從屬裝置可以直接接收與位址資訊相關聯的位址序列,以快速進行通訊位址的設定。此外,複數個從屬裝置可透過位址接收端以及位址輸出端彼此串接,接收來自串接的從屬裝置的位址序列,並在完成定址後將位址序列提供至下一個串接的從屬裝置,使複數個從屬裝置可精準地由位址序列中提取相應的位址資訊組以設定其通訊位址。因此,本申請可達到精準且快速的完成從屬裝置的定址的目的。再者,以位址序列來實現上述之定址操作,從屬裝置在通訊匯流排上的通訊位址將可靈活地藉由位址序列而改變,即從屬裝置的通訊位址無須被限制在固定位址,而可以根據系統配置需求而變更,更增加通訊系統建置的便利性。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
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)
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)
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 |
-
2022
- 2022-12-14 TW TW111148094A patent/TWI829474B/en active
Patent Citations (5)
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 | |
TWI829474B (en) | Slave device and addressing method for communication system | |
CN117033279A (en) | Time sequence input and output control method | |
CN113961496A (en) | Communication circuit system, method, chip and storage medium | |
US20160232124A1 (en) | Methods and apparatus for rapid switching of hardware configurations with a speed limited bus | |
CN112506108B (en) | PLC system and method for realizing LVDS communication based on FPGA | |
CN106713521B (en) | method for searching I2C equipment address based on broadcasting mode | |
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 | |
CN117708032B (en) | Multichannel synchronous parallel I2C communication method, system and electronic equipment | |
CN113326220B (en) | Method and equipment for acquiring information of peripheral electronic tag | |
JP7547079B2 (en) | Master-slave communication system and control method thereof | |
CN111581140B (en) | Data transmission and processing method and slave device | |
US20210006429A1 (en) | Identification number numbering method and multipoint communication system |