Rough 'n Ready Audio Frequency extraction with a PIC


Results 1 to 34 of 34

Threaded View

  1. #21
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default

    At the risk of talking to myself (first sign of madness)....

    I now have the 'framework' of code needed to detect when a frequency is stable- happy.

    What I've got issues with is my raw (frequency) input data being a bit 'jittery'. By this I mean if I dial in 100Hz on my sig gen, for every 0.5sec I get readings like this

    50 49 50 50 51 50 51 50 49 50 50 50 51 51 50 50 (it should be a steady reading of 50)

    ....& so on.

    Now for a reasding of 50, a plus or minus variance of 1 either side equates to jitter 'error' of 4% ....and this is for digital?!!!

    So my approach must be bad! (ok, so the title of the thread is rough 'n ready frequency extrcaction - but a 4% jitter erroris just too rough!)

    Now for the life of me I can't figure out why a stable clean sine wave into this chain should cause jitter ...

    Sig gen Sine Wave (ie clean & steady as a rock) ->PIC comparator->PIC comparator generates an interrupt->comparator generated interrupts are counted->tmr1 overflows & comparator interrupt 'total count' is stored

    Now I can average it out (but this will incur delay in detecting steady frequency - which is my goal) , but I'd rather get to the root of the jitter in the first place!
    Last edited by HankMcSpank; - 27th August 2010 at 10: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, 01:47
  2. PIC Audio
    By toofastdave in forum mel PIC BASIC Pro
    Replies: 28
    Last Post: - 27th June 2007, 13:49
  3. Pic driven digital audio delay
    By skimask in forum Off Topic
    Replies: 12
    Last Post: - 19th April 2007, 20:42
  4. Audio Encoding and playback in a PIC
    By Rob in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 24th March 2005, 08:56
  5. Frequency Counter using PIC and PicBasic
    By PICtron in forum mel PIC BASIC Pro
    Replies: 31
    Last Post: - 28th January 2005, 06: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