Pwm & dac


Closed Thread
Results 1 to 9 of 9

Thread: Pwm & dac

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Pinckney, Michigan
    Posts
    91

    Default Pwm & dac

    I posted a message yesterday, but it never showed up, so I am posting again. Forgive me if two posts eventually appear.

    I have purchased the latest version of PBP to take advantage of some of the newer generation PIC parts, namely the 16F1827, in which I need multiple simultaneous PWM frequencies, and DAC.

    Surprisingly, searching for "PWM" and "DAC" turned up no hits on either phrase! I did a search on "16F1827" and got some hits, in which I learned some valable tips on configuring the compiler for this part. Thank you for those posts.

    While waiting for my compiler to arrive by mail, can anyone direct me to posts discussing the configuration for two simultaneous discrete PWM frequencies and DAC?

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


    Did you find this post helpful? Yes | No

    Default

    This forum has a minimum of 4 characters for its searches. But you can get around that with a google search of the site: http://www.picbasic.co.uk/forum/cont...-for-the-Forum

    When you say 2 discrete PWM frequencies, do you really mean sinewave, or just 2 discrete PWM periods? I see page 229 of the datasheet lets you select timer 2,4 or 6 for each of the CCPx pins. Bruce has a DSM example which includes single PWM here: http://www.picbasic.co.uk/forum/show...4268#post84268 using timer2 and PR2. You could use some of the basic PWM code from his example (he's got it mixing pins and such), and set up another with timer4 and PR4.
    Last edited by ScaleRobotics; - 22nd October 2010 at 16:55.
    http://www.scalerobotics.com

  3. #3
    Join Date
    Oct 2005
    Location
    Pinckney, Michigan
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    4 char min search, huh? That explains that!

    I don't need sinewaves at all, although that would also work. I really just need just two different simultaneous 50% duty cycle frequencies. As well as DAC, ADC and a little GPIO.

    I'll check out Bruces' post.

  4. #4
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    What are the frequencies, please?

  5. #5
    Join Date
    Oct 2005
    Location
    Pinckney, Michigan
    Posts
    91


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Mike, K8LH View Post
    What are the frequencies, please?
    400Hz, 900Hz, 1600Hz. Only two need to be on at any given time.

    I also need to make 1.2Hz through 20Hz (Hz not KHz), for amplitude modulation, which I will do with the DAC.

  6. #6
    Join Date
    Aug 2005
    Location
    Michigan, USA
    Posts
    224


    Did you find this post helpful? Yes | No

    Default

    Is the 1.0 to 20.0 Hz signal also a 50% duty cycle square wave? And would it need to be on at the same time as the other two signals?

    Mike

    <added>

    Sorry! Just noticed you said 1.0 to 20.0 Hz signal was going to D/A. So, is that a sine wave output?
    Last edited by Mike, K8LH; - 23rd October 2010 at 15:09.

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    A little about HPWM for a different chip. DAC.....nothing.
    http://www.picbasic.co.uk/forum/showthread.php?t=4672
    Dave
    Always wear safety glasses while programming.

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