Go Down

Topic: Measurement Frequency by arduino Due (Read 784 times) previous topic - next topic

Hadis

This is my code:

Magician

Briefly looking through your code,  your approach is better for measuring a period. No wander you have an error, that 'd only rise up at higher range. Check this blog: http://coolarduino.blogspot.ca/2015/06/frequency-counter-for-arduino-due.html
http://coolarduino.blogspot.ca

Hadis

Thank you Magician
but when i was compile this code show this error:
New_arduino_due_frequency_measurement.ino: In function 'void Atmr_setup()':
New_arduino_due_frequency_measurement.ino:60:14: error: 'TMR_CNTR' was not declared in this scope
why?

Magician

You should download an arduino sketch via link at the end, code posted on a web is reduced / simplified for presentation
http://coolarduino.blogspot.ca

Hadis

#19
Jun 17, 2015, 04:02 pm Last Edit: Jun 17, 2015, 04:13 pm by Hadis
Thank you! :)
Is this program measuring amplitude?
I see to connect digital 2 pin to analog 7 pin?

Magician

Thank you! :)
Is this program measuring amplitude?
I see to connect digital 2 pin to analog 7 pin?

No, it doesn't measure amplitude, only freq. of logic signal, where "0" - below 1.3V and "1" - above 1.5V approximately.
Put jumper wire from pin D2 to A7
http://coolarduino.blogspot.ca

Go Up