【正文】
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 系列單片機(jī)為例探討具體原理與實(shí)現(xiàn)方法,復(fù)位信號(hào)為高電平。對(duì)于只是顯示的儀表,某 1s 偶然出現(xiàn)的讀數(shù)錯(cuò)誤對(duì)下一次測(cè)量并沒(méi)有記憶,是可以承受的,屬 “一過(guò)性 ”錯(cuò)誤。 2 硬件實(shí)現(xiàn)要點(diǎn) 無(wú)條件定時(shí)復(fù)位 一般有 2 種方法。 復(fù)位周期與復(fù)位高電平時(shí)間 3 中,復(fù)位信號(hào)在高電平 Tr 期間,單片機(jī)處在復(fù)位狀態(tài), 程序不運(yùn)行,抗干擾能力最強(qiáng);高電平過(guò)后,單片機(jī)開(kāi)始執(zhí)行程序。這個(gè)正脈沖會(huì)影響正常的輸出,有 2 個(gè)辦法處理: ① 在端子上并聯(lián)電容加以抑制,容量根據(jù)復(fù)位的 Tr 時(shí)間確定。在某引腳對(duì)地接一個(gè) 1μF的電容,復(fù)位后檢測(cè)該引腳,如果是低電平就是初上電。要注意的是,測(cè)量、送顯示用的總時(shí)間要小于復(fù)位低電平時(shí)間,否則會(huì)出現(xiàn)永遠(yuǎn)不能完整執(zhí)行程序的錯(cuò)誤。試送電的 延時(shí)是對(duì)復(fù)位進(jìn)行 25 次計(jì)數(shù)實(shí)現(xiàn)的,因?yàn)槊看螐?fù)位時(shí)間是 20ms。 圖 5 變壓器保護(hù)器部分程序流程 結(jié) 語(yǔ) 跑飛的特殊性,它受到干擾 的后果可能是死機(jī),也可能在死機(jī)前發(fā)出各種錯(cuò)誤或非法動(dòng)作,使整個(gè)系統(tǒng)產(chǎn)生致命性錯(cuò)誤。當(dāng)程序再次由復(fù)位開(kāi)始時(shí),檢測(cè)到 Ts=0 但是 Td≠0,表明已經(jīng)越過(guò)了試送電,現(xiàn)在正處于停電等待 30s 的過(guò)程中。送電后的 1s 內(nèi)為啟動(dòng)時(shí)間,不進(jìn)行過(guò)電流檢測(cè)。 實(shí)現(xiàn)跨越定時(shí)復(fù)位間隔的時(shí)序控制 用復(fù)位方式工作,每次從頭開(kāi)始反復(fù)執(zhí)行同一程序。當(dāng)然,這種方法會(huì)使正常的輸出變化滯后一個(gè)周期,才真正反映到輸出端子。 輸出端子的處理 (1)復(fù)位期間的正脈沖 I/O 口變成高電平。 外部條件復(fù)位 以使用施密特觸發(fā)器整形;對(duì)于記錄最大或最小值的儀器,可使用窗口比較器。這種方法的復(fù)位間隔不是固定的,而是根據(jù)外部條件確定的。如果工作與休眠的時(shí)間比例為 1:9,也就是說(shuō), 1s 內(nèi)有 的時(shí)間用來(lái)檢測(cè)、送顯示,有 的時(shí)間休眠,程序受干擾的概率是全速運(yùn)行時(shí)的 1/10,整體抗干擾能力提高了 10倍。每次復(fù)位后,單片機(jī)執(zhí)行相應(yīng)的程序,執(zhí)行完任務(wù)后及時(shí)進(jìn)入休眠,等待下次復(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