Re: IOC works on B0 but not B5
you seem to have disabled the PPS for pins B0 and B5 without allocating something to them
the power on default state for RxyPPS regs is 0 ie pin is assigned to be gpio
so
RB0PPS = 0 assigned to pin RB0 TO be a gpio pin [which it already was ]
none of this serves any worthwhile purpose if you do the pbp3 HPWM defines correctly
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)
Warning I'm not a teacher
Bookmarks