[go: nahoru, domu]

TW583571B - Noise protection method and system of serial peripheral interface - Google Patents

Noise protection method and system of serial peripheral interface Download PDF

Info

Publication number
TW583571B
TW583571B TW91113552A TW91113552A TW583571B TW 583571 B TW583571 B TW 583571B TW 91113552 A TW91113552 A TW 91113552A TW 91113552 A TW91113552 A TW 91113552A TW 583571 B TW583571 B TW 583571B
Authority
TW
Taiwan
Prior art keywords
clock signal
sck
output
serial clock
serial
Prior art date
Application number
TW91113552A
Other languages
Chinese (zh)
Inventor
Yuan-Ping Lee
Original Assignee
Etoms Electronics Corp
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 Etoms Electronics Corp filed Critical Etoms Electronics Corp
Priority to TW91113552A priority Critical patent/TW583571B/en
Application granted granted Critical
Publication of TW583571B publication Critical patent/TW583571B/en

Links

Landscapes

  • Dc Digital Transmission (AREA)

Abstract

The invention relates to a noise protection method and system of serial peripheral interface (SPI). The method of the invention comprises the following procedures: repeatedly sample and proceed error correction, in which the repeated sampling employs a sampling clock with m folds of serial clock (SCK) signal frequency to proceed sampling and acquire a new SCK, where m is an integer greater than 3; proceed error correction procedure that encodes new SCK again based on an output code mapping table to issue a corrected SCK. The encoding of the output code mapping table uses an odd number that is greater than or equal to 3 as the encoding basis, and takes the one with more comparison bit number of data as the corrected SCK output. Based on the method of the invention, the invention further provides an SPI noise protection system by employing a sampling unit and a signal correction unit, so as to output an SCK signal capable of generating only an edge trigger SCK signal during one SCK cycle in accordance with the output code mapping table.

Description

