Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Frequency detection

Status
Not open for further replies.

Nile_Team

New Member
hey guys anyone can help me in detecting the frequency of an analog signal coming from a guitar and inputed to a PIC16F877A microcontroller ?

thanx
 
Forgive me Nigel, but, references to EPE articles are useless unless you have an EPE subscription...

Kind regards, Mike
 
Nile_Team said:
hey guys anyone can help me in detecting the frequency of an analog signal coming from a guitar and inputed to a PIC16F877A microcontroller ?

thanx
has multiple freq, i don't think877 can handle that much. u may need a fast dsp chip / oscilloscope.

BTW , what's ur aim.?
 
Mike said:
Forgive me Nigel, but, references to EPE articles are useless unless you have an EPE subscription...

You can download all the software free from the EPE website, and many of the PDF magazines have been posted on the net by people! - although this does tend to be variable!. Also, many people have the magazines, and often will send him a scan of the article.

But the main point is to find out what he really wants, it was a bit vague?.
 
You need to make (or get a hold of) a digital PLL. A digital PLL has 2 inputs and 1 output (I'm excluding uncommon features).

You need to make an audio amplifier, and use the speaker as an input, then connect the output of the amplifier to a VU meter circuit. You can find one at talkingelectronics.com.

When you done that, you made a color organ.

Now instead of an LED, connect the color organ's output to any input of a digital PLL.

Create an oscillator circuit, and make it's frequency something you will use. You may want to replace a resistor with a potentiometer so you can fine-tune the frequency. Connect the output of the oscillator to the 2nd input of the same digital PLL.

Now depending on how the PLL is made, the TRUE (logic high) output will either indicate that the two frequencies are the same, or they are different. You can easily add an inverter to change that.
Then you can connect the output to an input of the PIC.

In your PIC microcontroller, you need to write a program that detects when the pin that the output is connected to is the state you want it to be.

Nigel has a ton of information about programming a PIC, so he can help you on that if you need it.
 
hey guys thanx for all the suggestions. I cwas able to find a way to catch the signal & that was by the following:

1st: reset TMR0
2nd: when the signal is zero valued (analog signal) a timer is on, & when the signal is again zero the timer is off & this way i ll catch the period of the signal.

now the next problem i am having is how to represent a floating point number using binary representation.

Any suggestions !!!

Thanx
 
floating point numbers can be written to a string using "sprintf".
But there is a slight sacrifice of accuracy there.
Is this what you want?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top