On Thu, 11 Jul 2002 10:18:58 -0400, "A.J. Tufgar" wrote: >Good day all, > Simple question about the TRIS reg. When I change the TRIS >reg direction for writing to and from an i2c bus I notice it changes >some of the other PORTB values that I'm not working with. Which is changing: the PORTB value or the TRISB value? You should double check your bank selection to ensure that you're really writing where you think you are.=20 > Is it >possible to stop this? Actually, it's not possible to do it (unless your bank selection is wrong). :=3D)=20 > >It changes pin 2 when modifying TRIS6. Doing logic and math operations (see read-modify-write threads in archives) on an internal register like TRISB shouldn't cause unexpected bit changes. Doing those same operations on the PORTB address can. Regards, Bob -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads