100KHz pwm


Closed Thread
Results 1 to 5 of 5

Thread: 100KHz pwm

Hybrid View

  1. #1
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305

    Default 100KHz pwm

    Hi folks, not visited the site in a while. I see this place is much more livelier!
    I'm still using old skool v2.43 and 18F1320's. I need a 100KHz pwm, but the data sheet is saying max is 30 something KHz.
    How can I get a 100KHz pwm out of a 1320, or if I cannot, what is a decent replacement part these days?

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


    Did you find this post helpful? Yes | No

    Default

    PBP's HPWM command is limited to 32767 Hz, but you can easily get 100khz (and much higher) from the CCP module.
    You just need to set the registers manually.
    DT

  3. #3
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    Not sure how to use the ccp yet - never needed to use it so far.
    Is there a ccp tutorial with pbp sample code anywhere? A quick search dosent reveil too much.

    Heads off to locate the manual.

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


    Did you find this post helpful? Yes | No

    Default

    Bruce has a good explanation here.
    It's for 38khz, but you just change the numbers for higher freqs. ...
    Using The PIC Microcontroller Hardware PWM Feature & Infrared Communications
    http://www.rentron.com/Infrared_Communication.htm
    And for easy PWM calculations ...<br>
    DT

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


    Did you find this post helpful? Yes | No

    Default

    If you look at the "special use" label about 3/4 of the way down in this program, you can see how it is done.

    http://www.picbasic.co.uk/forum/show...onitor+program
    Charles Linquist

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. Variable PWM PIC18F2431
    By trr1985 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 12th June 2009, 06:03
  3. PWM 'channels ...what's that all about then!
    By HankMcSpank in forum General
    Replies: 5
    Last Post: - 23rd April 2009, 16:49
  4. PWM setting PIC16F887
    By Gevo in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 12th June 2008, 07:24
  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 : 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