我使用的是PIC12F683芯片。使用MPLAB X 4.0 及仿真头AC162058调试。
现欲设计休眠程序。
但当程序中出现 SLEEP(); 语句时,无法进入调试。
出现:编程/验证完成
目标器件未准备好调试。请在继续进行之前检查你的配置位设置然后编程器件。
只要注释SLEEP就可以。下面是配置字:
#pragma config FOSC = INTOSCIO // Oscillator Selection bits (INTOSCIO oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN)
#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config MCLRE = ON // MCLR Pin Function Select bit (MCLR pin function is digital input, MCLR internally tied to VDD)
#pragma config CP = OFF // Code Protection bit (Program memory code protection is enabled)
#pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is enabled)
#pragma config BOREN = NSLEEP // Brown Out Detect (BOR disabled)
#pragma config IESO = OFF // Internal External Switchover bit (Internal External Switchover mode is disabled)
#pragma config FCMEN = OFF
请问各位有什么办法解释? |