>>It's my first time working above page0 and can use pagesel and for the 2 >>page 16F88: bcf PCLATH,3 to get back to page0 prior to any call or goto. >>But how to get the ISR in page0 that has goto statements to work >>properly? If bcf PCLATH,3 is placed at the beginning of the ISR that >>might fix the ISR, but after retfie to either page0 or page1 how to have >>the correct PCH value. The data sheet says you can not read PCH and >>that the stack push or pop do not change PCLATH. >> > >Before doing any 'goto' or 'call' instructions in the ISR code, you >need to preserve the PCLATH value just like you do for w and the >STATUS register. Once you've saved PCLATH, you can then clear it for >the execution of the ISR and restore it to the saved value before >returning from the interrupt. And my immediate reaction is to say "go use Olins macros and development environment". The macros that Olin has make dealing with page boundaries childs play. They also get around the potential mistake you have made of changing only 1 bit in the PCLATH register when there is more than two pages. See http://www.embedinc.com/pic/ for the information and downloads. For the ISR, use the very standard template that Microchip provide. Olin also has a template ISR module that shows the "correct" way to do it without introducing problems with paging. -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist