Olin, LAY OFF THE GUY. It is obvious that this 'program' is no more than a test snippet, trying to solve the interrupt problem. It hardly needs comments. Bob Ammerman RAm Systems (contract development of high performance, high function, low-level software) ----- Original Message ----- From: Olin Lathrop To: Sent: Wednesday, October 25, 2000 8:26 AM Subject: Re: [PIC]:RB0/INT Configuration in 16C74B. > >> > Actually we are trying to configure RB0/INT pin in a 16C74B > as an external interrupcion with no succeded. > > The program seems to ignore the external interruption and never run the > service routine. > > Has anyone been experienced a similar situation, because we can not > configure RB0/INT either as an output or as input. > > Our source code program is: > > ORG 000H > GOTO MAIN > ORG 004H > GOTO SERVICE > MAIN: > BSF STATUS, RP0 > MOVLW 0XF1 > MOVWF TRISB > MOVLW 07H > MOVWF ADCON1 > BCF STATUS, RP0 > BSF STATUS, RP0 > BSF OPTION_REG, INTEDG > BCF OPTION_REG, 7 > MOVLW b'10110000' > MOVWF INTCON > > PT1: SLEEP > GOTO PT1 > > SERVICE: > BSF PORTB,3 > BCF INTCON, INTF > BCF INTCON, RBIF > RETFIE > END > << > > You aren't setting the bank bits in the interrupt service routine, so there > is no guarantee what the current bank is when BSF PORTB, 3 executes in the > interrupt routine. This will require saving and restoring state. > > I also noticed that the first interrupt will disable the RB0 interrupt, so > this will only happen once. Of course we can't tell if that was intentional > since you haven't seen fit to document your code. There may be other > problems but I haven't wasted time looking at your main routine since it's > not even important enough for you to comment properly. > > > ***************************************************************** > Olin Lathrop, embedded systems consultant in Devens Massachusetts > (978) 772-3129, olin@cognivis.com, http://www.cognivis.com > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > > > > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics