我被PIC16F1947的配置位卡住了。我是PIC編程新手,請詳細回答。應使用哪些配置位來調試PIC16F1947?
我以下設置:
- MPLAB 8.46
- MPLAB ICD 3
- HI-TECH C編譯器9.81
甲PIC16F1947 PIM(插頭在模塊)插入在PICDEM LCD 2演示板上。電路板由3 V電池供電,J15跳線根據手冊連接(1-3連接,2-4連接在J15上)。該項目編譯爲調試版本。
以下是所使用的配置位:
// Configuration word 1
__CONFIG( FOSC_INTOSC & // INTOSC oscillator: I/O function on CLKIN pin
WDTE_OFF & // WDT disabled
PWRTE_OFF & // PWRT disabled
MCLRE_OFF & // MCLR/VPP pin function is digital input
CP_OFF & // Program memory code protection is disabled
CPD_OFF & // Data memory code protection is disabled
BOREN_OFF & // Brown-out Reset disabled
CLKOUTEN_OFF & // CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin
IESO_OFF & // Internal/External Switchover mode is disabled
FCMEN_OFF // Fail-Safe Clock Monitor is disabled
);
// Configuration word 2
__CONFIG( WRT_OFF & // Write protection off
VCAPEN_OFF & // VCAP pin functionality is disabled
PLLEN_OFF & // 4x PLL disabled
STVREN_OFF & // Stack Overflow or Underflow will not cause a Reset
BORV_19 & // Brown-out Reset Voltage (VBOR) set to 1.9 V
LVP_OFF // High-voltage on MCLR/VPP must be used for programming
);
我罐程序(燒固件)經由MPLAB微。但是,當我嘗試Debugger > Run
它的輸出窗口顯示以下錯誤:
ICD3Err0040: The target device is not ready for debugging. Please check your configuration bit settings and program the device before proceeding.
我查了一下ICD3Err0040的文件,但在我看來,一切正常。
我在做什麼錯了?請幫忙。
也許這裏更多運氣? http://electronics.stackexchange.com/ – Jake 2011-03-14 08:19:44
@MiRAGe,我會稍後再試。謝謝。 – Donotalo 2011-03-14 08:23:00