When flying into the non-process procedures, redundant command will not work. By software traps, interceptors flying procedures, to lead the specified location and then an error handling. Software trap is used to capture the flying process toward reduction of import address 0000 H instructions. Its native code for the 0000020000.
2) the arrangements for traps
Usually in the process of the unused space filled EPROM 0000020000. Finally one should fill 020,000, when flying procedures fell on the area, to automatically orbit. In the user program, and various modules in the margins between the unit can also fill traps command. When using the interference and interruption due to open, in the corresponding interrupt service procedures set up software trap, caught the wrong time can be interrupted. Top of instruction available "RETI", can also be used "LJMP 0000H". If the fault diagnosis procedures and systems since the restoration of the design process reliable, complete with "LJMP 0000H" for the return instructions directly into the fault diagnosis procedures, as soon as possible to deal with failure and recovery procedures of the operation.
Taking into account the capacity of program memory, software trap 1 K space in the general 2-3 can be effectively blocked.
3. the software "watchdog" technology
If out-of-control process into the "cycle of death", usually a "watchdog" technology to process from the "death cycle." By constantly testing procedures cycle running time, if the process cycle time exceeds the maximum running time cycle, the system that a "cycle of death", the need for error handling.
"Watchdog" technology can be hardware, software can be. In industrial applications, serious interference may sometimes be interrupted damage control word, closure of interruption. The system can not regularly, hardware watchdog circuit failure. The software watchdog to be effective in solving such problems.
In practical applications, using ring interrupted surveillance systems. T0 Watchdog timer with T1, with timer T1 surveillance main program, the main program Watchdog T0. This ring used the software "watchdog" has a good anti-jamming performance, greatly improving the system reliability. The need for frequent use of T1 timer serial communications monitoring and control system, the timer T1 can not be interrupted, may be diverted from the serial port to monitor the interruption. Such software "watchdog" monitoring principle is: the main program, T0 interrupted service program, T1 service interruption in the process to establish a running observation variables, assumed to be MWatch, T0Watch, T1Watch, each cycle of a main program, MWatch plus 1 , The same T0, T1 procedures for the implementation of a service interruption, T0Watch, T1Watch plus 1. T0 interruption in the service of process in T1Watch by detecting changes in the determination of whether the normal operation of T1, T1 interruption in the service of process in the detection of changes in the MWatch determine whether the normal operation of the main program, in the main program in T0Watch by detecting changes in normal circumstances determine whether T0 work. If an observation detected abnormal changes in variables, such as an increase should not increase 1, to the error handling procedures for dealing with troubleshooting. Of course, most of the main program cycle, the timer T0 and T1 timing cycle should be completely reasonable to consider.
中文譯文
單片機也被稱為微控制器(Microcontroler),單片機由芯片內(nèi)僅有CPU的專用處理器發(fā)展而來。最早的設計理念是通過將大量外圍設備和CPU集成在一個芯片中,使計算機系統(tǒng)更小,更容易集成。
早期的單片機都是8位或4位的。其中最成功的是INTEL的8031,因為簡單可靠而性能不錯獲得了好評。此后在8031上發(fā)展出了MCS51系列單片機系統(tǒng)?;谶@一系統(tǒng)的單片機系統(tǒng)直到現(xiàn)在還在廣泛使用。隨著工業(yè)控制領域要求的提高,開始出現(xiàn)了16位單片機。90年代后隨著消費電子產(chǎn)品大發(fā)展,單片機技術得到了巨大的提高。隨著INTEL i960系列的出現(xiàn),特別是后來的ARM系列的廣泛應用,32位單片機迅速取代16位單片機的高端地位,并且進入主流市場。而傳統(tǒng)的8位單片機的性能也得到了飛速提高,處理能力比起80年代提高了數(shù)百倍。目前,高端的32位單片機主頻已經(jīng)超過300MHz,性能直追90年代中期的專用處理器。
評論
查看更多