> 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 b= ack so > > there is no rmw issue here and it doesn't involve the shadow register a= t all. > > = > > You can even read the outputs and verify that they are the same as the = shadow > > 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. > = I mean that you could do it to verify that the outputs are as expected - no= t = for bit manipulations while setting the indiviual bits as part of the norma= l = operation. That would, as you say, defeat the whole meaning of using the sh= adow = register. The port bits might not be the same as the shadow register bits if the outp= ut = is shorted or overloaded and you might want to take some action then. This = check could be done periodically while not doing something else. /Ruben =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