HPWM10 Frequency Updating


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    I'd like to be able to explain the search engines..... but I can't.

    Good thing there's People around.

    https://www.picbasic.co.uk/forum/showthread.php?p=37805
    <br>
    DT

  2. #2
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    The code that I posted does a 10bit HPWM.
    Charles Linquist

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Charles Linquis View Post
    The code that I posted does a 10bit HPWM.
    Glitch Free to 500khz ?

    Yeah, mine neither.
    <br>
    DT

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    A PIC can't do 10 bit PWM to 500Khz, since it would need a counter running at 500KHz * 1024 = 512MHz.
    Charles Linquist

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Charles Linquis View Post
    A PIC can't do 10 bit PWM to 500Khz, since it would need a counter running at 500KHz * 1024 = 512MHz.
    Absolutely Correct!
    As the frequency increases, the resolution decreases.

    Follow that all the way to the highest frequency, and with OSC=16, you should have 2mhz PWM at 1-bit resolution (essentially on or off).

    @ 500 khz, you should have 4-bits. And if all you ever want is 50% dutycycle, then it's a piece of cake.
    <br>
    DT

  6. #6


    Did you find this post helpful? Yes | No

    Default 10 bit HPWM at 32767 Hz

    Hi Darrel & Charles.

    I need 50% duty cycle at 32767 Hz on CCP2 to drive an Intersema pressure sensor - easy - even I can do that with 8 bit HPWM.

    I also need a variable duty cycle to drive an AGC circuit. With 8 bit HPWM, my AGC is sudden death and one count goes from not quite enough to a little bit too much. 10 bit HPWM would be much less sensitive. The frequency must stay at 32767 Hz to suit the Intersema sensor.

    Can I get 10 bit HPWM at 32767 Hz?

    Cheers
    Brian
    Last edited by BrianT; - 8th January 2008 at 10:20.

  7. #7
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    As long as your OSC is 20 or more, then Yes.
    @ 4mhz OSC you only get 8-bit resolution with that freq.

    HPWM10 should work fine with it.
    <br>
    DT

Similar Threads

  1. Advice on frequency measurement to 30MHz
    By Andy Wood in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th March 2009, 05:23
  2. HPWM command and oscillator frequency
    By RussMartin in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th March 2009, 23:41
  3. inaccurate frequency using TMR1 PI18F452
    By nkarpovich in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 14th October 2006, 17:22
  4. frequency measurement
    By big-x in forum General
    Replies: 2
    Last Post: - 25th November 2005, 01:53
  5. Low frequency output
    By barkerben in forum General
    Replies: 5
    Last Post: - 16th November 2004, 16:25

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