Ruben J=F6nsson wrote: > 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 bac= k so = > there is no rmw issue here and it doesn't involve the shadow register at = all. > = > You can even read the outputs and verify that they are the same as the sh= adow = > register. But why doing that ? If you *are* using a shadow register it's becuse they are *not* (or might not be) the same becuse of RMW issues. If they are always the same you don't have any RMW issue and you do not need the shadow register in the first place. Jan-Erik. > 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