583571 _案號91113552 年/月(日 铬,下____ 五、發明說明(1) 【發明之應用領域】 本發明係關於一種抗雜訊方法,特別是關於一種串 列週邊介面之抗雜訊方法及其系統。 【發明背景】 串列週邊介面(Serial Peripheral Interface ,以 下簡稱SP I )運用了三種連線同步協定:串列時脈訊號 (Serial Clock ,以下簡稱SCK ),串列資料輸出(Se°r丄a丄 Data Out ,以下簡稱SD0),以及串列資料輸入(Serial D a t a I η,以下簡稱S D I )。S P I的運作係利用s C K的邊緣觸 發來做SDI上的資料讀取與SD0上資料的送出,請參考' 「第1圖」。 > 由於SPI是透過每次SCK的邊緣觸發來作資料的傳送 與讀取’因此’當雜訊透過S C Κ 進入或s C Κ的訊號不明就 會造成資料讀取或送出的錯誤。換句話說,由於I次的” SCK的邊緣觸發,SPI即讀取與送出SDI與SD0資料_次· 且由於SPI的串列性質,SCK的雜訊將會導致同一筆^料 讀取多次,形成資料插入的錯誤,而產生整個串列!料 錯誤的嚴重問題。在實作上,此種透過SCK所造成的、資料 錯誤,並不容易更正。 、、 請參考「附件1」當可清楚了解此種錯誤的發生可 能,其為s c κ上訊號邊緣為上升或下降階段的各^1卞 圖。從圖中可以發現,許多在訊號的最大值(1)之^ =之 後有數個突波(雜訊),這些突波都有可能被系統 是訊號1而產生邊緣觸發的情形,進而造成資料、 形。所以,SDI與SD0的資料存取,即可能因為SCK =雜^583571 _ Case No. 91113552 / month (Japanese chromium, the next ____ V. Description of the invention (1) [Application field of the invention] The present invention relates to an anti-noise method, especially an anti-noise method for a serial peripheral interface Method and its system. [Background of the Invention] Serial Peripheral Interface (hereinafter referred to as SP I) uses three kinds of connection synchronization protocols: Serial Clock (Serial Clock, referred to as SCK), serial data output ( Se ° r 丄 a 丄 Data Out (hereinafter referred to as SD0), and serial data input (Serial Data I η, referred to as SDI hereinafter). The operation of SPI uses the edge trigger of CK to read data on SDI and For the transmission of data on SD0, please refer to "" Figure 1. "> Because SPI transmits and reads data through the edge trigger of each SCK ', therefore, when noise enters through SC KK or s C KK Unknown signal will cause errors in reading or sending data. In other words, because of the edge trigger of "SCK", SPI reads and sends SDI and SD0 data _ times. Due to the serial nature of SPI, SCK's Noise will cause Reading a single piece of material multiple times results in a data insertion error, which results in a serious problem of the entire series! Material errors. In practice, this kind of data error caused by SCK is not easy to correct. Refer to "Annex 1" for a clear understanding of the possible occurrence of such errors, which are the ^ 1 卞 diagrams of the signal edges on sc κ in the rising or falling stages. From the figure, it can be found that many of the maximum values of the signal (1) ^ = After there are several surges (noise), these surges may be edge-triggered by the system being signal 1, and then cause data, shape. Therefore, the data access of SDI and SD0 may be because of SCK = Miscellaneous ^

第5頁 583571 _案號91113552 |\年1月I’S 修正_ 五、發明說明(2) 而造成資料讀錯與送出錯誤的情形。此種錯誤亟待改 善。 【發明之目的與概述】 鑒於以上的問題,本發明提供一種串列週邊介面之 抗雜訊方法及其系統,可消除SP I於讀取與傳送資料時因 SCK所產生的雜訊。 為達上述目的,本發明所提供之S P I之抗雜訊方法, 包含下列步驟··第一、重新取樣;第二、進行改錯。其 中,重新取樣係以一 m倍於S C K之頻率之取樣時脈訊號 (clock)對SCK進行取樣以獲得一新SCK。進行改錯步驟係 依據一輸出碼對照表對新SCK進行重新編碼,以送出一更 正SCK。其中,於一個SCK週期内,此更正SCK僅有一個邊 緣觸發訊號。 其中,m係為3以上之數。而輸出碼對照表係以一比 對位元數為編碼基礎,亦即,一大於或等於3之奇數η, 更正S C Κ之輸出係經比對新S C Κ與輸出碼對照表,並依據 資料中佔比對位元數較多者作為更正SCK之輸出。 此外,本發明更提供一種S Ρ I之抗雜訊系統,包含: 一取樣單元與一訊號改錯單元。其中,取樣單元用以接 收S C Κ並以一 m倍於S C Κ之頻率之取樣時脈訊號(c 1 〇 c k )對 SCK進行取樣以獲得一新SCK。而訊號改錯單元則與取樣 單元相連接,用以依據一輸出碼對照表對新SCK進行改 錯,以送出一更正SCK。 其中,訊號改錯單元包含有:改錯暫存器,用以儲 存該新串列時脈訊號之串列資料;記憶體,用以儲存該Page 5 583571 _Case No. 91113552 | \ January I ’S Amendment_ V. Description of the invention (2) The situation where the data is read incorrectly and sent incorrectly. Such errors need to be improved. [Objective and Summary of the Invention] In view of the above problems, the present invention provides an anti-noise method and a system for serial peripheral interfaces, which can eliminate the noise generated by SCK when SP I reads and transmits data. In order to achieve the above object, the anti-noise method of SP provided by the present invention includes the following steps: first, resampling; second, error correction. Among them, the resampling is to sample the SCK with a sampling clock signal of a frequency which is m times the frequency of S C K to obtain a new SCK. The error correction step is to re-encode the new SCK according to an output code comparison table to send a correction SCK. Among them, within one SCK cycle, this correction SCK has only one edge trigger signal. Here, m is a number of 3 or more. The output code comparison table is based on a comparison bit number, that is, an odd number η greater than or equal to 3. The output of the corrected SC κ is compared with the new SC κ and output code comparison table, and according to the data The larger the number of bits in the middle ratio is used as the output of the correction SCK. In addition, the present invention further provides an anti-noise system of SPI, including: a sampling unit and a signal error correction unit. Among them, the sampling unit is used to receive S C K and sample the SCK with a sampling clock signal (c 10 c k) that is a frequency that is m times the frequency of S C K to obtain a new SCK. The signal correction unit is connected to the sampling unit to correct the new SCK according to an output code comparison table to send a corrected SCK. The signal correction unit includes: an error correction register for storing serial data of the new serial clock signal; and a memory for storing the serial data of the new serial clock signal.

583571 修正 曰 差1^1113552 M fJ: 五、發明說明(3) " I--- 輸出碼對照表· β μ &口口 輸出碼對照表之二S出y較該改錯暫存器與該 為蟢士欢值 乂輸出该更正串列時脈訊號。 明顯易;董,;』:G:5他::、特徵、和優點能更 式,作詳細說明2:父佳實施例,並配合所附圖 【發明之詳細說明】 i ^,明參考「第2圖」,其為本發明之s P I抗雜H 方法流程圖,句冬下別半腿.去抗雜訊 改錯(步驟2 2 0 )。 新取樣(步驟21 〇),進行 摄時2 HG中’本發明首先以—個m倍於sck頻率的取 樣日^脈sfl#u(Cl〇ck)對SCK進行取樣’如此,即可獲 的SCK。其中,斜接 』 又、 邊竣τ隊雨接對SCK取樣方式可以邊緣上升取樣,或 邊緣下降取樣均可。由於sp丨的資料讀取與送出,係於一 個SCK時脈期間的SCK邊緣觸發的方式來進行。因此,、在 正破的S C K時脈期間内,只要進行一次原來的g c γ邊緣觸 發’即可進行正碟的S Ρ I資料讀取與送出。即便s c κ邊緣 觸發延遲或提前,均不會對SDI或讣〇的資料取出盘送出 造成影響。 Λ 而對SCK取樣的取樣時脈訊號(Clock),要求其與SCK 同步較不實際,因而在取樣時,取樣時脈(Clock)的邊緣 觸發時間勢必會與SCK的邊緣觸發時間有所差距。因此, m在理論上可以為大於或等於3之任何數,而非為2。所 以’只要m大於或等於3 ’即可進行本發明的S C K雜訊消除 工作。 接著,在步驟2 2 0中,本發明即依據一輸出螞對照表583571 Corrected the difference 1 ^ 1113552 M fJ: V. Description of the invention (3) " I --- output code comparison table · β μ & mouth output code comparison table 2 S y is more than the error correction register With this value, the correction serial clock signal is output. Obviously easy; Dong ,; ": G: 5 he ::, characteristics, and advantages can be changed, detailed description 2: the embodiment of the father, with the accompanying drawings [detailed description of the invention] i ^, refer to" "Figure 2", which is a flowchart of the s PI anti-noise H method of the present invention, to correct the noise and correct errors (step 2 2 0). New sampling (step 21 〇), in the 2 HG when shooting, "the invention first samples the SCK with a sampling date m times the sck frequency ^ pulse sfl # u (ClOck)" so that you can get SCK. Among them, the oblique joint and the edge joint τ team rain joint to the SCK sampling method can be edge upsampling or edge downsampling. Because the data of sp 丨 is read and sent, it is performed in the manner of SCK edge trigger during a SCK clock. Therefore, during the S C K clock period that is broken, only the original g c γ edge trigger 'can be performed to read and send the SP I data of the positive disc. Even if the s c κ edge trigger is delayed or advanced, it will not affect the SDI or 讣 〇 data take-out disk delivery. Λ The sampling clock signal (Clock) for SCK sampling requires that it is not practical to synchronize with SCK. Therefore, when sampling, the edge trigger time of sampling clock (Clock) is bound to be different from the edge trigger time of SCK. Therefore, m can theoretically be any number greater than or equal to 3, instead of 2. Therefore, 'as long as m is equal to or greater than 3', the S C K noise canceling work of the present invention can be performed. Next, in step 220, the present invention is based on an output comparison table.

第7頁 583571 _塞^91113552 车f月日 條正___ 五、發明說明(4) ' ^ (Error Code Correction Table)對新的SCK 進行重新編 碼,以送出經過更正的S C K。此輸出碼對照表依據簡單的 錯誤更正法則來編寫即可。例如,輸出碼對照表可以每3 個或母5個位元…之奇數為編碼單位’換句話說,大於或 等於3的奇數(n),將經過取樣的新SCK,為更正SCK的比 對基準。也就是,輸出碼對照表係以一比對位元數為編 碼基礎,更正S C K之輸出係經比對新S C K與輸出碼對照 表,並依據資料中佔比對位元數較多者作為更正s c K之輸 出。若有雜訊發生而造成的錯誤訊號時,所輸出的s c K, 仍只會在S C K時脈期間發生一次邊緣觸發。 經過更正的SCK為連續的輸出,不會有單獨的「突 波」發生’亦即,已經將可能發生錯誤的雜訊加以排 除。因而,SPI的資料讀取與送出將不會因寄生於SCK上 的雜訊而出錯。 因此,上述的輸出碼對照表主要紀錄了可能的錯誤 碼,以及所需送出的更正碼,亦即,更正的s c K輸出。如 「附件1」所示的訊號邊緣情形,其可能的雜訊產生情形 有許多種’不過,經過取樣之後,可能的雜訊便會消 失。 上述方法的具體做法,請參考下面所述。 請參考「第4圖」,其為本發明之SPI抗雜訊系統方 塊圖,其包含了兩個主要的部分:取樣單元(SamplingPage 7 583571 _ plug ^ 91113552 car f month day Article ___ V. Description of the invention (4) '^ (Error Code Correction Table) Re-encode the new SCK to send the corrected S C K. This output code comparison table can be written based on simple error correction rules. For example, the output code comparison table can be every 3 or 5 bits ... the odd number is the coding unit '. In other words, the odd number (n) greater than or equal to 3 will be the sampled new SCK for the comparison of the corrected SCK. Benchmark. That is, the output code comparison table is based on a comparison of the number of bits. The output of the corrected SCK is compared with the new SCK and the output code comparison table, and the correction is based on the larger number of bits in the data. The output of sc K. If there is an error signal caused by noise, the output of s c K will still only occur once during the S C K clock. The corrected SCK is a continuous output, and there will be no separate “surge”, that is, noise that may have caused errors has been eliminated. Therefore, the reading and sending of SPI data will not cause errors due to noise parasitic on SCK. Therefore, the above-mentioned output code comparison table mainly records possible error codes and the correction codes to be sent, that is, the corrected s k K output. There are many possible noise generation situations as shown in “Annex 1” for signal edges. However, after sampling, the possible noise will disappear. For the specific method of the above method, please refer to the following. Please refer to "Figure 4", which is a block diagram of the SPI anti-noise system of the present invention, which contains two main parts: the sampling unit (Sampling

Unit)l〇 與訊號改錯單元(Error Correction Unit)20。 取樣單元ίο與sck之輸出端相連接,用來接收SCk並 以上述的ra倍於SCK—IN頻率之取樣時脈訊號(cl〇ck)對Unit) l0 and Signal Correction Unit (Error Correction Unit) 20. The sampling unit ίο is connected to the output terminal of sck, and is used to receive SCk and pair the sampling clock signal (clOck) with the above ra times SCK-IN frequency.

