1296081 九、發明說明: 【發明所屬之技術領域】 本發明是有關於一種訊號檢測方法及其檢測系統,特 別疋指一種用以判讀I2C(lnter-Integrated Circuit)訊號的一 受測資料是否錯誤的I2C訊號之檢測方法及其檢測系統。 【先前技術】 關於電子裝置中的各電子元件(1C)彼此傳遞訊號的溝通 Φ 方式’相較於傳統平行(parallel)匯流排架構需設置多個接線 以及解碼電路,I2C協定是採取並列匯流排架構,其原理是 於各電子元件内建共同的I2C介面以及分配給各電子元件特 定的位址(address),因此各電子元件只需二接線即可相互溝 通,具有易於規劃、除錯等優點。 參閱圖1’假設一電子裝置8具有一主(Master)元件81 及一從屬(Slave)元件82,主元件81與從屬元件82之間的 溝通採用I2C協定,則需要分別使用二接線傳遞一 訊號 • 801及一時脈訊號802,欲對I2C訊號801進行檢測時,其 , 解讀方式便是搭配I2C訊號801及時脈訊號802二者,依據 一預定的對照表來判讀其意義。 參閱圖2,I2C協定所定義的資料型態包括開始(start)、 位址(address)、讀 / 寫(read/write)、確認(acknowledge)、次 位址(sub address)、確認(acknowledge)、資料(data)、確認 (acknowledge)及停止(stop)之内容。 參閱圖1、圖2,假設主元件81是一微處理器,從屬 元件82是一記憶體,且主元件81(微處理器)欲將一段資料 5 1296081 寫入從屬元件82(記憶體)中,則fc訊號8〇1的溝通方式說 明如下: 首先,主元件81發送『開始』訊號,以取得fc匯流 排的控制權;接著,傳送欲溝通之從屬元件82之『位址』 訊號,以及設定為寫入狀態的『讀/寫』之訊號給該從屬元 件82 ;從屬元件82收到前述資料後即發出『確認』之内容 向主元件81表示已收到。1296081 IX. Description of the Invention: [Technical Field] The present invention relates to a signal detecting method and a detecting system thereof, and particularly to a method for determining whether a measured data of an I2C (Inte-Integrated Circuit) signal is erroneous. I2C signal detection method and its detection system. [Prior Art] Regarding the communication of the electronic components (1C) in the electronic device to each other, the Φ mode is required to set a plurality of wiring and decoding circuits compared to the conventional parallel bus bar architecture, and the I2C protocol adopts a parallel bus bar. Architecture, the principle is to build a common I2C interface in each electronic component and assign a specific address to each electronic component. Therefore, each electronic component can communicate with each other with only two wires, which is easy to plan and debug. . Referring to FIG. 1 'Assume that an electronic device 8 has a master component 81 and a slave component 82. The communication between the master component 81 and the slave component 82 adopts an I2C protocol, and a two-wire connection is required to transmit a signal. • 801 and one clock signal 802. When the I2C signal 801 is to be detected, the interpretation method is to match the I2C signal 801 and the time pulse signal 802, and the meaning is interpreted according to a predetermined comparison table. Referring to Figure 2, the data types defined by the I2C protocol include start, address, read/write, acknowledge, sub address, acknowledge. , data (data), acknowledgement (acknowledge) and stop (stop) content. Referring to FIG. 1 and FIG. 2, it is assumed that the main component 81 is a microprocessor, the slave component 82 is a memory, and the main component 81 (microprocessor) is to write a piece of data 5 1296081 into the slave component 82 (memory). The communication mode of the fc signal 8〇1 is as follows: First, the main component 81 sends a “start” signal to obtain control of the fc bus; then, transmits the “address” signal of the slave component 82 to be communicated, and The "read/write" signal set to the write state is given to the slave component 82; the slave component 82 receives the above-mentioned information and issues the "confirmation" to the master component 81 indicating that it has been received.
當主7G件81得知從屬元件82已收到後,即發送表示 自何處寫入從屬元件82的『次位址』之訊號給從屬元件82 ,從屬元件82收到前述資料後即發出『確認』之内容向主 元件81表示已收到,接著主元件81便可發送實際欲寫入 的『貝料』内容寫入從屬元# 82之『次位址』;從屬元件 82收到前述資料後即發出『確認』之内容向主㈣81表示 已寫入,於是主元件81即發送『停止』之内容,以結束整When the master 7G device 81 knows that the slave component 82 has received, it sends a signal indicating where the secondary address of the slave component 82 is written to the slave component 82, and the slave component 82 issues the above information. The content of the confirmation is indicated to the main component 81, and then the main component 81 can send the "before" content actually written to the "subaddress" of the slave element #82; the slave component 82 receives the above information. The content of "confirm" is sent to the main (four) 81 to indicate that it has been written, and the main component 81 transmits the content of "stop" to end the whole.
^方去疋以一不波器9連接該電子裝置8,由示波器9接 並顯示出電子裝置8的以訊號8〇1及時脈訊號哪的波 定:對昭^貝即疋猎由查看不波器9的波形圖,依據預 81^來解讀電子裝置8的各元件(不限於單-主元件 則r力早;?屬元# 82)的溝通是否有錯誤的情況,若有錯誤 解::::彔以方便後續的除錯動作’然而,&訊號8〇1 圖,對:^Γ,故以目測的方式解讀示波器9上的波形 汗品時的檢測工作相當不便且浪費時間。 6 1296081 【發明内容】 因此,本發明之目的,即在提供一種可易於判讀Pc訊 號具有的一受測資料是否錯誤的〗2C訊號之檢測方法及其檢 測系統。 於是,本發明l2C訊號之檢測方法,用以判讀訊號 具有的一受測資料是否錯誤,該方法包含下述步驟:(A)擷 取電子4置之1C訊號,(B)依據一預定格式剖析該i2c 訊號’以擷取該受測資料;(c)將該受測資料數位化,並依 據預先建立的一轉換對照表將該受測資料轉換成一易讀型 態資料;及(D)將該易讀型態資料顯示出來。 本發明的I2C訊號之檢測系統用以對一 pc訊號的一受 測貝料進行運算分析,該檢測系統包含一類比/數位轉換器 、一儲存裝置、一控制單元及一顯示單元。 該類比/數位轉換器用以接收該Pc訊號進行類比/數位 轉換;該儲存裝置具有預先建立的一轉換對照表,用以將 該受測資料的不同變化對應轉換出不同之數值;該控制單 元耦接該類比/數位轉換器及該儲存裝置,用以擷取經類比/ 數位轉換後之該l2C訊號,並依據一預定格式剖析該I2C訊 號之受測資料,且依據該儲存裝置的該轉換對照表轉換該 又測資料;該顯示單元耦接該控制單元,用以顯示該受測 資料轉換後之結果。 由於本發明的概念是將I2C訊號之受測資料取出,並轉 換為較易解讀的資料,可有效提昇開發產品的檢測效率且 可縮短檢測時間。 7 1296081 【實施方式】 有關本發明之前述及其他技術内容、特點與功效,在 以下配合參考圖式之較佳實施例的詳細說明中,將可清沐 的呈現。 ,楚 參閱圖3,本實施例對一電子裝置2進行其η。气^ 201之檢測方法,是在一檢測系統丨上執行_程式軟體 未不),該檢測系統1於本實施例是一電腦系統,包含一抑 制單元11、一類比/數位轉換器12、一儲存裝置13及一: 示單元14。 其中,隨著該電子裝置2所接收的一觸發訊號3〇1(例 如:調整音量)之不同,該電子裝置2輸出含有一受測資料γ 音量資料)的一 I2C訊號201亦隨之變化;控制單元u用以 執行運算及協調各元件動作;類比/數位轉換器12用以自, 電子裝置2獲取i2c訊號201並對其作類比/數位轉換,抑 制單元11即針對轉換後的數位化之T2C訊號2〇 1作運算。 儲存裝置13具有預先建立的該受測資料的一轉換對照 表’以及可供檢測系統1載入及執行的該程式軟體,該轉 換對照表係將一受測資料的不同變化對應轉換出不同之數 值,由控制單元11進行運算分析。 參閱圖3及圖4,該程式軟體可配合該檢測系統丨内其 他特定軟硬體自動執行下述的流程: 首先’擷取電子裝置2之I2C訊號(步驟401),亦即, 由控制單元11接收數位化後的I2C訊號202 ;接著,依據 ~預定格式剖析出該I2C訊號202之受測資料(步驟4〇2)。 8 .1296081 μ預&格式可參考前述圖2的說明 &協 的資料剞能 a &戮^方疋疋 connects the electronic device 8 with a non-wave device 9, connected by the oscilloscope 9 and displays the wave of the signal 8〇1 and the pulse signal of the electronic device 8: The waveform diagram of the wave device 9 interprets whether the communication of each component of the electronic device 8 (not limited to the single-master component, r force early; ? gen #82) is incorrect according to the pre-81^, if there is an error solution: :::彔 to facilitate subsequent debugging operations' However, & signal 8〇1 figure, pair: ^Γ, so the visual inspection of the waveform on the oscilloscope 9 when the detection work is quite inconvenient and time consuming. 6 1296081 SUMMARY OF THE INVENTION Accordingly, it is an object of the present invention to provide a detection method and a detection system for a 2C signal which can easily interpret whether a test data possessed by a Pc signal is erroneous. Therefore, the detection method of the l2C signal of the present invention is used to determine whether a test data has a wrong test data, and the method comprises the following steps: (A) extracting the 1C signal of the electronic 4, and (B) analyzing according to a predetermined format. The i2c signal 'to extract the measured data; (c) digitizing the measured data, and converting the measured data into a legible type data according to a pre-established conversion table; and (D) The easy-to-read type data is displayed. The detection system of the I2C signal of the present invention is used for performing operational analysis on a measured beaker of a pc signal, the detection system comprising an analog/digital converter, a storage device, a control unit and a display unit. The analog/digital converter is configured to receive the Pc signal for analog/digital conversion; the storage device has a pre-established conversion table for converting different changes of the measured data to different values; the control unit is coupled The analog/digital converter and the storage device are configured to capture the analog/digital converted l2C signal, and parse the measured data of the I2C signal according to a predetermined format, and according to the conversion table of the storage device The display unit is coupled to the control unit for displaying the result of the conversion of the measured data. Since the concept of the present invention is to take out the measured data of the I2C signal and convert it into an easily interpretable data, the detection efficiency of the developed product can be effectively improved and the detection time can be shortened. 7 1296081 [Embodiment] The foregoing and other technical contents, features, and advantages of the present invention will be apparent from the following detailed description of the preferred embodiments. Referring to FIG. 3, this embodiment performs an η on an electronic device 2. The detection method of the gas 201 is to execute a software system on a detection system. The detection system 1 is a computer system in the embodiment, and includes a suppression unit 11, an analog/digital converter 12, and a The storage device 13 and the display unit 14 are provided. The I2C signal 201 that the electronic device 2 outputs a measured data γ volume data is also changed according to a trigger signal 3〇1 (eg, adjusting the volume) received by the electronic device 2; The control unit u is configured to perform operations and coordinate the operation of each component; the analog/digital converter 12 is configured to acquire the i2c signal 201 from the electronic device 2 and perform analog/digital conversion thereof, and the suppression unit 11 is for the converted digitalization. The T2C signal is 2〇1 for operation. The storage device 13 has a conversion comparison table of the measured data that is pre-established and the program software that can be loaded and executed by the detection system 1. The conversion comparison table converts different changes of a measured data into different ones. The numerical value is calculated and analyzed by the control unit 11. Referring to FIG. 3 and FIG. 4, the program software can automatically perform the following process in conjunction with other specific software and hardware in the detection system: First, 'take the I2C signal of the electronic device 2 (step 401), that is, by the control unit 11 receives the digitized I2C signal 202; and then parses the measured data of the I2C signal 202 according to the predetermined format (step 4〇2). 8.1296081 μ Pre & format can refer to the description of Figure 2 above and the data of the Association can be a &
•h 心,包括『開始』、『位址』、『讀/寫』、『確認』、P 』確涊』、『資料』、『確認』及『停止』等格式, 而該受測資料可 θ 丨卞』以疋別述任一種格式之内容。 以本實施例而言,該電子裝置2是一音響裝置,而本 =例所剖析出的該受測資料可以是表示目前正在作用的•h heart, including “Start”, “Address”, “Read/Write”, “Confirm”, “P”, “Data”, “Confirm” and “Stop” formats, and the test data can be θ 丨卞 』 is to distinguish the content of any format. In this embodiment, the electronic device 2 is an audio device, and the measured data analyzed by the present example may indicate that the current data is currently in effect.
『貝+料』(¾測資料)之内容,以檢測音量調整是否準確為例 貝料』之内容係一音量位階,由於該觸發訊號3〇1係 控该電子裝I q . 衣置2之音夏大小所產生,藉此使得該『資料』 之内谷(曰篁位階)隨著觸發訊號之不同亦有不同的變化。 kOolume step)是否準確,是預先建立有對應不同音量位階 與文測資料内容的一轉換對照表(步驟403),控制單元u可 依據預先建立的該轉換對照表轉換該受測資料(資料内容)為 易讀的形式(音量位階),並將轉換後之結果在顯示單元Η 參閱圖5之轉換對照表,欲檢測該音響裝置的音量位 顯不出來(步驟404);此外,更可進一步將該受測資料與一 預定的標準值作比對,並將比對後之結果顯示出來,達到 自動化檢測的效果。 參閱圖3,例如檢測人員檢測時可調整音量大小而產生 不同的觸發訊號3〇1,因此隨著該電子裝置2所接收的觸發 訊號301之不同,;[2C訊號201的受測資料亦有不同的變化 ,假設調整音量位階至18,則控制單元11便將類比/數位 轉換後的I2c訊號202,先依據預定格式配合時脈訊號剖析 出該受測資料,即資料内容(如:1 〇 111 000);接著,控制單 9 1296081 疋11再依據儲存裝置13中預先建立的該轉換對照表轉換該 文測凝料(10111000)為實際數值(音量位階18),並將其轉換 為一影像訊號203給顯示單元14,由該顯示單元14顯示出 實際檢測的結果(音量位階丨8)的畫面供檢測人員確認其值是 否正確,或由檢測系統丨自行辨識,若符合標準值則通過 裰測,若有差異則為未通過檢測,就可以將發生錯誤的該 電子裝置2加以除錯。 • 歸納上述,本發明I2c訊號之檢測方法及其檢測系統是 將I2c訊號之受測資料取出,並轉換為較易解讀的資料袼式 顯示出來,因此可有效提昇開發產品的檢測效率且可縮短 檢測時間。 惟以上所述者’僅為本發明之較佳實施例而已,當不 忐以此限定本發明實施之範圍,即大凡依本發明申請專利 範圍及發明說明内容所作之簡單的等效變化與修飾,皆仍 屬本發明專利涵盖之範圍内。 • 【圖式簡單說明】 - 圖1是一系統方塊圖,說明目前對電子裝置進行i2c訊 號的檢測方式; 圖2是一示意圖,說明Pc協定所定義的資料型態; 圖3是一系統方塊圖,說明本實施例對電子裝置進行 I2C訊號進行檢測的檢測系統; 圖4是一流程圖’說明本實施例對電子裝置進行pc訊 號檢測的各步驟;及 圖5是一轉換對照表,說明對應不同音量位階與受測 10 1296081 資料内容的轉換對照表。 1296081 【主要元件符號說明】 1…… .....檢測系統 201、202 I2C 訊號 11 ····. .....控制單元 203 .......影像訊號 12.•… ••…類比/數位轉換器 301 .......觸發訊號 13••… …··儲存裝置 401〜404步驟 14 •…顯示單元 2…… •…電子裝置 12The content of "Bei+Material" (3⁄4 test data), to detect whether the volume adjustment is accurate or not, is the content of the volume. The trigger signal 3〇1 controls the electronic device I q . The sound summer size is generated, so that the valley (曰篁 level) of the "data" also has different changes depending on the trigger signal. Whether the kOolume step is accurate or not is a conversion comparison table corresponding to the contents of the different volume levels and the text data (step 403), and the control unit u can convert the measured data according to the pre-established conversion table (data content). In an easy-to-read format (volume level), and the converted result is in the display unit 参阅 referring to the conversion comparison table of FIG. 5, the volume level of the audio device is not detected (step 404); in addition, further The measured data is compared with a predetermined standard value, and the result after the comparison is displayed to achieve the effect of automatic detection. Referring to FIG. 3, for example, the detector can adjust the volume to generate different trigger signals 3〇1, so that the trigger signal 301 received by the electronic device 2 is different; [the measured data of the 2C signal 201 also has Different changes, assuming that the volume level is adjusted to 18, the control unit 11 analyzes the analog/digital converted I2c signal 202 by first matching the clock signal according to the predetermined format, that is, the data content (eg, 1 〇). 111 000); Next, the control sheet 9 1296081 疋 11 converts the condensate (10111000) into an actual value (volume level 18) according to the conversion table pre-established in the storage device 13, and converts it into an image. The signal 203 is given to the display unit 14, and the display unit 14 displays a screen of the actual detection result (volume level 丨8) for the inspector to confirm whether the value is correct, or is recognized by the detection system, and if the standard value is met, If the difference is detected, the electronic device 2 in which the error has occurred can be debugged. • In summary, the detection method and detection system of the I2c signal of the present invention extracts the measured data of the I2c signal and converts it into an easy-to-interpret data display, thereby effectively improving the detection efficiency of the developed product and shortening Detection time. However, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, i.e., simple equivalent changes and modifications made in accordance with the scope of the present invention and the description of the invention. All remain within the scope of the invention patent. • [Simple description of the diagram] - Figure 1 is a system block diagram showing the current detection method of the i2c signal for the electronic device; Figure 2 is a schematic diagram showing the data type defined by the Pc protocol; Figure 3 is a system block FIG. 4 is a flowchart showing the steps of performing PC signal detection on the electronic device in the embodiment; FIG. 5 is a conversion comparison table, and FIG. Correspond to the conversion table of the different volume levels and the measured 10 1296081 data content. 1296081 [Description of main component symbols] 1...... ..... Detection system 201, 202 I2C Signal 11 ····..... Control unit 203 .......Image signal 12.•... • Analog/Digital Converter 301....... Trigger Signal 13••... Storage Device 401~404 Step 14 • Display Unit 2... • Electronic Device 12