Go Down

Topic: Can I manually turn on and off the interrupt timers? (Read 103 times) previous topic - next topic


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 of it then it will be much helpful thanks in advance.


You can. If you want to work with the Hardware Timers then IMHO you need to study the Atmega 328 datasheet carefully.

Two or three hours spent thinking and reading documentation solves most programming problems.


Yes: have the Arduino read the button press normally, and set the timers on/off based on it.

You'll be able to find lots of examples on how to use the timers, but indeed having the data sheet at hand helps a lot.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up