第8頁 583571 修正 __91 η 3552 t 年丨月(fa 五、發明說明(5) SCK_ I N訊號進行取樣以獲得一取樣串列時脈訊號SCK s。 而訊號改錯單元2 0則與取樣單元1 0相連接,其中至少包 含了一個改錯暫存器、一記憶體、一比較器。改錯暫存 器用以儲存SCK — S的串列資料。而記憶體則用以儲存了一 個輸出碼對照表(Output code Comparison Table),輸Page 8 583571 Correction __91 η 3552 t month (fa V. Description of the invention (5) SCK_ IN signal is sampled to obtain a sampling serial clock signal SCK s. The signal correction unit 20 and the sampling unit Connected at 10, which contains at least an error correction register, a memory, and a comparator. The error correction register is used to store the serial data of SCK-S. The memory is used to store an output code Comparison table (Output code Comparison Table), input

出碼對照表的比對位元數為3、5、7…等奇數位元。其I :來Ϊ 2 ί 3的位元數依據輸出碼對照表的比對位元 =以對新串列時脈訊號SCK-S進行改錯,以 w仏山里迗出—更正串列時脈訊號SCK。比較芎則依攄 比對輸出碼對照表金抑奴士 , L %罕乂為則依像 請參考「第〃改錯暫存器當中的資料來輸出SCK。 取樣之SCK —S訊銳:‘ ’ f為本發明之SCK-ΙΝ訊號經重新 (Clock)。在取樣時八取樣率為SCK-IN八倍的時脈訊號 常會與SCK一 IN的’觸&、息取樣時脈(Clock)的觸發邊緣,通 取樣的SCK一S的波开/邊緣有Δτ的時間間隔。因此,經過 間。 ^即如「第4圖」所示,其會延遲△ τ時 接著,以輪出 本發明的實際運作:對照表為3位元之改錯暫存器來說明 接著,請參考「笛 出碼對照表之實,、蓄弟Α、5Β圖」,其為本發明之SCK輸 同時參考「第3圖$運作例,其以m = 6的取樣結果為例。請 號改錯單元20時,」★ \當8(:1(-8所傳送的串列資料進入訊 表做訊號改錯,也=號改錯單元2 0即依據此輸出碼對照 值,如「第5A、5b就是’依據改錯暫存器的值輸出SCK的 形,而「第5B圖 圖十,「第圖」為正常的取樣情 」則為有雜訊的取樣情形。此種依照輸The number of comparison bits in the code comparison table is 3, 5, 7, etc. Its I: the number of bits of Ϊ 2 ί 3 according to the comparison bit of the output code comparison table = to correct the new serial clock signal SCK-S, and to output from w 仏 shanli-correct the serial clock Signal SCK. The comparison is based on the comparison of the output code comparison table, Golden Slaves, and the L% is based on the image. Please refer to "The data in the first error correction register to output the SCK. SCK for sampling-SXun Rui: ' 'f is the clock of the SCK-1N signal of the present invention. When sampling, the clock signal with an eight-times sampling rate eight times that of SCK-IN is often associated with the clock and clock of SCK-IN. For the triggering edge, the wave opening / edge of the SCK-S through sampling has a time interval of Δτ. Therefore, there is a time interval. ^ As shown in "Figure 4", it will be delayed by Δτ and then the invention is rotated out. Actual operation: The comparison table is a 3-bit error correction register to explain. Then, please refer to "The actual table of the flute code comparison table, save brother A, 5B", which also refers to the SCK input of the present invention. Figure 3 $ Example of operation, which takes the sampling result of m = 6 as an example. When the number is changed to unit 20, "★ \ when 8 (: 1 (-8, the serial data sent into the signal table is used to correct the signal. , Also = No. error correction unit 2 0 is based on this output code comparison value, such as "the 5A, 5b is' output SCK shape according to the value of the error correction register, and" Figure 5B X. "first map" situation normal sampling "There was the noise of sampling situations. In accordance with this input

583571583571

照表來進打改鍺的原則如下,以 較多位元者,•出該資料。例如,:2 2中的 『101』時,SCK輸出為i ;改錯文σ錯暫存器的 ,則輸出資料SCK為0 ,依此類=。子為的貧料為 是’整個訊號改錯單元2 0的動作可上 圖」中,預設的改錯暫存器值為『 I 位元串列為『 1 0 0 0 1 1 1』。當計時單位^ q而輸Λ 出碼對 資料佔 資料為 『010 J 於 「第5A 的資料 時,輸 資料為 著,輸 出SCK 就會成 落後一 觸發。 入一個位元資料為『1』’因此,改錯暫存哭』上的 『1 1 1』,而訊號改錯單元20輸出SCK『i』二接 入另一個位元為『0』,此時,訊號改錯^元2 〇輔 『1』。依此類推’整個成號改錯單元2 〇的S C K輸it 為『1100011』’而sck一s的輸出為『100Q111』 個取樣頻率的時脈’重要的是,只有一個SCK ^綠 「第5A圖」的情形並無法看出本發明的功效。請參 考「第5B圖」,輸入的資料位元串列同樣為 『1 0 0 0 1 1 1』。當計時單位為1時,輸入一個位元資料為 1 ,改錯暫存器上的資料為『1 1 1』,訊號改錯單元2 〇輸 出SCK『1』。接著,輸入另一個位元為『〇』,此時,訊 號改錯單元20輸出SCK『1』。接下來,發生一個雜訊讀 取的訊號而使得輸入為『〇』,此時,改錯暫存器的資料 為『101』,此時,訊號改錯單元20的SCK輸出為『1』。 而接著的輸入雖為正確的『0』,卻會形成改錯暫存器的 資料為『010』,此時,即將SCK輸出為『0』。最後,整 個訊號改錯單元20的SCK輸出就會成為『1110011』,而The principle of changing and modifying germanium according to the table is as follows. For those who have more bits, the information is provided. For example, when "101" in 2 2 is used, the output of SCK is i; if the error is corrected in the register of error σ, the output data SCK is 0, and so on =. The poor material of the sub-element is "the operation of the entire signal correction unit 2 0 is shown in the above picture", and the default error correction register value is "I bit string is" 1 0 0 0 1 1 1 ". When the timing unit is ^ q and the input Λ output code occupies the data as "010 J in the" 5A data, the input data is, the output SCK will be triggered behind. Enter a bit data as "1" ' Therefore, "1 1 1" on the error correction temporary cry ", and the signal correction unit 20 outputs SCK" i "and accesses another bit as" 0 ". At this time, the signal is corrected ^ yuan 2 〇 auxiliary "1". By analogy, 'the SCK input of the entire numbered error correction unit 2 〇 is "1100011"' and the output of sck-s is "100Q111" clocks of sampling frequency. It is important that there is only one SCK ^ In the case of the green "Figure 5A", the effect of the present invention cannot be seen. Please refer to "Figure 5B". The input data bit string is also "1 0 0 0 1 1 1". When the timing unit is 1, input a bit data as 1, change the data on the error register to "1 1 1", and the signal correction unit 2 outputs SCK "1". Then, input another bit as "0". At this time, the signal correction unit 20 outputs SCK "1". Next, a noisy read signal occurs so that the input is "〇". At this time, the data in the error register is changed to "101". At this time, the SCK output of the signal error correction unit 20 is "1". Although the following input is correct "0", the data of the error correction register will be "010". At this time, the SCK output will be "0". Finally, the SCK output of the entire signal correction unit 20 will become "1110011", and

第10頁 583571 _案號91113552_年/月/’曰 修正_ 五、發明說明(7) 8(:1(_8的輸出為『1000111』。雖然產生邊緣觸發延遲的 現象(也有可能是提前),不過,重要的是,只有一個SCK 邊緣觸發在正確的S C K時脈週期間產生。 所以,不論是任何一種雜訊的產生情形,SCK的輸出 最終都會在一個S C K週期當中,只有一個邊緣觸發的情形 發生,而不會有習知技術的資料插入的情形。並且,其 他的各種情形都可以用「第5B圖」的方式來解析,包括 改錯暫存器為5、7…等位元的情形都相同,在此不加贅 述。 請參考「第6圖」,其為本發明之SCK_I N訊號經重新 取樣並經改錯後的更正SCK。可發現,正常的情形下,經 過更正的SCK,會延遲T時間,其中,T為ΔΤ與一個取樣 頻率時間的和。若有因雜訊而造成的錯誤,則波形會有 所不同,不過,都只會在一個S C K時脈期間中僅有一個邊 緣觸發。 【發明之功效】 運用本發明之S P I之抗雜訊方法及系統,抗雜訊能力 明顯增加,且外部電路的阻抗匹配的影響降低。 雖然本發明之較佳實施例揭露如上所述,然其並非 用以限定本發明,任何熟習相關技藝者,在不脫離本發 明之精神和範圍内,當可作些許之更動與潤飾,因此本 發明之專利保護範圍須視本說明書所附之申請專利範圍 所界定者為準。Page 10 583571 _Case No. 91113552_year / month / 'Revision_ V. Description of the invention (7) 8 (: 1 (_8's output is "1000111". Although the phenomenon of edge trigger delay may occur (it may also be early) However, it is important that only one SCK edge trigger is generated during the correct SCK clock cycle. Therefore, no matter what kind of noise is generated, the output of SCK will eventually be in one SCK cycle, and only one edge is triggered. The situation occurs without the insertion of the data of the conventional technology. In addition, all other situations can be analyzed in the way of "Figure 5B", including changing the error register to 5, 7 ... The situation is the same, so I wo n’t go into details here. Please refer to "Figure 6", which is the SCK_IN signal of the present invention, which is resampled and corrected to correct the SCK. It can be found that under normal circumstances, the corrected SCK , Will delay T time, where T is the sum of ΔΤ and a sampling frequency time. If there is an error due to noise, the waveform will be different, but it will only be in one SCK clock period. One [Edge effect] [Effect of the invention] Using the anti-noise method and system of the SPI of the present invention, the anti-noise capability is significantly increased, and the influence of the impedance matching of the external circuit is reduced. Although the preferred embodiment of the present invention is disclosed as described above However, it is not intended to limit the present invention. Any person skilled in the relevant arts can make some changes and retouching without departing from the spirit and scope of the present invention. Therefore, the scope of patent protection of the present invention shall be determined by The ones defined in the scope of patent application shall prevail.

583571 ' _案號91113552 年,月,义日 修正_ 圖式簡單說明 第1圖為S P I資料讀取與傳送之示意圖; 第2圖為本發明之S P I抗雜訊方法流程圖; 第3圖為本發明之S P I抗雜訊系統方塊圖; 第4圖為本發明之SCK_IN訊號經重新取樣之SCK_S訊 號; 第5 A圖為本發明之S C K輸出碼對照表之實際運作例; 第5 B圖為本發明之S C K輸出碼對照表之實際運作例; 第6圖為本發明之S C K _ I N訊號經重新取樣並經改錯後 的更正SCK ;及 附件1為S C K之訊號圖。 【圖示符號說明】 10 取 樣 單 元 20 訊 號 改 錯 單 元 B7〜 B0 位 元7〜 0 SCK 串 列 時 脈 訊 號 (S e r i a 1 Clock) SCK _IN 串 列 時 脈 訊 號 輸 入 SCK _S 經 取 樣 之 串 列 時 脈訊 號 SDI 串 列 資 料 wm 入 (S e r i a 1 Data In) SDO 串 列 資 料 Ψμ 出 (S e r i a 1 Data Out) △ T 時 脈 差 T m 出 時 脈 差583571 '_Case No. 91113552, Month, Correction Day_ Brief description of the diagram The first diagram is a schematic diagram of reading and transmitting SPI data; the second diagram is a flowchart of the SPI anti-noise method of the present invention; the third diagram is Block diagram of the SPI anti-noise system of the present invention; Figure 4 is the SCK_S signal of the SCK_IN signal of the present invention after resampling; Figure 5 A is an actual operation example of the SCK output code comparison table of the present invention; Figure 5 B is An actual operation example of the SCK output code comparison table of the present invention; FIG. 6 is a corrected SCK of the SCK_IN signal of the present invention after resampling and correction; and Annex 1 is a signal diagram of SCK. [Symbol description] 10 Sampling unit 20 Signal correction unit B7 ~ B0 Bit 7 ~ 0 SCK serial clock signal (Seria 1 Clock) SCK _IN serial clock signal input SCK _S Pulse signal SDI serial data wm In (S eria 1 Data In) SDO serial data Ψ μ Out (S eria 1 Data Out) △ T Clock difference T m Clock difference

第12頁 583571 Λ_案號91113552_^^年(月<日 修正 六、指定代表圖 第3頁Page 12 583571 Λ_Case No. 91113552 _ ^^ year (month < day amends VI. Designated representative map Page 3

Claims (1)

583571 '_案號91113552 p年f月(X日 修正_ 六、申請專利範圍 1 . 一種串列週邊介面之抗雜訊方法,係於該串列週邊介 面之串列時脈訊號(S C K )上做改錯之動作,包含下列步 驟: 重新取樣··以一 m倍於該串列時脈訊號之頻率之取 樣時脈訊號(c 1 〇 c k )對該串列時脈訊號進行取樣以獲得 一新串列時脈訊號;及 進行改錯··比對一輸出碼對照表與該新串列時脈 訊號,以輸出一更正串列時脈訊號;其中,於一個該 串列時脈訊號之週期内,該更正串列時脈訊號僅有一 個邊緣觸發訊號。 2 ·如申請專利範圍第1項所述之串列週邊介面之抗雜訊方 法,其中m係為3以上之數。 3. 如申請專利範圍第1項所述之串列週邊介面之抗雜訊方 法,其中該輸出碼對照表係以一比對位元數為編碼基 礎,該更正串列時脈訊號之輸出係比對該新串列時脈 訊號與該輸出碼對照表,並依據該新串列時脈訊號之 資料佔該比對位元數較多者作為該更正串列時脈訊號 之輸出,其中該比對位元數係為大於或等於3之奇數。 4. 一種串列週邊介面之抗雜訊系統,係應用於該串列週 邊介面之串列時脈訊號(S C K )之輸出端以做改錯之動 作,包含: 一取樣單元,與該串列時脈訊號之輸出端相連 接,用以接收該串列時脈訊號並以一 m倍於該串列時脈 訊號之頻率之取樣時脈訊號(c 1 oc k )對該串列時脈訊號583571 '_ Case No. 91113552 pf (X-day amendments_ VI) Patent application scope 1. An anti-noise method of serial peripheral interface is based on the serial clock signal (SCK) of the serial peripheral interface The action of correcting mistakes includes the following steps: Resampling ... Sampling the serial clock signal with a sampling clock signal (c 1 ck) that is m times the frequency of the serial clock signal to obtain a The new serial clock signal; and make corrections; compare an output code comparison table with the new serial clock signal to output a corrected serial clock signal; of which, in one of the serial clock signals, During the period, the correction serial clock signal has only one edge-triggered signal. 2 · The anti-noise method of the serial peripheral interface as described in item 1 of the patent application scope, where m is a number of 3 or more. 3. The anti-noise method of the serial peripheral interface as described in the first item of the scope of patent application, wherein the output code comparison table is based on a comparison bit number, and the output of the corrected serial clock signal is compared. A comparison table between the new serial clock signal and the output code. And based on the data of the new serial clock signal that occupies a larger number of the comparison bits, it is used as the output of the corrected serial clock signal, wherein the number of comparison bits is an odd number greater than or equal to 3. An anti-noise system for a serial peripheral interface is applied to an output terminal of a serial clock signal (SCK) of the serial peripheral interface for correcting errors, and includes: a sampling unit and the serial clock The output ends of the signals are connected to receive the serial clock signal and sample the clock signal (c 1 oc k) of the serial clock signal at a frequency that is m times the frequency of the serial clock signal. 第13頁 583571 _案號91113552 年f月日 修正_ 六、申請專利範圍 進行取樣以獲得一新串列時脈訊號;及 一訊號改錯單元,與該取樣單元相連接,用以依 據一輸出碼對照表對該新串列時脈訊號進行改錯,以 重新編碼並送出一更正串列時脈訊號。 5 ·如申請專利範圍第4項所述之串列週邊介面之抗雜訊系 統,其中該訊號改錯單元包含: 一改錯暫存器,用以儲存該新串列時脈訊號之串 列資料; 一記憶體,用以儲存該輸出碼對照表;及 一比較器,用以比較該改錯暫存器與該輸出碼對 照表之值,以輸出該更正串列時脈訊號。 6 .如申請專利範圍第4項所述之串列週邊介面之抗雜訊系 統,其中m係為3以上之數。 7. 如申請專利範圍第4項所述之串列週邊介面之抗雜訊系 統,其中該輸出碼對照表係以一比對位元數為編碼基 礎,該更正串列時脈訊號之輸出係比對該新串列時脈 訊號與該輸出碼對照表,並依據輸入該改錯暫存器中 之該新串列時脈訊號之串列資料所佔該比對位元數較 多者作為該更正串列時脈訊號之輸出。 8. 如申請專利範圍第4或5項所述之串列週邊介面之抗雜 訊系統,其中該輸出碼對照表與該改錯暫存器之比對 位元數係為大於或等於3之奇數。Page 13 583571 _Case No. 91135552 amended on F / F_ 6. Sample the patent application scope to obtain a new serial clock signal; and a signal correction unit connected to the sampling unit for output based on an output The code comparison table corrects the new serial clock signal to re-encode and send a corrected serial clock signal. 5. The anti-noise system of the serial peripheral interface as described in item 4 of the scope of patent application, wherein the signal correction unit includes: an error correction register for storing the serial of the new serial clock signal Data; a memory for storing the output code comparison table; and a comparator for comparing the value of the error correction register with the output code comparison table to output the correction serial clock signal. 6. The anti-noise system of serial peripheral interface as described in item 4 of the scope of patent application, where m is a number of 3 or more. 7. The anti-noise system of the serial peripheral interface according to item 4 of the scope of the patent application, wherein the output code comparison table is based on a comparison bit number, and the output system of the corrected serial clock signal is The comparison table between the new serial clock signal and the output code is compared, and according to the serial data of the new serial clock signal input in the error correction register, the comparison bit number that accounts for a larger number of bits is regarded as The output of the correction serial clock signal. 8. The anti-noise system with a serial peripheral interface as described in item 4 or 5 of the scope of patent application, wherein the number of comparison bits between the output code comparison table and the error correction register is greater than or equal to 3. odd number. 第14頁Page 14
TW91113552A 2002-06-18 2002-06-18 Noise protection method and system of serial peripheral interface TW583571B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW91113552A TW583571B (en) 2002-06-18 2002-06-18 Noise protection method and system of serial peripheral interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW91113552A TW583571B (en) 2002-06-18 2002-06-18 Noise protection method and system of serial peripheral interface

Publications (1)

Publication Number Publication Date
TW583571B true TW583571B (en) 2004-04-11

Family

ID=34057747

Family Applications (1)

Application Number Title Priority Date Filing Date
TW91113552A TW583571B (en) 2002-06-18 2002-06-18 Noise protection method and system of serial peripheral interface

Country Status (1)

Country Link
TW (1) TW583571B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7426598B2 (en) 2004-06-30 2008-09-16 Intel Corporation Method for configuring transmitter power consumption
CN102722462A (en) * 2012-05-05 2012-10-10 美的集团有限公司 Synchronous communication device and control method thereof
EP2685388A1 (en) * 2012-07-11 2014-01-15 Infineon Technologies AG SPI interface and method for serial communication via an SPI interface
CN103838686A (en) * 2012-11-22 2014-06-04 笙泉科技股份有限公司 Data transmission control method and device of serial peripheral interface main equipment

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7426598B2 (en) 2004-06-30 2008-09-16 Intel Corporation Method for configuring transmitter power consumption
CN102722462A (en) * 2012-05-05 2012-10-10 美的集团有限公司 Synchronous communication device and control method thereof
EP2685388A1 (en) * 2012-07-11 2014-01-15 Infineon Technologies AG SPI interface and method for serial communication via an SPI interface
US9418037B2 (en) 2012-07-11 2016-08-16 Infineon Technologies Ag SPI interface and method for serial communication via an SPI interface having an SPI protocol handler for evaluating signal transitions of SPI signals
CN103838686A (en) * 2012-11-22 2014-06-04 笙泉科技股份有限公司 Data transmission control method and device of serial peripheral interface main equipment

Similar Documents

Publication Publication Date Title
TW583571B (en) Noise protection method and system of serial peripheral interface
JPH0936753A (en) Data-block encoding method for generating redundant information based on symbol length code, symbol length reed-solomon code-based encoding method for block-wise formated data received by encoder as a series of data word, and word type encoder
JPH08137624A (en) Data error correction method, signal processing unit and disk device
JPH0676472A (en) Controller for controlling data format for floppy disk device
US6999127B2 (en) Apparatus and method for image conversion and automatic error correction for digital television receiver
EP1388944A1 (en) Cross interleave reed-solomon code correction
JP3242148B2 (en) Error correction method
JPS60101766A (en) Address detection system
CN112073152B (en) FPGA anti-interference processing method for improving reliability of CHSI received data
TWI261222B (en) Method and circuit for detecting/correcting readout clock of the disc
JPH0344394B2 (en)
US6321351B1 (en) Method and apparatus for detecting errors in DVD data
US20020004881A1 (en) Data transfer apparatus and data transfer method
JPS58175334A (en) Code error correcting circuit
JP2644112B2 (en) FIFO test diagnostic circuit
KR0176795B1 (en) Error correction device and method of cd player
TW200525504A (en) Apparatus and method of dynamic adjusting the detection window
US5841750A (en) Information playback apparatus
SU1348827A1 (en) Device for computing polynomial values
EP1388946A1 (en) Cross interleave reed-solomon code correction
JPS61133080A (en) Digital signal processor
RU1798922C (en) Channel encoder-decoder
JP4888865B2 (en) Streaming data compensation method and digital signal receiving apparatus
EP0911982A1 (en) Reed Solomon error correction with shared memory approach
JP3339803B2 (en) Error correction code generation circuit

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees