You could use an op amp and run it open loop. Anything greater than the offset voltage will cause it to switch. Regards, Jim > -------- Original Message -------- > Subject: Re: [EE] Detecting frequency from a single audio source > (guitar) > From: V G > Date: Sun, April 08, 2012 9:38 am > To: "Microcontroller discussion list - Public." >=20 >=20 > On Sat, Apr 7, 2012 at 7:36 PM, Sergey Dryga wrote: >=20 > > Getting a clean pulse: use comparator, it will give you a clean digita= l > > signal. > > It's possible to use a comparator in a PIC and do processing using the > > same PIC. > > > > Extracting frequency is more problematic, but can be done in e.g. dsPIC= , as > > others suggested. If you need to detect a specific frequency, LM565 > > phase-locked loop is good for audio frequencies. > > >=20 >=20 > I was thinking about the comparator, but since the amplitude of the signa= l > gradually falls over a period of a few seconds, how would I constantly > follow and update the cutoff? > --=20 > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .