SOLVED - IOC works on B0 but not B5


Results 1 to 20 of 20

Threaded View

  1. #13
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,154


    Did you find this post helpful? Yes | No

    Default Re: IOC works on B0 but not B5

    Quote Originally Posted by richard View Post
    ...

    Code:
    PinD2   CON %011010                     ' Datasheet table 13-2
    PinD3   CON %011011
    CCP3PPS = PinD2                         ' CCP3 Peripheral input selectiowm  in hpm mode the ccp modules have no input function 
    CCP4PPS = PinD3                         ' CCP4 Peripheral input selection
    
    
    PeripheralCCP3  CON %001011             ' Datasheet table 13-3         
    PeripheralCCP4  CON %001100
    RD2PPS = PeripheralCCP3                 ' Pin D2 output source selection  all done with pbp define
    RD3PPS = PeripheralCCP4                 ' Pin D3 output source selection
    
    
    RB0PPS = 0                              ' Disable CCP4 on pin B0 (moved to D3) all done with pbp define
    RB5PPS = 0                              ' Disable CCP3 on pin B5 (moved to D2)
    in hpm mode the ccp modules have no input function
    I realize that now. I had just gone through the datasheet and picked up all the registers I thought related with PPS, then tried setting them up in my I thought would swap the CCP function from pins Bx to Dx.


    EDIT: Apparently I was doing something wrong, or forgetting something altogether.

    The HPWM command may be used without these DEFINEs if you manually configure the PPS and TRIS SFRs.
    from PBP3_PPS_notes.txt in PBP3_1 folder
    Last edited by Demon; - 13th September 2024 at 16:44.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. Replies: 12
    Last Post: - 7th September 2024, 15:10
  2. Replies: 8
    Last Post: - 30th August 2024, 19:45
  3. Replies: 4
    Last Post: - 22nd March 2023, 11:32
  4. DS3231 works in one config, but does not works with other IC.
    By CuriousOne in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 3rd December 2019, 19:52

Members who have read this thread : 10

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