• AVR Freaks

independent use of all PWM signals on PIC18F4550

Author
vra
Starting Member
  • Total Posts : 53
  • Reward points : 0
  • Joined: 2014/07/14 18:35:19
  • Location: 0
  • Status: offline
2019/07/12 11:01:47 (permalink)
0

independent use of all PWM signals on PIC18F4550

Hi, how are you?.
 
I'm trying to use separately all the PWMs on the PIC18F4550 but I don't know if that is possible, the datasheet refers to three modes of operation but two of them are for half bridge control and full bridge control of a DC motor.
 
The single output mode will be de one that I'm interested but only if I can control each PWM output separately, can I do it?.
#1

11 Replies Related Threads

    ric
    Super Member
    • Total Posts : 22652
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: independent use of all PWM signals on PIC18F4550 2019/07/12 14:47:44 (permalink)
    0
    No.
    You have two CCP channels, so only two "independent" outputs.
    The PIC18F4550 is ancient. You'll need to look at much more recent chips to get more powerful PWM capabilities.

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #2
    vra
    Starting Member
    • Total Posts : 53
    • Reward points : 0
    • Joined: 2014/07/14 18:35:19
    • Location: 0
    • Status: offline
    Re: independent use of all PWM signals on PIC18F4550 2019/07/12 15:25:38 (permalink)
    0
    ric
    No.You have two CCP channels, so only two "independent" outputs.The PIC18F4550 is ancient. You'll need to look at much more recent chips to get more powerful PWM capabilities.


    Yes, In know that is ancient and I have more recent PICs but I don't have the programmer my newest microcontrollers.

    Thank you Ric.
    #3
    NKurzman
    A Guy on the Net
    • Total Posts : 17485
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: independent use of all PWM signals on PIC18F4550 2019/07/12 16:01:42 (permalink)
    0
    What Programmer do you have?
    #4
    jtemples
    عُضْوٌ جَدِيد
    • Total Posts : 11208
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: independent use of all PWM signals on PIC18F4550 2019/07/12 16:39:56 (permalink)
    +1 (1)
    Since your PIC only has one even-numbered timer, all of the PWMs have the same time source, meaning they are all at the same frequency.  The only thing you can vary between them is the duty cycle.
    #5
    vra
    Starting Member
    • Total Posts : 53
    • Reward points : 0
    • Joined: 2014/07/14 18:35:19
    • Location: 0
    • Status: offline
    Re: independent use of all PWM signals on PIC18F4550 2019/07/12 17:44:16 (permalink)
    0
    A pickit 2
    #6
    vra
    Starting Member
    • Total Posts : 53
    • Reward points : 0
    • Joined: 2014/07/14 18:35:19
    • Location: 0
    • Status: offline
    Re: independent use of all PWM signals on PIC18F4550 2019/07/12 17:46:23 (permalink)
    0
    jtemples
    Since your PIC only has one even-numbered timer, all of the PWMs have the same time source, meaning they are all at the same frequency.  The only thing you can vary between them is the duty cycle.
    OK thank you, I've just wanted to know if there was some way to start each PWM on different times independently
    #7
    ric
    Super Member
    • Total Posts : 22652
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: independent use of all PWM signals on PIC18F4550 2019/07/12 17:49:06 (permalink)
    0
    Valery
    jtemples
    Since your PIC only has one even-numbered timer, all of the PWMs have the same time source, meaning they are all at the same frequency.  The only thing you can vary between them is the duty cycle.
    OK thank you, I've just wanted to know if there was some way to start each PWM on different times independently

    No. As jtemples said, both PWMs (in that PIC) are based on TMR2, so they cannot start independently.
    post edited by ric - 2019/07/12 17:58:05

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #8
    vra
    Starting Member
    • Total Posts : 53
    • Reward points : 0
    • Joined: 2014/07/14 18:35:19
    • Location: 0
    • Status: offline
    Re: independent use of all PWM signals on PIC18F4550 2019/07/12 18:04:03 (permalink)
    0
    Well, thanks
    #9
    jtemples
    عُضْوٌ جَدِيد
    • Total Posts : 11208
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: independent use of all PWM signals on PIC18F4550 2019/07/12 18:16:27 (permalink)
    0
    if there was some way to start each PWM on different times independently

     
    I'm not sure what you mean by that.  You can turn the two PWMs on and off independently if that's what you're asking.
    #10
    ric
    Super Member
    • Total Posts : 22652
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: independent use of all PWM signals on PIC18F4550 2019/07/12 18:26:22 (permalink)
    0
    I think he means the start of the pulse, which would require a seperete timer.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #11
    mpgmike
    Super Member
    • Total Posts : 175
    • Reward points : 0
    • Joined: 2014/01/23 17:27:06
    • Location: NJ
    • Status: offline
    Re: independent use of all PWM signals on PIC18F4550 2019/07/12 20:57:32 (permalink)
    0
    Valery
    A pickit 2

    The new Snap programmer is under $20 (US).  If you can't afford that,.......

    I don't need the world to know my name, but I want to live a life so all my great-grandchildren proudly remember me.
    #12
    Jump to:
    © 2019 APG vNext Commercial Version 4.5