Rough 'n Ready Audio Frequency extraction with a PIC


Results 1 to 34 of 34

Threaded View

  1. #9
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Well that sure does look clean! For your rough and ready approach, how about a simple count command like this:

    COUNT PORTB.1,100,W1

    That will count pulses during a 100ms period. Other way to do it for more accuracy is interrupts. But as you say, you just are going to do a lookup table.

    Edit:
    For the accuracy you need between D and D# etc, you would need to sample for 1 second using this method. If that's too long, you would have to go with interrupts, and measure time between pulses. Another quick and dirty try might be pulsin? Not sure how well that would work on an analog signal though. Maybe you could average a few...
    Last edited by ScaleRobotics; - 7th March 2010 at 18:37.

Similar Threads

  1. Measuring change of frequency with PIC
    By Aussie in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 19th July 2007, 02:47
  2. PIC Audio
    By toofastdave in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 27th June 2007, 14:49
  3. Pic driven digital audio delay
    By skimask in forum Off Topic
    Replies: 12
    Last Post: - 19th April 2007, 21:42
  4. Audio Encoding and playback in a PIC
    By Rob in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 24th March 2005, 09:56
  5. Frequency Counter using PIC and PicBasic
    By PICtron in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 28th January 2005, 07:20

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts