Settings for pulse width modulation


+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807

    Default Settings for pulse width modulation

    How can one calculate the values to place in PR2 and select the proper pre and post scale for timer2 when setting for a PWM output?

    Seems a bit confusing to me how to set a 12f617 chip to output pwm on GP2 pin.

    Thanks
    Last edited by Ioannis; - 28th September 2023 at 16:26.

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,389


    Did you find this post helpful? Yes | No

    Default Re: Settings for pulse width modulation

    Warning I'm not a teacher

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default Re: Settings for pulse width modulation

    Yes it does. Thanks,

    Ioannis

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    1 out of 1 members found this post helpful. Did you find this post helpful? Yes | No

    Default Re: Settings for pulse width modulation

    Anyone interested here is a tool in Excel to calculate the PR2 register and the CCP register value.

    If any of these two values are greater than 255 and 1023, the cell turns yellow with red bold font.

    As usual, remove .txt from the file name to make it open with Excel.

    Ioannis

    PWM Calculations.xlsx.txt

Similar Threads

  1. Measuring pulse width using ccp
    By abofar in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 15th April 2012, 20:13
  2. measure pulse width 0-150Hz
    By kewetman in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 15th November 2007, 21:38
  3. Pulse width modulation
    By manxman in forum General
    Replies: 2
    Last Post: - 2nd March 2006, 12:06
  4. pulse width modulation
    By cheznez in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 16th February 2005, 17:14
  5. Pulse Width Measurement
    By atomski in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 29th January 2005, 00:53

Members who have read this thread : 10

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