在MPLAB IDE下有一個可以觀察變數的視窗"watch"
一般來說所有的變數都可以在此視窗下被看見,除了Reserved Memory 或是 Local Variable:
解決 Reserved Memory 的問題是在 MPLAB IDE 下有個 "Release & Debug" 的下拉視窗 :
如果要用 ICD2 or Real ICE Degubbing 的話,該選項就要選擇 "Debug" 後重新 Build All 再燒錄,
這樣 Linker 才可以將除錯要用到的資源保留下來這樣才不會跟你的程式衝突(共用RAM的問題)。如果
要讓 Target Board 單獨執行的話就可以勾選 "Release" 的選項。
iamqq 發表在 痞客邦 留言(0) 人氣(582)
MPASM [MPLAB v.836]
#include "xxx.inc" ;先到project目錄找xxx.inc,若無,則到系統目錄下找(C:\Program Files\Microchip\MPASM Suite)
#include <xxx.inc> ;照理說要先到系統目錄下找,但實際測試樣會先到project目錄找xxx.inc,若無,才到系統目錄下找
結論
#include "xxx.inc" or #include <xxx.inc> 用法是相同的 ; In MPASM
iamqq 發表在 痞客邦 留言(0) 人氣(43)

The following families have a 9-volt maximum Vpp spec ,would require the Vpp Limiter product or a comparable clamping circuit on Vpp when using the MPLAB ICD 2 and the non-RoHS MPLAB PM3
iamqq 發表在 痞客邦 留言(0) 人氣(52)
在早期開發的環境中,PICASM for DOS 所寫的組語,若要轉成MPLAB中所使用的MPASM,要注意下列事項:
PICASM的語法與MPASM的語法之間的差異,會造成一些不易發覺錯誤
如
iamqq 發表在 痞客邦 留言(0) 人氣(72)
在MPLAB中的debugger & programmer 中 都可以選擇 "Debug" or "Release"其用意在 寫cdoe時,有為了方便,在程式中加一些 debug的code,等code完成後,又不希望這些debug code出現,可以 #ifdef 方式來操作,如下:
#ifdef __DEBUG //當選"Debug"時,雙底線
write code here //若在build的過程中,出現Platform Mismatch的視窗,問你是否rebuild?請選"N0",否則會被切回原本的模式
#endif
iamqq 發表在 痞客邦 留言(0) 人氣(291)