piclist 2002\08\06\182822a >
Thread: How to detect if an input pin gets stuck
face picon face BY : Jinx email (remove spam text)

> I am writing a safety-related software and need to detect if
> an input pin gets stuck at 1 (or 0). Could any one tell me how
> to do it in the software?

"Stuck" implies the pin remains at 1 for a certain length of time,
(how long ?) so you could use the pin test to reset the timer

btfsc  pin
clrf  tmr1l     ;or here you could clear WDT if using WDT timeout
clrf  tmr1h

if the pin doesn't go to 0 before the timer rolls over then an IRQ
or WDT timeout is generated, or you could test tmr1if. You don't
give enough info for many more suggestions

http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics

<001901c23d98$561d9da0$129fa7cb@joe> 7bit

See also: www.piclist.com/techref/microchip/ios.htm?key=input
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) How to detect if an input pin gets stuck

month overview.

new search...