201009582 九、發明說明: 【發明所屬之技術領域】 本發明係為一種非揮發性記憶體(NVM,Non Volatile * Memory)資料的保密方法,尤其是有關於一種在NOP資 • 料加附上保護資訊的非揮發性記憶體(NVM,Non Volatile Memory)資料的保密方法。 【先前技術】 赢 傳統之方法如圖(一)所示,其動作說明如下: 1. 2. 3. 4. 1C進入燒錄模式,對非揮發性記憶體進行寫入。 寫入完成後·可對所寫入非揮發性記憶體的資料 進行讀取與驗證。 資料驗證完成,離開燒錄模式。 5. ❿ 6. 1C重新進入燒錄模式,檢查非揮發性記憶體中特 定位址的設定(option)參數,決定是否保護讀取非 揮發性記憶體資料,並讓1C進入燒錄模式中。 根據設定參數的值(option),判斷使用者在燒錄模 式下是否能保護讀取非揮發性記憶體上的資料。 若為保護模式,則禁止資料輸出,也就是全部的 資料輸出〇或1。 若非為保護模式,則輸出非揮發性記憶體内的程 式資料。 其傳統燒錄流程如圖一所示。而在燒錄模式下,需判斷 是否允許非揮發性記憶體的資料能被讀取。在上列的4.的 過程中,設定參數(option)是寫在非揮發性記憶體的特定位 201009582 址’因在資料未燒錄之前,此時保護資料的响如初 為G,根據。—η的值,此時所進人的燒錄模式可對= 發性記憶體上的資料進行讀取;在資料燒錄進非揮發 憶體之後,若離開燒錄模式再回到燒錄模式時,因為己 • 新讀取0的丨0η的值’若所讀取到保護資料的opti〇n資二^ 1,就無法將非揮發性記憶體上的資料讀出。但由於在燒錄 模式中不能讀出資料,藉此有心人士便可得知保護資料的' option資料為1,進而對非揮發性記憶體的〇ptj〇n資料作 ❹ 嘗試性的破解,一直到讀取輸出資料,此時就可得知破解 成功。 圖二為傳統的燒錄電路架構,動作說明如下: 1.燒錄器201送出燒錄的|/〇訊號202給資料寫入讀取 控制電路203,以進入燒錄模式。 2·經由I/O燒錄訊號202,資料寫入讀取控制電路203 送出寫入資料訊號205、位址訊號204、致能控制訊 號208與寫入讀取控制訊號207給抹除式可程式化非 φ 揮發性記憶體2〇9進行寫入資料。 ’ 3.經由I/O燒錄訊號202,資料寫入讀取控制電路203 ' 送出位址訊號204、致能控制訊號208與寫入讀取控 制訊號207給抹除式可程式化非揮發性記憶體209 進行讀取資料動作。 4.進行讀取資料動作時,抹除式可程式化非揮發性記憶 體209依據位址訊號204送出讀取資料訊號206至 資料寫入讀取控制電路203,經由丨/0燒錄訊號202 輸出資料。 6 201009582 5·若為保護模式時,則資料寫入讀取控制電路2〇3合林 止輸出資料,直接輸出〇或1當成輸出資料,經由9丨1 燒錄訊號202輸出資料。 6·在微控制器212正常運作期間’微控制器212伊主輪 ' 入位址訊號211輸入到抹除式可程式化非揮發201009582 IX. Description of the Invention: [Technical Field of the Invention] The present invention relates to a method for securing non-volatile memory (NVM, Non Volatile * Memory) data, and in particular to a protection for NOP resources. Information on the non-volatile memory (NVM, Non Volatile Memory) data confidentiality method. [Prior Art] The traditional method of winning is shown in Figure (1). The actions are as follows: 1. 2. 3. 4. 1C enters the programming mode and writes to non-volatile memory. After the writing is completed, the data written to the non-volatile memory can be read and verified. The data verification is completed and the programming mode is left. 5. ❿ 6. 1C re-enter the programming mode, check the option parameter of the unique location in the non-volatile memory, determine whether to protect the non-volatile memory data, and let 1C enter the programming mode. According to the setting parameter (option), it is judged whether the user can protect the data on the non-volatile memory in the programming mode. In the protection mode, data output is disabled, that is, all data output 〇 or 1. If it is not the protection mode, the program data in the non-volatile memory is output. The traditional burning process is shown in Figure 1. In the programming mode, it is necessary to judge whether or not the data of the non-volatile memory can be read. In the process of 4. above, the setting parameter (option) is written in the specific bit of the non-volatile memory. 201009582 address 'Because the data is not burned before, the protection data is as G, according to. - The value of η, at this time, the burning mode of the entered person can read the data on the = memory; after the data is burned into the non-volatile memory, if it leaves the burning mode and then returns to the burning mode At the time, since the value of 丨0η of the new reading 0 is read, the data on the non-volatile memory cannot be read if the opti〇n 二2 of the protected data is read. However, since the data cannot be read in the programming mode, the interested person can know that the 'option data of the protected data is 1, and then try to crack the 〇ptj〇n data of the non-volatile memory. By reading the output data, you can know that the crack is successful. 2 is a conventional programming circuit structure, and the operation is as follows: 1. The programmer 201 sends the burned |/〇 signal 202 to the data write read control circuit 203 to enter the programming mode. 2. Through the I/O programming signal 202, the data write read control circuit 203 sends the write data signal 205, the address signal 204, the enable control signal 208, and the write read control signal 207 to the eraseable program. Non-φ volatile memory 2〇9 is written to the data. 3. Via the I/O programming signal 202, the data write read control circuit 203 ' sends the address signal 204, the enable control signal 208 and the write read control signal 207 to the eraseable programmable non-volatile The memory 209 performs a reading operation. 4. When the data reading operation is performed, the erasable programmable non-volatile memory 209 sends the read data signal 206 to the data write read control circuit 203 according to the address signal 204, and burns the signal 202 via the 丨/0. Output data. 6 201009582 5·When it is in the protection mode, the data is written to the read control circuit 2〇3 to stop the output data, and the output is directly output or 1 as the output data, and the data is output via the 9丨1 burn signal 202. 6. During the normal operation of the microcontroller 212, the 'microcontroller 212' main wheel' input address signal 211 is input to the erasable programmable non-volatile
憶體209内,讀取抹除式可程式化非揮發性記憶體 209内所儲存的程式資料,經由輸出程式資料訊號 210供給微控制器212運作時所需執行的程式資料二 參 而由於傳統的保遵資料模式啟動後,讀取的資料均'為Q 或1 ’使有心人士得知啟動保護資料模式,進而針對^護 資料模式進行破解’解除保護資料模式,使程式資料順利 輸出,而成功竊取程式資料。 緣此,本案之發明人係研究出一種非揮發性記憶體 (NVM ’ Non Volatile Memory)資料的保密方法,尤其是 有關於一種在N〇P資料加附上保護資訊的非揮發性記愧 體(NVM,Non Volatile Memory)資料的保密方法,其係 φ 可改善習知技術中有心人士由保護資料的option資料為 1 ’進而對非揮發性記憶體的option資料作嘗試性的破解 • 之現狀。 【發明内容】 本發明係關於一種非揮發性記憶體(NVM,Non Volat丨丨e Memory)資料的保密方法及裝置,其係利用N〇p 資料加附上保護資訊,進而達成之改善習知技術中有心人 士由保護資料的option資料為1,進而對非揮發性記憶體 201009582 . 的option資料作嘗試性的破解之目的。 較佳的,該保密電路架構至少包括: 一燒錄器,輸出一燒錄的輸入/出訊號; ' 一抹除式可程式化非揮發性記憶體,用以儲存微控制器 • 之驅動程式; 一資料寫入讀取控制電路,接收燒錄器之燒錄的輸入/ 出訊號,並對抹除式可程式化非揮發性記憶體執行燒 錄工作; φ 一微控制器,讀取抹除式可程式化非揮發性記憶體儲存 之驅動程式,用以執行電子產品之運算控制動作;以 及 一記憶體資料保密電路,設置於資料寫入讀取控制電路 與抹除式可程式化非揮發性記憶體之間,其中,若啟 動保護資料時,該抹除式可程式化非揮發性記憶體依 據位址訊號送出讀取資料訊號至該記憶體資料保密 電路,採用亂數資料方式,產生出保護資料訊號,接 φ 著輸入至該資料寫入讀取控制電路,再輸出保護的資 • 料訊號,若不啟動保護資料時,該記憶體資料保密電 • 路判斷讀取資料訊號是否含有N0P保護資料。 為使貴審查委員對於本發明之結構目的和功效有更 進一步之了解與認同,茲配合圖示範例詳細說明如後。 【實施方式】 圖三係為本發明之亂數選擇保護資料路徑流程圖。 其中,非揮發性記憶體的資料是使用者撰寫的組合語言 8 201009582 (Assembly Language)經由編譯器(c〇mpMer)所 式-貝料,而編澤器在轉換組合語言時,傳統上會在=的程 的記憶體位址填入空指令(NOP,No 〇peration)的資^用 由於NOP對於微控制器並無任何作用,若在Ν〇ρ資料加 • 附上保護資訊,亦不會影響微控制器原本的執行動作,因 我們。又计出一種保護防破解的機制,不但能相符原來的 燒錄方式,又能增加資料的保密特性。整個燒入機制的動 作流程說明如下: ❿ 1.微控制器進入燒錄模式中。 2.選擇對微控制器中的唯讀記憶體進行寫入、讀取 或離開燒錄模式。 3·若進行寫入動作,則對唯讀記憶體執行寫入的程 序。 4.寫入動作完畢後’可選擇離開燒錄模式或繼續執 行燒錄模式。 5_若進行讀取動作,則先檢驗是否為保護模式。 • 6.若要啟動保護模式需在寫入唯讀記憶體時對保護 資料option的位址設定,並在下次進入燒錄模式 . 時,啟動保護資料機制。 7.若為讀取保護模式,則採用資料保密方法讀取程 序。 8·若為不啟動讀取保護模式,則會先執行一般正常 的讀取程序。 9.讀取資料時’辨別資料程式是否含有為nop保護 資料。 201009582 1 〇.若資料程式含有Ν Ο P保護資料,則採用資料保密 方法讀取程序。 11.若不含NOP保護資料,則執行一般正常的讀取程 • 序。 • 12.寫入或讀取完畢後,均可再進入讀取或寫入模 式,直到離開燒錄模式。 當進入燒錄模式時,使用者可寫入程式資料,並讀取確 認資料的正確,而為了防止寫入程式資料被竊取,則使用 φ 者可以啟動傳統資料保護機制或使用者在程式資料加入含 有NOP保護資料,使下次進入燒錄模式時可以保護資料, 而由於有心人士根據讀取出的資料為0或1的狀況,即可 得知傳統保護資料的option資料為1,進而對非揮發性記 憶體的option資料作嘗試性的破解,因此我們改變保護時 所輸出的貢料*以亂數的方式輸出貧料5混清有心人士的 破解方式,而就算傳統保護資料被破解成功,解除傳統資 料保護機制,則執行一般讀取程式輸出資料時,會預先檢 φ 查輸出資料是否含有NOP保護資料,若使用者在程式資料 • 加入含有NOP保護資料,則輸出的資料一樣以亂數的方式 . 輸出資料,由於NOP保護資料已加入在程式資料内,並且 以程式資料的方式寫入到記憶體内,使有心人士無法再用 其他方式破解,以達到成功的保護程式資料。 其中,較佳的,該非揮發性記憶體由快閃記憶體、 EPROM、EEPR0M 中選取一種。 圖四係為本發明之資料保護機制。 由於傳統的保護資料模式啟動後,讀取的資料均為0 201009582 或彳使有^人士得知啟動保護資料模式,進而針對保護 資料模式進行破解’解除賴賴模式,使程式資料順利 輸出,而成功竊取程式資料’有鑑於此,我們為了混清有 心人士依據這樣的情況來進行破解,發明提出一新的資料 保護的機制,如圖四所示,動作說明如下: 1燒錄器401送出燒錄的丨/〇訊號402給資料寫入讀取 控制電路403,以進入燒錄模式。 2·、、二由丨/0燒錄訊號402 ’資料寫入讀取控制電路403 达出寫入資料訊號405、位址訊號404、致能控制訊 號408與寫入讀取控制訊號4〇7給抹除式可程式化非 揮發性記憶體409進行寫入資料。 3·由於燒錄模式在寫入動作下,我們不對資料 其^的位址訊號404輸入至抹除式可程式化非揮發 性s己憶體409進行寫入資料。 4當燒錄模式在進行讀取動作時,經由丨/〇燒錄訊號 4〇2 ’資料寫人讀取控制電路4〇3送出致能控制訊號 408與寫入讀取控制訊號抓給抹除式可程式化非揮 發性記憶體409進行讀取資料動作。 5·當資料寫人讀取控制電路柳進行讀取抹除式可程 $化非揮發性記憶體409内的程式資料時,為了保護 ,式貝料不被他人竊取,會送出讀取保護模式訊號 413給記憶體資料保密電路414,來啟動保護程 料的機制。 、 6 Γηί動保護資料時’抹除式可程式化非揮發性記憶體 依據位址訊號404送出讀取資料訊號406至記憶 201009582 體資料保密電路414,採用亂數資料方式,產生出保 護資料訊號415,接著輸入至資料寫入讀取控制電路 403’再經由丨/〇燒錄訊號402輸出保護的資料訊號。 7_若不啟動保護資料時,記憶體資料保密電路414將判 斷讀取資料訊號406是否含有NOP保護資料 8·若程式資料含有NOP保護資料,則採用亂數資料方 式’產生出保護資料訊號415 ’輸入至資料寫入讀取 控制電路403,再經由I/O燒錄訊號402輸出未保護 的資料訊號。 9·若無NOP保護資料,則將讀取資料訊號406直接當 成保護資料訊號415輸入至資料寫入讀取控制電路 403 ’再經由丨/〇燒錄訊號402輸出未保護的資料訊 號。 10·在微控制器412正常運作期間,微控制器412依靠 輪入位址訊號411輸入到抹除式可程式化非揮發性 記憶體409内’讀取抹除式可程式化非揮發性記憶體 409内所儲存的程式資料’經由輸出程式資料訊號 41〇供給微控制器412運作時所需執行的程式資料。 其中的記憶體資料保密電路414架構,如圖五所示。 動作說明如下: 1· 5己憶體資料保密電路414接收到讀取資料訊號406 後,先經過亂數產生電路501產生亂數資料訊號502。 2·由控制讀取保護訊號41 3控制訊號選擇電路503選擇 一般保護資料訊號504為亂數資料訊號502或原資料 路徑406。 201009582 3·若控制讀取保護訊號413為保護模式下’則訊號選擇 電路503選擇一般保護資料訊號504為亂數資料訊號 502。 4.若控制讀取保護訊號413為一般模式下,則訊號選擇 電路503選擇一般保護資料訊號504為原資料路徑 406,也就是未處理的讀取資料訊號406。 5·接著一般保護資料訊號504經過檢查ΝΟΡ保護機制 電路505,檢查輸出程式資料是否内含ΝΟΡ保護資 ❿ 料’並產生ΝΟΡ保護控制訊號506。 6·由ΝΟΡ保護控制訊號506控制序號選擇電路507選 擇ΝΟΡ保護資料訊號415為一般保護資料訊號504 或亂數資料訊號502。 7·若ΝΟΡ保護控制訊號506為檢查出程式資料内無 ΝΟΡ保護資料’則訊號選擇電路507選擇一般保護 資料訊號504為ΝΟΡ保護資料訊號415。 8·若ΝΟΡ保護控制訊號506為檢查出程式資料内含 Φ ΝΟΡ保護資料,則訊號選擇電路5〇7選擇亂數資料 訊號502為ΝΟΡ保護資料訊號415。 ' 其中訊號選擇電路可為一多工器。 讀取資料訊號40 6經過以上的記憶體資料保密電路4】4 架構後,便可達成傳統資料保護機制與ΝΟΡ指令保護資料 機制·’由於傳統資料保護機制產生的固定輸出資料(〇或 1),容易被有心人士進行破解而解除保護資料模式,使程 式資料順利輸出’而成功竊取程式資料,因此我們改變傳 統保護機制所產生的固定輸出’改採用以亂數方式輸出, 13 201009582 • 混淆有心人士依據這樣的情況來進行破解,但若傳統保護 機制被有心人士破解成功,則在執行一般讀取程式輸出資 料時,我們提出的NOP指令保護資料機制會預先檢查輸出 資料是否含有NOP保護資料,由於NOP保護資料已加入 在程式資料内’並且以程式資料的方式寫入到記憶體内, 使有心人士無法再用其他方式破解,破解方式困難度與時 間增加’使NOP指令保護資料機制的記憶體資料保密方法 成功。 β 舉例來說:寫入一組程式未保含NOP指令保護的程式 資料至抹除式可程式化非揮發性記憶體409後,内含位址 位元及程式資料位元(程式資料表如表一所示,若未啟動傳 統保護程式資料的機制,則依原始的位址訊號4〇4與讀取 資料訊號406可成功讀取正確順序的程式資料(程式資料 表如表二所示),若啟動傳統保護程式資料的機制,則由記 憶體資料保密電路414產生保護資料訊號415,並輸入至 讀寫人讀取控制電路4Q3,再經由I/O燒錄訊號402輸 _丨保護的資料職(此時的程式資料表如表三所示),輸出 資料為亂數產生電路5〇1所產生來的亂數資料。 /使用者將原本程式資料加人含Ν〇ρ指令保護的程式 ,料至抹除式可程式化非揮發性記憶體4Q9後,内含位址 =元及程式資料位元(程式資料表如表四所㈤,可以與表 比較得知原本-般NOP的資料(資料位元:_〇)將重新 改為含有保護資訊的N0P資料(資料位元:酬),若未 ,動傳統賴程式㈣的機制,_記憶體#料保密電路 4U内的檢查N0P指令保護電路5〇5檢查輸出資料是否含 201009582 保護資訊的NOP資料,若未檢查到,則會以—般保護資料 訊號504輸出(由於此時’未啟動傳統保護程式資料的機 . 制’故一般保護資料訊號504為元資料路徑4〇6,也就是 未保護的資料)’直到檢查到輸出資料含有N〇p保護資訊, 則接下來的程式資料將會都以亂數資料訊號5〇2輸出(程 式資料表如表五所示)’由表五就可得知動作原理,在位址 還未讀到資料含有NOP保護資訊時(位址:〇〇12之前), 會》賣取到原始資料,一旦讀到資料含有N〇p保護資訊時(位 ❹ 址:〇〇13) ’則將會讀取到亂數保護資料,直到結束。 若啟動傳統保護程式資料的機制,則由記憶體資料保密 電路414產生保護資料訊號415,並輸入至資料寫入讀取 控制電路403,再經由I/O燒錄訊號4〇2輸出保護的資料 訊號(此時的程式資料表如圖六所示),輸出資料為亂數產 生電路501所產生來的亂數資料,由於已若啟·動傳統保護 程式資料的機制’就算讀到資料含有N0P保護資訊時’也 將會讀取到亂數保護資料,直到結束,因此輸出保護的資 鲁 料訊號圖六與表三將會一模一樣。 由以上的範例,可以得知當我們改變傳統保護機制採用 . 以亂數方式輸出,混淆有心人士來進行破解,並且就算傳 統保護機制被有心人士破解成功,則在執行一般讀取程式 輸出資料時,會預先檢查輸出資料是否含有NOP保護資 料’由於N0P保護資料已加入在程式資料内,並且以程式 資料的方式寫入到記憶體内’使有心人士無法再用其他方 式破解,破解方式困難度與時間增加,使Nop指令保護資 料機制的記憶體資料保密方法成功。 15 201009582 唯以上所述者,僅為本發明之範例實施態樣爾,當不 能以之限定本發明所實施之範圍。即大凡依本發明申請專 利範圍所作之均等變化與修俦,皆應仍屬於本發明專利涵 蓋之範圍内,謹請貴審查委員明鑑,並祈惠准,是所至 禱0 【圈式簡單說明】 圖一係為先前技藝之燒錄模式動作示意圖; ❿ 圖二係為’先前技藝之燒錄電路架構示意圖; 圖三係為用於本發明之亂數選擇保護資料之流程示意 圖; 圖四係為用於本發明之保護資料架構之示意圖; 圖五係為用於本發明之記憶體資料保密電路之架構示 意圖;以及 圖六A/B係為用於說明本發明之記憶體資料保密之程 式資料。 【主要元件符號說明】 201 燒錄器 202 訊號 203 控制電路 204 位址訊號 205 資料訊號 206 資料訊號 207 訊號 201009582 208 訊號 209 非揮發性記憶體 210 輸出程式資料訊號 211 輸入位址訊號 212 微控制器 401 燒錄器 402 訊號 403 控制電路In the memory 209, the program data stored in the erasable programmable non-volatile memory 209 is read, and the program data required to be executed by the microcontroller 212 is supplied via the output program data signal 210. After the startup data mode is activated, the data read is 'Q or 1' so that the interested person knows to activate the protection data mode, and then cracks the 'protection data mode' to make the program data output smoothly. Successfully stealing program data. Therefore, the inventor of the present invention has developed a method for keeping secrets of non-volatile memory (NVM 'Non Volatile Memory) data, in particular, a non-volatile recording body with protection information attached to N〇P data. (NVM, Non Volatile Memory) data confidentiality method, which is φ can improve the current situation in the prior art by protecting the information of the option data as 1 'and then attempting to crack the option data of non-volatile memory. . SUMMARY OF THE INVENTION The present invention relates to a non-volatile memory (NVM, Non Volat memory) data security method and apparatus, which uses N〇p data plus protection information to achieve improvement In the technology, the option data of the protected data is 1, and the option data of the non-volatile memory 201009582. is tentatively cracked. Preferably, the security circuit architecture comprises at least: a programmer for outputting a burned input/output signal; and a eraseable programmable non-volatile memory for storing the driver of the microcontroller; A data is written into the read control circuit, receives the input/output signal of the programming of the burner, and performs the burning operation on the erased programmable non-volatile memory; φ a microcontroller, read erase Programmable non-volatile memory storage driver for performing electronic product control operations; and a memory data security circuit disposed in data write read control circuit and eraseable programmable non-volatile Between the memory, wherein, if the protection data is activated, the erased programmable non-volatile memory sends the read data signal to the memory data security circuit according to the address signal, and uses a random data method to generate The protection data signal is output, and the input data is input to the read control circuit, and then the protected resource signal is output. If the protection data is not activated, the memory data is secreted. • The road judges whether the read data signal contains NOP protection data. In order to enable the reviewing committee to have a better understanding and recognition of the structural purpose and efficacy of the present invention, the following examples are described in detail with reference to the illustrated examples. [Embodiment] FIG. 3 is a flow chart of the random number selection protection data path of the present invention. Among them, the non-volatile memory data is written by the user in the combination language 8 201009582 (Assembly Language) via the compiler (c〇mpMer), and the compiler is traditionally used in converting the combined language. The memory address of the program is filled with the null command (NOP, No 〇peration). Since the NOP has no effect on the microcontroller, if the data is added, the protection information will not be affected. The original execution of the microcontroller is due to us. It also counts a mechanism to protect against cracking, which not only matches the original burning method, but also increases the confidentiality of the data. The flow of the entire burn-in mechanism is described below: ❿ 1. The microcontroller enters the programming mode. 2. Select to write, read, or leave the burn-in mode for the read-only memory in the microcontroller. 3. If a write operation is performed, the program to be written to the read-only memory is executed. 4. After the write operation is completed, you can choose to leave the programming mode or continue to execute the programming mode. 5_ If the read operation is performed, first check if it is the protection mode. • 6. To activate the protection mode, set the address of the protection data option when writing to the read-only memory, and start the protection data mechanism the next time you enter the programming mode. 7. If the protection mode is read, the data security method is used to read the program. 8. If the read protection mode is not activated, the normal normal reading procedure will be executed first. 9. When reading data, 'Check if the data program contains nop protection data. 201009582 1 〇 If the data program contains Ν 保护 P protection data, the data privacy method is used to read the program. 11. If the NOP protection data is not included, perform a normal normal reading procedure. • 12. After writing or reading, you can re-enter the read or write mode until you leave the programming mode. When entering the programming mode, the user can write the program data and read the confirmation data correctly. To prevent the writing program data from being stolen, the user can start the traditional data protection mechanism or the user can join the program data. Contains NOP protection data, so that the next time you enter the burning mode, you can protect the data. Because the person who is interested in the situation reads 0 or 1 according to the situation, you can know that the option data of the traditional protection data is 1, and then The option data of the volatile memory is tentatively cracked, so we change the tribute output when the protection is *the output of the poor material in a random number 5 to clarify the way of cracking the mind, even if the traditional protection data is successfully cracked, When the traditional data protection mechanism is released, when the general reading program output data is executed, the output data will be pre-checked to check whether the output data contains NOP protection data. If the user is in the program data • Add the NOP protection data, the output data is the same as the random number. Way. Output data, because NOP protection data has been added to the program data, and written as program data Memory body, so that interested parties can no longer break other ways to achieve successful conservation program data. Preferably, the non-volatile memory is selected from the group consisting of a flash memory, an EPROM, and an EEPR0M. Figure 4 is a data protection mechanism of the present invention. After the traditional protection data mode is started, the data read is 0 201009582 or the person knows to start the protection data mode, and then cracks the 'protection data mode' to make the program data output smoothly. Successfully stealing program data' In view of this, in order to clarify the intention of people to crack according to such circumstances, the invention proposes a new data protection mechanism, as shown in Figure 4, the action is as follows: 1 burner 401 sent out to burn The recorded 丨/〇 signal 402 writes the data to the read control circuit 403 to enter the programming mode. 2·, 2, 丨/0 burning signal 402 'data write read control circuit 403 to write write data signal 405, address signal 404, enable control signal 408 and write read control signal 4 〇 7 The erased programmable non-volatile memory 409 is written to the data. 3. Since the programming mode is in the write operation, we do not input the address signal 404 of the data to the eraseable programmable non-volatile memory 409. 4 When the programming mode is performing the reading operation, the data is written by the 丨/〇 programming signal 4〇2', and the reading control circuit 4〇3 sends the enable control signal 408 and the write read control signal to the erase command. The programmable non-volatile memory 409 performs a data reading operation. 5. When the data writer reads the control circuit and reads the program data in the non-volatile memory 409, in order to protect, the beak material is not stolen by others, and the read protection mode is sent. The signal 413 is sent to the memory data security circuit 414 to initiate a mechanism for protecting the material. When the data is protected, the erased programmable non-volatile memory is sent according to the address signal 404 to the read data signal 406 to the memory 201009582. The physical data security circuit 414 uses the random data method to generate the protection data signal. 415, and then input to the data write read control circuit 403' to output the protected data signal via the 丨/〇 programming signal 402. 7_ If the protection data is not activated, the memory data security circuit 414 determines whether the read data signal 406 contains NOP protection data. 8. If the program data contains NOP protection data, the protection data signal 415 is generated by using the random data method. The input to the data write read control circuit 403 outputs an unprotected data signal via the I/O burn signal 402. 9. If there is no NOP protection data, the read data signal 406 is directly input as the protection data signal 415 to the data writing read control circuit 403', and the unprotected data signal is output via the 丨/〇 programming signal 402. 10. During normal operation of the microcontroller 412, the microcontroller 412 is input to the eraseable programmable non-volatile memory 409 by means of the wheeled address signal 411. 'Read erased programmable non-volatile memory The program data stored in the body 409 is supplied to the program data to be executed when the microcontroller 412 operates via the output program data signal 41. The memory data security circuit 414 structure is shown in FIG. The operation description is as follows: After receiving the read data signal 406, the hexagram data security circuit 414 first generates the random data signal 502 through the random number generating circuit 501. 2. Control read protection signal 41 3 Control signal selection circuit 503 selects general protection data signal 504 as random data signal 502 or original data path 406. 201009582 3. If the read protection signal 413 is in the protection mode, the signal selection circuit 503 selects the general protection data signal 504 as the random data signal 502. 4. If the control read protection signal 413 is in the normal mode, the signal selection circuit 503 selects the general protection data signal 504 as the original data path 406, that is, the unprocessed read data signal 406. 5. Then the general protection data signal 504 is checked by the protection mechanism circuit 505 to check whether the output program data contains the protection material 'and generates the protection control signal 506. 6. The control data selection unit 507 selects the protection data signal 415 as the general protection data signal 504 or the random data signal 502 by the protection control signal 506. 7. If the protection control signal 506 is to check that there is no protection data in the program data, then the signal selection circuit 507 selects the general protection data signal 504 as the protection data signal 415. 8. If the protection control signal 506 is to check that the program data contains Φ ΝΟΡ protection data, the signal selection circuit 5 〇 7 selects the random data signal 502 as the protection data signal 415. ' The signal selection circuit can be a multiplexer. After reading the data signal 40 6 through the above memory data security circuit 4] 4 architecture, the traditional data protection mechanism and the ΝΟΡ instruction protection data mechanism can be achieved. 'The fixed output data generated by the traditional data protection mechanism (〇 or 1) It is easy for people who are interested in cracking to unprotect the data mode, so that the program data can be output smoothly, and the program data is successfully stolen. Therefore, we change the fixed output generated by the traditional protection mechanism to change the output in random numbers. 13 201009582 • Confused people According to this situation, the crack is solved. However, if the traditional protection mechanism is successfully cracked by the interested person, the NOP instruction protection data mechanism proposed by the NOP instruction pre-checks whether the output data contains NOP protection data. Since the NOP protection data has been added to the program data and written into the memory in the form of program data, it is impossible for the person concerned to crack it in other ways, and the difficulty and time of the cracking method are increased, so that the NOP instruction protects the memory of the data mechanism. The method of confidentiality of physical data was successful. For example, after writing a program that does not contain the NOP-protected program data to the erasable programmable non-volatile memory 409, it contains the address bit and the program data bit (the program data table is as As shown in Table 1, if the mechanism of the traditional protection program data is not activated, the program data in the correct order can be successfully read according to the original address signal 4〇4 and the read data signal 406 (the program data table is shown in Table 2). If the mechanism of the traditional protection program data is activated, the protection data signal 415 is generated by the memory data security circuit 414, and input to the read/write person read control circuit 4Q3, and then protected by the I/O burn signal 402. The data job (the program data table at this time is shown in Table 3), and the output data is the random data generated by the random number generating circuit 5〇1. / The user adds the original program data to the Ν〇ρ command protection. The program, after the erasable programmable non-volatile memory 4Q9, contains the address = meta and program data bits (the program data table is shown in Table 4 (5), can be compared with the table to know the original - general NOP Information (data bit: _〇) will be re- Change to N0P data (data bit: remuneration) containing protection information. If not, the mechanism of the traditional program (4), _ memory #material security circuit 4U check N0P command protection circuit 5〇5 check whether the output data contains 201009582 NOP data of protection information, if not checked, will be output as general protection data signal 504 (because the machine does not start the traditional protection program data at this time), the general protection data signal 504 is the metadata path 4〇 6, that is, unprotected data) 'Until the check output data contains N〇p protection information, the next program data will be output as random data signal 5〇2 (the program data table is shown in Table 5) 'The operation principle can be known from Table 5. When the address has not been read, the information contains NOP protection information (address: before 〇〇12), the conference will sell the original data, once the data is read, N〇p When the information is protected (bit address: 〇〇13) 'The random number protection data will be read until the end. If the mechanism of the traditional protection program data is activated, the protection data signal 414 is generated by the memory data security circuit 414. 15, and input to the data write read control circuit 403, and then output the protected data signal through the I / O burn signal 4 〇 2 (the program data table at this time is shown in Figure 6), the output data is generated in random The random data generated by the circuit 501, since the mechanism for the conventional protection program data has been turned on, even if the read data contains the NOP protection information, the random protection data will be read until the end, so the output protection Figure 6 and Table 3 will be exactly the same. From the above examples, we can know that when we change the traditional protection mechanism, we use the random number to output, confuse people with the heart to crack, and even if the traditional protection mechanism is cared for. If the crack is successful, the output data of the general reader will be checked to see if the output data contains NOP protection data. 'Because the NOP protection data has been added to the program data and is written to the memory as program data' The person who is interested can no longer use other methods to crack, the difficulty of the cracking method and the increase of time, so that the Nop instruction protects the memory of the data mechanism. Material security methods successfully. 15 201009582 The above is only an example of the invention, and the scope of the invention is not limited thereto. That is to say, the equal changes and repairs made by the applicants in accordance with the scope of the patent application of the present invention should still fall within the scope covered by the patent of the present invention. Please ask the reviewing committee to give a clear explanation and pray for the best. Figure 1 is a schematic diagram of the operation of the burning mode of the prior art; ❿ Figure 2 is a schematic diagram of the programming circuit of the prior art; Figure 3 is a schematic flow chart of the random number selection protection data used in the present invention; BRIEF DESCRIPTION OF THE DRAWINGS FIG. 5 is a schematic diagram showing the structure of a memory data security circuit used in the present invention; and FIG. 6A/B is a program for explaining the confidentiality of the memory data of the present invention. data. [Main component symbol description] 201 Burner 202 Signal 203 Control circuit 204 Address signal 205 Data signal 206 Information signal 207 Signal 201009582 208 Signal 209 Non-volatile memory 210 Output program data signal 211 Input address signal 212 Microcontroller 401 burner 402 signal 403 control circuit
404 位址訊號 405 資料訊號 406 資料訊號 407 寫入讀取控制訊號 408 致能控制訊號 409 非揮發性記憶體 410 輸出程式資料訊號 411 輸入位址訊號 412 微控制器 413 讀取保護模式訊號 414 記憶體資料保密電路 415 NOP資料訊號 506 亂數產生電路 507 亂數資料訊號 508 訊號選擇電路 509 —般保護資料訊號 510 檢查NOP保護機制電路 17404 address signal 405 data signal 406 data signal 407 write read control signal 408 enable control signal 409 non-volatile memory 410 output program data signal 411 input address signal 412 microcontroller 413 read protection mode signal 414 memory Physical data security circuit 415 NOP data signal 506 random number generation circuit 507 random data signal 508 signal selection circuit 509 general protection data signal 510 check NOP protection mechanism circuit 17