Sinewaves using interrupts.


Results 1 to 26 of 26

Threaded View

  1. #1
    Join Date
    Mar 2009
    Posts
    653

    Default Sinewaves using interrupts.

    I'm looking at scalerobotics (thanks Walter!) funky article wrt generating sine waves using DT's interrupts (in my nerdy-esque secret world - this has popped into "No1 slot" in my interest table!)

    I (think) I've grasped the concept - we're using timer1 to generate a precise interrupt ...at each interrupt, read a preset value from an array & this value is used to control a PWM stream, which if put through the correct filter, will produce a sine wave (have I got that bit right?)

    How granular do you think it's possible to go with the frequency - let's say if generating frequencies between 80Hz & 5Khz? (eg one decimal point, two decimal points ....no decimal points!)

    Also, I'm no filter expert...but what bandwidth can you get away with when using just the one simple RC filter? (ie max range of frequencies, again say starting at 80Hz)

    Also, if wantng to phase shift (vs an incoming signal) how granular could the phase shift 'steps' be?

    What I'm possibly thinking of doing, is to extract the frequency from an incoming guitar signal, then 'PIC generate' other sine wave frequencies from it (eg double the incoming guitar frequency) - but for maximum sonic flexibility, I have an intended use that rather than change the incoming frequency, (ie generate the same PIC generated sine frequency as the incoming guitar note), only shift the phase vs the original incoming signal.......do-able, or is this getting too taxing for a PIC?

    thanks!
    Last edited by HankMcSpank; - 2nd September 2010 at 11:31.

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