PWM setting PIC16F887


Closed Thread
Results 1 to 7 of 7

Hybrid View

  1. #1
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Gevo View Post
    Hello,
    I work on a application and need two hardware PWM outputs. One PWM (CCP1) to
    control a DC motordriver LMD18200 (10 Khz) and one PWM (CCP2) for IR comm (38KHz)
    The motor is still running, but runs on 1 KHZ. (I need 10KHz or maybe the same 38KHz as the IR Comm.)
    ---
    Might help you out...
    http://www.mister-e.org/pages/utilitiespag.html

  2. #2
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    You can have different duty-cycles, but the frequency will be the same on both CCP1 & CCP2 since they both use the PR2 register of TIMER2 for the PWM period.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Bruce View Post
    You can have different duty-cycles, but the frequency will be the same on both CCP1 & CCP2 since they both use the PR2 register of TIMER2 for the PWM period.
    Hey...good point...Duh on my part...
    Set up a 555 timer for a 50% 38Khz square and turn it on/off with a PIC pin, or use a 2nd PIC set up for the same thing as the 555. An 8-pin PIC makes a helluva useful 555 timer....with a load of options...

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405


    Did you find this post helpful? Yes | No

    Default

    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. Half-bridge PWM with a 16F684 ?
    By Byte_Butcher in forum General
    Replies: 7
    Last Post: - 17th January 2010, 22:18
  2. PICKit2 - warning about configuration words
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 26
    Last Post: - 4th August 2009, 14:01
  3. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 06:03
  4. PWM 'channels ...what's that all about then!
    By HankMcSpank in forum General
    Replies: 5
    Last Post: - 23rd April 2009, 16:49
  5. Tidying Up PWM Routine
    By Tissy in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 21st February 2005, 00:26

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