Thanks BAJ! I fixed it. Regards Miki Byron A Jeff wrote: > On Mon, Oct 08, 2001 at 10:01:41PM +0300, Michael Noel wrote: > > Hi all! > > > > Where PIC16F877 returns from an interrupt, if in ISR I worked with > > PCLATH in > > different pages? > > Back to where it started. PCLATCH is not used for the return from interrupt. > The entire address is stored on the stack. > > > If the program loop in page 2 and appear an interrupt > > the PCLATH > > and PCL registers have 00 and 04? > > Nope. The PCLATCH register is unchanged during an interrupt. If the ISR needs > to change it, it should save the original and restore it before leaving. Of > course this applies to the W and STATUS registers also. > > > The program jump to 0004 without > > 'programer > > intervention' , > > Correct. An interrupt when enabled will goto address 0004. > > > I mean clrf PCLATH instruction? > > No the PCLATCH will be unaffected. So you'd have to save the PCLATCH, change it > and restore it before the retfie. > > > And to a 'retfie' > > instruction where will > > jump the program? > > Back to the instruction where the interrupt occured. > > > How can I simulate an RB0 INT in Mplab 5.20? With Asynchronous Stimulus > > don't work! > > No clue. I use gpsim on my Linux box. > > Hope this helps, > > BAJ > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads