Andrew Warren wrote: >Morgan Olsson wrote: > >> You may also byte-write (movwf and clrf) to port B without >> disturbing interrupt on change, just do not do any kind of reading >> except for the one instance in interrupt routine. (Remember that >> BSF/BCF actually begins by executing a read...) > >Morgan: > >No, you can't avoid reading PORTB by using MOVWF, CLRF, etc. > >EVERY instruction that accesses PORTB reads it; the "write" >instructions just throw away the values that they read. > >-Andy In practice that seem not to be the case. Can you give some pointer to an document describing movwf and clrf doing reads? In my current project I frequently move debug information out on port B (using the lowest three bits set as outputs) both during interrupt and in main, and I have never observed any side effects. /Morgan -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.