> > Also note that there is a race condition > > (as noted in the grey box on side 20 > > of the data sheet) thay says that, if you > > are unlucky, you can miss a port change > > if it occures in the "start of th 2 cycle" > > when reading the GPIO port. The GPIF flag > > might not be set. > > > > It doesn't specify any workaround, but I'd > > guess that you could re-read the GPIO port > > (first once to clear the mismatch condition, > > then a second time to see if there was a > > pin change during the first read) in your code. But the second read could also get data just as (before) it changed. This would leave the pins different from the last read value and the mismatch flag cleared. You really have to be careful how you use GPIF (interrupt on change). Generally it is ok for 'power-up on keystroke' type stuff. Bob Ammerman RAm Systems -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.