18F2431 PCPWM Module Advice


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    166

    Default 18F2431 PCPWM Module Advice

    Hi All,

    Has anyone played with the Power Control PWM (PCPWM) module on a 18F2431?
    I am working towards a program to run a 1500W 180Vdc treadmill motor with bi-directional control using high voltage MOSFET's in H-bridge configuration. From what I have read of the datasheet so far, the '2431 should be able to do it, no problems.

    Any hints or tips from previous success stories would be greatly appreciated.

    Cheers
    Barry
    VK2XBP

  2. #2
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default Re: 18F2431 PCPWM Module Advice

    There are some great examples in this forum.

    Use search box.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  3. #3
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    166


    Did you find this post helpful? Yes | No

    Default Re: 18F2431 PCPWM Module Advice

    Thanks Sayzer.

    I thought I had searched and found just about everything on the forum regarding this device.
    I searched again (different search) and found more - specifically related to PCPWM function from Bruce.

    Once again I return my "Newbie Crown" to my head...

    Cheers
    Barry
    VK2XBP

  4. #4
    Join Date
    Feb 2008
    Location
    Michigan, USA
    Posts
    231


    Did you find this post helpful? Yes | No

    Default Re: 18F2431 PCPWM Module Advice

    Here is another and a link from there:

    I had the same problem finding help with the PCPWM
    http://www.picbasic.co.uk/forum/showthread.php?t=16647

    Bo

  5. #5
    Join Date
    Jan 2011
    Location
    Sydney, Australia
    Posts
    166


    Did you find this post helpful? Yes | No

    Default Re: 18F2431 PCPWM Module Advice

    Hi All,

    Just a quick update on my project.
    As stated in my initial post, I am working towards a program to run a 1500W 180Vdc treadmill motor with bi-directional control using high voltage MOSFET's in H-bridge configuration. I am pleased to advise that I have successfully coded my '2431 to give forward, reverse and stop functions to the H-bridge via three momentary action switches using INTx interrupts (Darrels DT_INTS-18 rountines). PWM frequency is set to just under 8kHz and the duty cycle is varied by reading a pot setting via A/D. I can adjust dead time control as required - currently set at 1uS.

    As for the hardware, I have made the power board PCB but it still needs to be drilled, populated and tested. For the time being, I will continue my PIC development using the breadboard. Interface to the powerboard should be pretty straight forward.

    Lots more to do but I am progressing well and learning heaps

    I will post some pictures, scope captures and code snippets once I get the hardware up and running.

    Cheers
    Barry
    VK2XBP

  6. #6
    embsysdev's Avatar
    embsysdev Guest


    Did you find this post helpful? Yes | No

    Default Re: 18F2431 PCPWM Module Advice

    I hope it is ok to append to this thread,rather than start a new one for a similar issue.
    I am trying to use the PCPWM module in my 18F2431.The PIC is clocked at 20MHz.I am able to set up the frequency I need correctly (50Hz;20mS).I am unable to calculate the duty cycle.Assuming a 12bit resolution,I set , for a 25% duty cycle:
    PDC0L=0x00;
    PDC0H=0x04;
    This gives me 3mS not 5mS. Extrapolating from this, I understand am getting a resolution of 12 ~ 13 bits resolution.I read the other thread referenced in this one,but I could not find any ideas.Is there anyway to know how to calculate the duty cycle,or resolution of the PWM exactly ?
    I would post my code but it is in C . I hope I can get some suggestions,since there are quite a few experts for 18F2431 here.

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