• AVR Freaks

Hot!PIC18F24K42 @64_MHz CCP and PWM modes are not producing frequencies above 120 Hz

Author
standard user ver23.3
New Member
  • Total Posts : 3
  • Reward points : 0
  • Joined: 2020/04/22 04:41:34
  • Location: 0
  • Status: offline
2021/03/02 15:10:44 (permalink)
0

PIC18F24K42 @64_MHz CCP and PWM modes are not producing frequencies above 120 Hz

I am trying to get a pwm frequency of 16Mhz  but for some reason it is not working. The current tmr2.c file may not be set to max frequency because I was debugging.
#1

4 Replies Related Threads

    ric
    Super Member
    • Total Posts : 30244
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: PIC18F24K42 @64_MHz CCP and PWM modes are not producing frequencies above 120 Hz 2021/03/03 17:56:25 (permalink)
    0
    What do you mean by "a pwm frequency of 16Mhz " ?
    There's no way to get pulses at 16MHz, do you mean using a 16MHz clock for the PWM?
    You mention 120Hz in your subject, but not in your post.
    What exactly do you mean by "not working". How are you testing if it is working?
    It's impossible to help without these answers.
     

    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
    standard user ver23.3
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2020/04/22 04:41:34
    • Location: 0
    • Status: offline
    Re: PIC18F24K42 @64_MHz CCP and PWM modes are not producing frequencies above 120 Hz 2021/03/03 19:31:01 (permalink)
    0
    I'm running the PIC18F24K42 at 64MHz and I am running a clock at 16Mhz which is used by a pwm generator on the chip. The pwm doesn't give an output unless I am running the clock at 120Hz
    post edited by standard user ver23.3 - 2021/03/03 19:33:49
    #3
    ric
    Super Member
    • Total Posts : 30244
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: PIC18F24K42 @64_MHz CCP and PWM modes are not producing frequencies above 120 Hz 2021/03/03 19:37:16 (permalink)
    0
    I think we are talking at cross purposes, and you are referring to some MCC settings.
    It would be helpful if you could post a captiure of the MCC setting window you are using, with the settings that do, and don't work.
     

    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!
    #4
    standard user ver23.3
    New Member
    • Total Posts : 3
    • Reward points : 0
    • Joined: 2020/04/22 04:41:34
    • Location: 0
    • Status: offline
    Re: PIC18F24K42 @64_MHz CCP and PWM modes are not producing frequencies above 120 Hz 2021/03/08 14:10:03 (permalink)
    0
    I figured out my issue ccp does not reset the timer1/3/5 I only figured out how to reset timer2/4/6 using ccp output pwm. so it kept on counting the full time possible. Thanks for your time.
    #5
    Jump to:
    © 2021 APG vNext Commercial Version 4.5