|
|||||||||||
| 技術(shù)交流 | 電路欣賞 | 工控天地 | 數(shù)字廣電 | 通信技術(shù) | 電源技術(shù) | 測控之家 | EMC技術(shù) | ARM技術(shù) | EDA技術(shù) | PCB技術(shù) | 嵌入式系統(tǒng) 驅(qū)動編程 | 集成電路 | 器件替換 | 模擬技術(shù) | 新手園地 | 單 片 機(jī) | DSP技術(shù) | MCU技術(shù) | IC 設(shè)計(jì) | IC 產(chǎn)業(yè) | CAN-bus/DeviceNe |
程序跑飛 |
| 作者:yefoliang 欄目:單片機(jī) |
在我寫程序時,我把一段沒關(guān)重要的程序刪除后,發(fā)現(xiàn)程序就跑飛了,我再用單步來檢查程序,發(fā)現(xiàn)在其中一條中出問題,在這條程序前后加上NOP后,程序還在會跑飛,請問在這樣跑飛的程序有什么好的方法來防止程序跑飛,大家來討論一下。 |
| 2樓: | >>參與討論 |
| 作者: swaryer 于 2005/1/3 8:55:00 發(fā)布:
建議:開啟WDT,在程序中要經(jīng)常CLRWDT 開啟WDT,在程序中要經(jīng)常CLRWDT 單步跑,就知道程序在哪里跑飛了 |
|
| 3樓: | >>參與討論 |
| 作者: kingpoo 于 2005/1/3 10:25:00 發(fā)布:
yefoliang:我認(rèn)為你應(yīng)該把你的程序貼出來! yefoliang:我認(rèn)為你應(yīng)該把你的程序貼出來! 然后告訴大家你使用的環(huán)境,這樣大家才能夠幫助你的 |
|
| 4樓: | >>參與討論 |
| 作者: xieyuanbin 于 2005/1/3 16:13:00 發(fā)布:
你那條什么程序? PIC不是51,不會無緣無故就跑飛的. |
|
| 5樓: | >>參與討論 |
| 作者: fangzk 于 2005/1/10 20:57:00 發(fā)布:
大家?guī)兔纯催@個程序?yàn)楹卫鲜莵y跳? ;********************************************************************** ; This file is a basic code template for assembly code generation * ; on the PICmicro PIC16F73. This file contains the basic code * ; building blocks to build upon. * ; * ; If interrupts are not used all code presented between the ORG * ; 0x004 directive and the label main can be removed. In addition * ; the variable assignments for 'w_temp' and 'status_temp' can * ; be removed. * ; * ; REFER to the MPASM User's Guide for additional information on * ; features of the assembler (Document DS33014). * ; * ; REFER to the respective PICmicro data sheet for additional * ; information on the instruction set. * ; * ;********************************************************************** ; * ; Filename: xxx.asm * ; Date: * ; File Version: * ; * ; Author: * ; Company: * ; * ; * ;********************************************************************** ; * ; Fi |
|
| 6樓: | >>參與討論 |
| 作者: fangzk 于 2005/1/10 21:11:00 發(fā)布:
大家一定要幫我! 是不是我因該用rc,不用tx? |
|
|
|
| 免費(fèi)注冊為維庫電子開發(fā)網(wǎng)會員,參與電子工程師社區(qū)討論,點(diǎn)此進(jìn)入 |
Copyright © 1998-2006 www.udpf.com.cn 浙ICP證030469號 |