All Questions
4 questions
2
votes
2
answers
821
views
How do I measure a pulse width using the ATmega328P interrupts and timers?
I am using an ATmega328P MCU with an 8 MHz internal oscillator. I need to measure the pulse width of an incoming pulse. The frequency of this pulse is approximately 500 Hz. Once every 2 ms, one pulse ...
0
votes
1
answer
3k
views
How to set two timers running at the same time in atmega328p?
I want to set up two timers running two ISR-s with different resolutions.
One timer for counting milliseconds for clock time, another for counting microseconds when ...
0
votes
1
answer
869
views
How to use two timers for one interrupt vector on avr?
I want to use timer1 and timer2 for same vector TIMER#_COMPA_vect isr on atmega328p.
Idea is to start and stop one when requested, for time sensitive functions. And ...
1
vote
2
answers
6k
views
Arduino Atmega328 sleep mode with internal timer interrupt
I am trying to reduce the current consumption of my Atmega328 -Arduino- by using the sleep modes. In my code, I want to wake-up every 10ms, read the value from ADC, ...