Sorry that I wasn't specific enough. I monitor the input pin. The input voltage normally is high all the time. If it's high, my program runs. If it gets low, I terminate the program. Now I need to know for sure that the pin is high because the input voltage is high, not because it gets not stuck at high due to microelectronic failure. If such failure occurs, even if the input voltage becomes low, the input bit would still be high and I would not know the differences. I detect such failure, I was told to do a periodic self-check to detect if the pin gets stuck. By the way, I don't have a spare pin to implement hardware solution. All the detection and mitigation must be done in software. My question is, how to do it? The standard auditor said they are not allowed to tell me how to do it. They can only tell me if me solution is acceptable. Thanks. ----- Original Message ----- From: "Simon Bryden" To: Sent: Tuesday, August 06, 2002 8:15 PM Subject: Re: [PIC] How to detect if an input pin gets stuck > What do you mean by "gets stuck at"? Do you mean remains in one state for more > than a certain length of time? If so, test it, store the state, delay, test > again, compare the state. > > Maybe you should be more specific about your requirements. > > Cheers, > Simon. > --- > > On Tue, Aug 06, 2002 at 05:32:58PM -0400, Tony Pan wrote: > > Hi, > > > > 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? > > > > Thanks alot! > > > > Tony > > > > -- > > 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 > > > > > > > > -- > 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 > > -- 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