18F2331 Advanced PWM Questions


Closed Thread
Results 1 to 4 of 4
  1. #1
    JDM160's Avatar
    JDM160 Guest

    Default 18F2331 Advanced PWM Questions

    I am using a PIC 18F2331 and I'm trying to utilize the Power Control PWM module which has three independent PWM generators.

    I need to be able to update the duty cycle of each PWM generator on the fly while running in free running mode (where the PWM output remains the same until a new duty cycle is given).

    I am very new to this realm of bits, bytes and all, but somehow I have been writing successful intricate programs on the 12F series PICs. Anyhow, I digress.

    Can someone please help me with the proper configuration lines for PIC BASIC PRO. I am having a hard time understanding exactly how to implement or issue the duty cycle to the PWM module.

    The duty cycle registers have 14-bit resolution (???) PDC0 through PDC3. The datasheet is fairly vague (at least at my level of understanding) as to what command line must be issued and in what format to change or issue a duty cycle AND what range of numbers correspond to 0% to 100%.

    The Pic BASIC Pro PWM and HPWM commands are useless for my application so please don't bother mentioning them. I need the PWM module to run independently of the code, and HPWM does not support more than 3 PWM modules (only the CCP channels).

    I appreciate your help very much in advance...

  2. #2
    JDM160's Avatar
    JDM160 Guest


    Did you find this post helpful? Yes | No

    Default

    I believe I was making things harder on myself by choosing the wrong chip for my applicaton. I found some 16Fxxx chips that have 3 ccp pwm modules - which is what I needed to search for in the first place. This way I can use the HPWM effectively.

    If anyone cares to reply to my origonal thread I would still appreciate it very much as I'm really trying to get a grip on this stuff.

    Thanks all!!

  3. #3
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Some details please

    Hi there,

    I need to know the following details

    1. PIC used

    2. Clock Frequency

    3. Intended PWM frequency (or range)

    4. Dead time needed or not

    And some detail of the actual application.


    Regards

    Sougata

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


    Did you find this post helpful? Yes | No

    Default Power Control PWM

    Quote Originally Posted by JDM160 View Post
    I am using a PIC 18F2331 and I'm trying to utilize the Power Control PWM module which has three independent PWM generators.
    A bit late for you, but if anyone else has the same question, Bruce has an example here: http://www.picbasic.co.uk/forum/show...3820#post43820 and ther is a wiki here: http://www.picbasic.co.uk/forum/cont...-DT-interrupts
    Last edited by ScaleRobotics; - 24th July 2010 at 23:13.

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: Vernacular/Function (Newbee)
    By TerryN in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 3rd July 2008, 16:58
  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 : 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