#pragma config FOSC = INTOSC // Oscillator Selection bits->INTOSC oscillator: CLKIN function disabled
#pragma config BOREN = OFF // Brown-out Reset Enable->Brown-out Reset disabled
#pragma config WDTE = OFF // Watchdog Timer Enable->WDT disabled
#pragma config PWRTE = OFF // Power-up Timer Enable bit->PWRT disabled
#pragma config MCLRE = OFF // 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 disabled
#pragma config LVP = OFF // Low-Voltage Programming Enable->Low-voltage programming disabled
#pragma config LPBOR = OFF // Brown-out Reset Selection bits->BOR disabled
#pragma config BORV = HI // Brown-out Reset Voltage Selection->Brown-out Reset Voltage (Vbor), low trip point selected.
#pragma config WRT = OFF // Flash Memory Self-Write Protection->Write protection off
这是我的配置字,外设我只用了PWM2和TIMER0,TIMER1,并且在进入休眠模式之前,把他们全部都给关了,只打开了IOC中断来唤醒MCU。 |