I have a potential use for an analog comparator. I noiticed the atmel 328 has an analog comparator built in and i was wondering how much time it would take to initiate an analog comparator vice an analog read? An analog read would be too slow.
Too slow for what ?
I have heard the arduino has a resolution down to about 4 us, but analog read takes about 100 us. I was just wondering how much time it takes to initiate an analog comparator inturupt. Simply put it is a 1 bit ADC. Why should I have to wait for 9 others? Where would I find this info without some oscilloscope.
bronco9588:
Where would I find this info without some oscilloscope.
In some datasheet. You can find a link to the October 2009 version on the Arduino Uno's product page. If you'd like a more detailed response, please provide a more detailed description of your purpose. It takes a long time to guess the things you might want to do, and then write something to address them all. It goes faster if you just tell us.
read this one - http://www.gammon.com.au/forum/?id=11916 - ?
I am trying to take two identical analog signals and measure the time difference between them. I think an analog comparator and counting a timer is the most simplistic way to accomplish this...
It's disputable, all depends on your perception of analog signals. If signals "digital" by nature (like small spike, pulses short in duration), only small in magnitude, and you need a comparator just to simplify amplification circuitry which would be necessary to drive INT0 or INT1 pin directly.
And it's not clear how you can complete a task, arduino has only one comparator.
In case a normal "analog" - (like noise, there is no obvious distinctive marks), than you better to digitize inputs by ADC, and compare a phases of two data pulls. Here is an example:
http://coolarduino.wordpress.com/2012/10/01/sound-localization/
bronco9588:
I am trying to take two identical analog signals and measure the time difference between them.
Not much to go on.
Are you trying to measure the time between two events, or are you trying to learn something about a periodic signal?