piclist 2003\02\23\053259a >
Thread: Pin won't turn off properly
www.piclist.com/techref/ubicom/devices.htm?key=sx
flavicon
face BY : David Duffy email (remove spam text)



<snip>
Russell:
>Conversely, if you rely on RMW instructions and they don't work because of a
>hardware problem, regardless of WHY the problem occurred,  then your
>program's operation is wrested from your control and placed at the mercy of
>whatever it is that is happening that you don't expect. This might be (as I
>described in my FET drive example) a failed component, or an out of spec
>component or a hardware change made without enough thought of the effect on
>software or (importantly) by someone who doesn't know what the software is
>doing.

But if the transistor has failed, it won't really matter what the port pin
thinks
the level currently is as the lamp/motor/whatever will still be stuck on/off as
anyway. I've tried to think of a situation where feedback from the shorted pin
could cause the code to behave badly but I really can't. Maybe if you rely on
the port pin output state to make decisions on then you could get bitten. I
usually have flags to indicate the system state so I avoid it that way.

>Murphy and reality say that YMWV.

Yes, reality has a nasty habit of getting in the way of all things proper! :-)

>Use of a shadow register gives you added certainty and costs little.
>Sometimes performance issues make it an unviable solution.
>In all other cases its use is prudent.

As long as you're aware of RMW issues, I don't see them as a big problem.
David...

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.
<5.2.0.9.2.20030223201609.00b96110@audiovisualdevices.com.au>

In reply to: <035f01c2db1a$cc9bf240$2301a8c0@Paradise>
See also: www.piclist.com/techref/ubicom/devices.htm?key=sx
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Pin won't turn off properly

month overview.

new search...