Hi,
How accurate do you need this 16 seconds to be and how long is is the signal you are looking for?
A simple way would be polling the pin in a tight loop with a short delay inside.
Lets say you have a delay of 10 ms in the loop and do this loop 1600 times you should end up with a 16 second time window.
If you need more accuracy yuu can adjust the delay by using delay_us if timing is critical..
You didnt mention the clock frequency but unless it is really slow it will be hard to get 16 seconds time by just using a timer... in that case you need to reset it several time or count how many times it overflows... or something
/me
Bookmarks