Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem about CCP interrupt in MPlab Sim

Status
Not open for further replies.

fatcat1985

Newbie level 1
Joined
Feb 1, 2008
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,290
Hello everyone:
I wanna emulate my program in MPlab by choosing MPLAB SIM as the debugger. However, I found that even the context in CCPR1L and CCPR1H met that in Timer 1, nothing happened. The CCP1IF did not be set at all. Did anyone met this problem before?

My init section as follow:

The timer1 was set as D8 00 at first


INITIAL
;============IO init============
BCF STATUS,RP1
BSF STATUS,RP0
MOVLW 0FFH
MOVWF TRISB
MOVWF 00H
MOVWF TRISC
MOVLW 00H
MOVWF TRISD
MOVLW 00H
MOVWF OPTION_REG
;============INT init=============
BCF STATUS,RP1
BSF STATUS,RP0
MOVLW 05H
MOVWF PIE1
MOVLW 80H
MOVWF ADCON1
BCF STATUS,RP0
NOP
NOP
NOP
NOP
NOP
NOP
NOP
NOP
MOVLW 09H
MOVWF ADCON0
;====AD初始化结束=====

MOVLW 0CH
MOVWF T1CON
MOVLW 0D9H
MOVWF CCPR1H
MOVLW 99H
MOVWF CCPR1L
MOVLW 0AH
MOVLW CCP1CON
MOVLW 0D8H
MOVWF INTCON
RETURN
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top