> Russel may be right here, I also suspect a rmw problem, but how? Again, t= he > accesses to PORTB are few and can be resumed to: > > 1. bsf/bcf one bit, which is set as output That might well be your smoking gun. Rule of thumb: the only instructions that write to a PORT that has more=20 than one bit set as output should be MOVWF instructions. --=20 Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu C++ on uC blog: http://www.voti.nl/erblog --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .