Low frequency audio level detector using PIC ADC?


Results 1 to 40 of 69

Threaded View

  1. #18
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: Low frequency audio level detector using PIC ADC?

    Quote Originally Posted by cncmachineguy View Post
    Per the errata, they have fixed it for all current stuff. So unless your supplier has old stock, you are prolly good. I didn't think to look at the date on the errata, that may shed some light on if it will work. It sounded like it will either work or not. It didn't sound like it could be interminent.

    And remember to change your ccpr values to reflect the faster clock. - unless you want to double the samples
    Thanks Bert - Actually, I think we're done here would you believe! (Bert sighs in relief!)

    I've aborted any attempt to confirm the sampling rate & have reasonable faith in our calculations! I've got the PIC Internal Oscillator running at 16 Mhz, and a special event trigger frequency of of 16Khz (ADC sample rate ), ie Timer1 matching against this....

    CCPR4H = 0
    CCPR4L = 250

    (16Mhz clock, 4Mhz Instruction = 0.00000025sec period, therefore 250 x 0.00000025 = 0.0000625 sec .....so 1/0.0000625 sec= 16Khz)

    ....I've integrated the 'peak detect' code above into the final destination main loop - I've scoped a pin toggling within my my main loop @50khz which means it's looping at 100khz (so plenty of time to do other stuff in the main loop if I so desire). I don't use any interrupts except for switch presses,...and when a switch is pressed, I'm not worried about losing ADC samples.

    ...just connected it up to my guitar (vs the sig gen I've been testing with)....it's working as expected

    A *very* happy Hank...thanks for all your input.
    Last edited by HankMcSpank; - 24th February 2011 at 23:46.

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