DDS (generating sine waves) with onboard DAC using latest PIC 16F chips?


Results 1 to 40 of 77

Threaded View

  1. #31
    Join Date
    Mar 2009
    Posts
    653


    Did you find this post helpful? Yes | No

    Default Re: DDS (generating sine waves) with onboard DAC using latest PIC 16F chips?

    Quote Originally Posted by scalerobotics View Post
    On a side note I see there is a future product with an 8 bit DAC. Im on my phone, so I can't tell if there is even a dataxheet out for it. Pic16f1786 is one of them.
    That's excellent input - I wasn't aware...this is the type of PIC I've been waiting for all this time (integral opamps too), seems to be a few variants, found this product brief for the 16f17822/23 ...

    http://ww1.microchip.com/downloads/e...Doc/41410B.pdf (28 pins - wish it was available in a smaller package though)

    I don't suppose you have any idea how far away these products are from being able to purchase?

    Quote Originally Posted by cncmachineguy View Post
    Hank, before you go to far let me just get some clarity for those who are a little slow at time (me). If we break this down just a little and start slow is this correct: (back to pwm)
    Across 1 cycle you need to generate different duty cycle waves for each angle of the wave?
    So if you chop the wave into 255 steps(prolly too many at higher freq), each step will have a unique duty cycle. (in practice they may not all be unique at high freq)
    The amount of time that duty is output depends on the duration of the step, which is determined by the desired freq.

    Is this correct so far?
    Yes Bert, you are correct.

    Quote Originally Posted by cncmachineguy View Post
    Assuming so, seems to me you just have nested for loop structure here. If the only job of the pic isto spit out this wave, maybe doing it as a loonnnggg program with each step coded separately will work better then the interrupt. So in essence expand the lookup table to be the next for loop in the program.

    To test all of this I would just deal with the 5k freq as the slow end seems pretty easy.

    I really hope that all made sense
    yes it made sense, & I'd considered doing such a thing, but then binned that approach because clearly every line of the code would impact the time taken to 'loop' and therefore the output frequency ...fine once you've got it squared away so to speak, but a nightmare while still trying to grasp the basics and changing the program every minute or two! (which you'll no doubt gather, that's the stage I'm at!). It's a valid approach though...and may well be the end solution (it would save the overhead of getting in/out of an interrupt).
    Last edited by HankMcSpank; - 27th August 2011 at 19:40.

Members who have read this thread : 1

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