piclist 2003\02\23\053259a >
Thread: Pin won't turn off properly
face BY : David Duffy email (remove spam text)

>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

But if the transistor has failed, it won't really matter what the port pin
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.

http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.

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...