【正文】
should enter and lose electrical power. Just when Ts decreases progressively to 0, make it is it indicate to wait for not to lose electrical power Td =1500. When the procedure is restored to the throne beginning again, measure to Ts =0 but Td * 0, is it is it is it transmit power to try to cross already to indicate, at is it wait for the course of 30s to lose electrical power now. In this way, the whole process is transmitted each other by such these parameters as Tr, Td , Ts etc, go on step by step. Result: Conclusion Antiinterference is an important problem in an electronic design, especially Important in the onechip puter. This is because the onechip puter has procedures to run particularity that flies, the consequence that it is interfered may be the system halted, may send out various kinds of mistakes or illegal movements before the system halted too, make the whole system produce the mortality mistake. So, only guarantee it is not enough yet for onechip puter not to crash, study how to reduce the risk interfered, it can befaulttoierant how is it after and make mistakes. This text is it act as some exploration from two these to try hard, hope these elementary opinions can play some function of casting a brick to attract jade, helpful to everybody。下面以 51 系列單片機為例探討具體原理與實現(xiàn)方法,復(fù)位信號為高電平。對于只是顯示的儀表,某 1s 偶然出現(xiàn)的讀數(shù)錯誤對下一次測量并沒有記憶,是可以承受的,屬 “一過性 ”錯誤。 2 硬件實現(xiàn)要點 無條件定時復(fù)位 一般有 2 種方法。 復(fù)位周期與復(fù)位高電平時間 3 中,復(fù)位信號在高電平 Tr 期間,單片機處在復(fù)位狀態(tài), 程序不運行,抗干擾能力最強;高電平過后,單片機開始執(zhí)行程序。這個正脈沖會影響正常的輸出,有 2 個辦法處理: ① 在端子上并聯(lián)電容加以抑制,容量根據(jù)復(fù)位的 Tr 時間確定。在某引腳對地接一個 1μF的電容,復(fù)位后檢測該引腳,如果是低電平就是初上電。要注意的是,測量、送顯示用的總時間要小于復(fù)位低電平時間,否則會出現(xiàn)永遠不能完整執(zhí)行程序的錯誤。試送電的 延時是對復(fù)位進行 25 次計數(shù)實現(xiàn)的,因為每次復(fù)位時間是 20ms。 圖 5 變壓器保護器部分程序流程 結(jié) 語 跑飛的特殊性,它受到干擾 的后果可能是死機,也可能在死機前發(fā)出各種錯誤或非法動作,使整個系統(tǒng)產(chǎn)生致命性錯誤。當程序再次由復(fù)位開始時,檢測到 Ts=0 但是 Td≠0,表明已經(jīng)越過了試送電,現(xiàn)在正處于停電等待 30s 的過程中。送電后的 1s 內(nèi)為啟動時間,不進行過電流檢測。 實現(xiàn)跨越定時復(fù)位間隔的時序控制 用復(fù)位方式工作,每次從頭開始反復(fù)執(zhí)行同一程序。當然,這種方法會使正常的輸出變化滯后一個周期,才真正反映到輸出端子。 輸出端子的處理 (1)復(fù)位期間的正脈沖 I/O 口變成高電平。 外部條件復(fù)位 以使用施密特觸發(fā)器整形;對于記錄最大或最小值的儀器,可使用窗口比較器。這種方法的復(fù)位間隔不是固定的,而是根據(jù)外部條件確定的。如果工作與休眠的時間比例為 1:9,也就是說, 1s 內(nèi)有 的時間用來檢測、送顯示,有 的時間休眠,程序受干擾的概率是全速運行時的 1/10,整體抗干擾能力提高了 10倍。每次復(fù)位后,單片機執(zhí)行相應(yīng)的程序,執(zhí)行完任務(wù)后及時進入休眠,等待下次復(fù)位。t present forever the mistake of the intact executive program. ② For having application that time sequence controlled , after being restored to the throne each time , should check first that see the sign left last cycle , in order to determine what is done this cycle . That is to say every is it restore to the throne operation of cycle to stride , by is it transmit to indicate all, these indicate while leaving in inside RAM , the zero clearing only when have the electricity for the first time. For example, the protecting synthetically device of abovementioned voltage transformer , is restored to the throne regularly according to the interval of 20ms. It reaches the normal working state through, certain movement order after having the electricity, such as Fig. 4。 For writing down the instrument of the biggest or minimum, can use the window parator. In order to realize the electronization that is regulated, can use the electronic electric potential device, establish upper and lower limits with the order of the onechip puter. Reduce cycle and restored to the throne the high electricity at ordinary times In Fig3, restored to the throne the signal during high level Tr, the onechip puter is in the state of restoring to the throne, the procedure does not run, antiinterference ability is the strongest。 Combine the instance, analyse the characteristic of the hardware and software design under these kind of operation way. Keyword: Onechip puter Restore to the throne /dormancy antiinterference Foreword Introduction: With the development at full speed of the microelectric technique, the performance of the onechip puter improves rapidly, demonstrate the outstanding advantage in the operation, logic control, inte