I had to migrate to MPLABX now using the later Pic's that allow designating any output for PWM.
An odd occurrence occurs
If I allow the PWM5CON instruction to compile, the PGM appears to halt there, IOW the DetPWMpin routine is not reached.
I proved it out by setting LEDs if it gets past the PWM5 instruction.
It is not a conditional instruction, so any ideas?
An odd occurrence occurs
If I allow the PWM5CON instruction to compile, the PGM appears to halt there, IOW the DetPWMpin routine is not reached.
I proved it out by setting LEDs if it gets past the PWM5 instruction.
It is not a conditional instruction, so any ideas?
Code:
; banksel PWM5CON ; Set bank
; bsf PWM5CON,PWM5EN ; Enable the PWM5 module,PWM SET
DetPWMpin ;set current PWM output
btfsc BackupLAT, 0 ;CurrentLAT,0
goto PWM_RA0 ;SETRA0 PWM
btfsc BackupLAT,1 ;CurrentLAT,1
goto PWM_RA1 ;SETRA1 PWM
btfsc BackupLAT,2 ;CurrentLAT,2
goto PWM_RA2 SETRA2 PWM