I would do it by interupting the pic and have an if statement:
if c1 = 0 then
do whatever
resume (whatever your base routine is)
do whatever else
c1 = 0
resume (whatever your base routine is)
in your base routine you could put the pic to sleep for a defined period of time and if it had not been interupted within that time make c1 = 0. That way if it were 1 it would clear it.




Bookmarks