• AVR Freaks

Hot!PIC32MM CCP3 Module - Refusal to Play Ball

Author
acharnley
Super Member
  • Total Posts : 629
  • Reward points : 0
  • Joined: 2016/05/01 06:51:28
  • Location: 0
  • Status: offline
2017/10/15 13:59:43 (permalink)
0

PIC32MM CCP3 Module - Refusal to Play Ball

Hi All,

I'm using the 3 MCCP's for PWM output. Number 1 & 2 are working correctly, with PMW output on the OCMxA pins. Unfortunately CCP3 gives out a persistent voltage, as if the duty is 100%, thus CCP3RB appears to be ignored. If I toggle the module OFF the output goes back to ground so I do know the module is controlling the pin.


I've scoured the datasheet for any particular settings related only to CCP3 but unless I've missed something it's identical to the others.
 

CCP3CON1 = 0;
CCP3CON1bits.MOD = 0b0101; // Dual edge compare mode, buffered
CCP3CON1bits.TMRPS = 0b0; //2bits (1:1,1:4,1:16,1:64)
CCP3CON2bits.OCAEN = 1; // pin output
CCP3PR = 239; // pwm period
CCP3RB = 100; // high point
CCP3CON1bits.ON = 1;

 
Regards, Andrew
#1

3 Replies Related Threads

    acharnley
    Super Member
    • Total Posts : 629
    • Reward points : 0
    • Joined: 2016/05/01 06:51:28
    • Location: 0
    • Status: offline
    Re: PIC32MM CCP3 Module - Refusal to Play Ball 2017/10/16 11:58:18 (permalink)
    0
    Sorted, the MCCP3 module is kaput. I've switched to SCCP4 and have correct behaviour.
    #2
    Eng. Daniel D. Albino
    Engineer
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2019/02/28 10:17:53
    • Location: 0
    • Status: offline
    Re: PIC32MM CCP3 Module - Refusal to Play Ball 2021/03/03 17:04:43 (permalink)
    0
    I broke my head with this here, I even changed my pic of the curiosity board thinking it was a pin problem ... but it was described in the errata:
    "MCCP OCM3A Output 4. The OCM3A output for MCCP3 is not functional."
    #3
    ric
    Super Member
    • Total Posts : 30244
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: PIC32MM CCP3 Module - Refusal to Play Ball 2021/03/03 17:22:42 (permalink)
    4 (1)
    Made your post readable by removing the code tags.
    eng_daniel
    I broke my head with this here, I even changed my pic of the curiosity board thinking it was a pin problem ... but it was described in the errata:
    "MCCP OCM3A Output 4. The OCM3A output for MCCP3 is not functional."




    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
    Jump to:
    © 2021 APG vNext Commercial Version 4.5