各位大侠,我用TMR1做1S定时唤醒的程序,没有仿真器。程序唤醒不了,进入休眠状态后好像也不省电,还有8.6MA的电流,外接32.768晶体和2个100P电容。用单片机12F675. 还有配置位设置应选内部RC/3脚作I/O呢还是内部RC/3脚作时钟输出
。请教大侠,先谢为盼!
NONLOCK1:
CLRWDT
BCF 5,0 ;挡住了
SLEEP
NOP
CLRWDT
GOTO LOOP
INT_TMR1:
CLRWDT
BCF 0CH,TMR1IF
BSF STATUS,RP0
BCF 8BH,GIE
BCF STATUS,RP0
BCF T1CON,TMR1ON
BSF STATUS,RP0
CLRF ANSEL
BCF STATUS,RP0
MOVLW B'00000111'
MOVWF CMCON
CLRF TMR1L
MOVLW 80H
MOVWF TMR1H
BSF STATUS,RP0
BSF 8BH,GIE
BCF STATUS,RP0
BSF T1CON,TMR1ON
MOVLW B'00000100'
MOVWF ANSEL
GOTO IntRet |