guitar tuner algorithm

Thread Starter

prescott2006

Joined Nov 8, 2008
72
i wish to design a guitar tuner using pic16f84, got 3 led to indicate the frequency whether they are too high, low or ok. but i got some question about how to write the code. let say a=100hz, b=200hz, but if input frequency is 150hz, so should i light on the high led or low led? because if he is plucking A string, then should light on high led, but if he is plucking B string, then light on low led.so how should i determine?
 

Markd77

Joined Sep 7, 2009
2,806
You would either need a switch to tell the PIC what string it is or assume that the guitar is not too far out of tune and anything closer to a than b is string a. At the exact midpoint (fairly unlikely) it would be a cointoss.
 

Thread Starter

prescott2006

Joined Nov 8, 2008
72
thanks for your reply. i know can count the frequency of the signal by using tmr0 of pic16f84, but i don't know how to start. can you guide me? or show me some code to begin with..thanks in advance.
 
Top