Inputs don't use the shadow register. Just read the port directly. btfss/btfsc does ofcourse read the port but they don't write anything back = so = there is no rmw issue here and it doesn't involve the shadow register at al= l. You can even read the outputs and verify that they are the same as the shad= ow = register. Only the output bits then ofcourse. If they are not the same, it = could be because an output is shorted or overloaded. /Ruben > > One way to solve this is to never read the the value from the port to > > the shadow register but keep the shadow register as a global variable > = > That would be impractical if you have to monitor inputs. I'm sure that > eg btfss pin / btfsc pin reads the port > = > -- = > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Ruben J=F6nsson AB Liros Electronic Box 9124, 200 39 Malm=F6, Sweden TEL INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D -- = http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist