Fe(II)man
Member level 1
Howsit Guys,
my post today is with regard to monitoring the time between two events such as:
The time between a rising edge and a falling edge of a square wave that is connected to the input capture pin of the Arduino uno atmega328.
I wish to set up the micro to trigger upon a falling edge and thereafter save the value stored in the ICR and thereafter restart the timer on the next rising edge.
I can do this in assembly easily, just having a small problem using C in the arduino environment. Newbie in the arduino field.
Any help will be appreciated.
I would like some help in setting up the registers to monitor the ICP pin for the falling edge.
thanks
Atmega 328 datasheet:
http://www.atmel.com/Images/8271s.pdf
my post today is with regard to monitoring the time between two events such as:
The time between a rising edge and a falling edge of a square wave that is connected to the input capture pin of the Arduino uno atmega328.
I wish to set up the micro to trigger upon a falling edge and thereafter save the value stored in the ICR and thereafter restart the timer on the next rising edge.
I can do this in assembly easily, just having a small problem using C in the arduino environment. Newbie in the arduino field.
Any help will be appreciated.
I would like some help in setting up the registers to monitor the ICP pin for the falling edge.
thanks
Atmega 328 datasheet:
http://www.atmel.com/Images/8271s.pdf