Can I manually control(on and off) the interrupt timers of an Atmega328p chip with a push button? If yes, can it be used in compare match mode or input capture? if someone post some examples then it will be very helpful.
Thanks in advance.

  • 2
    Yes, yes, and yes. If you expect a more relevant answer, explain what you are trying to achieve. Otherwise it looks like an XY problem. – Edgar Bonet Jul 20 '18 at 11:52
  • @Edgar Bonet remember the stopwatch i was trying to make? And I was using OVF isr and you suggested to use compare match instead? So I was thinking if I can use Push buttons to reset and start the timer. Can you give me some examples of how to do or any suggestions? – Peouse Dutta Jul 20 '18 at 12:15
  • Here is the link arduino.stackexchange.com/questions/54542/… – Peouse Dutta Jul 20 '18 at 14:47
  • 1
    What level of resolution and accuracy on the stopwatch are you looking for? ns, ms, seconds? max latency from push button to timer stop? If you are looking at a 10-20 ms level and max 1 ms latency from push button change there is no real need for timers, etc. Also remember that the push button will have a few ms debounce period. – Mikael Patel Jul 20 '18 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.