Trying to get that setup working too, PIC18F14K50 and these:
However I'm having a hard time to get a smooth PWM output that is not perturbed by the DoUSBSERVICE routine... So far the best results I got is by inserting INT_DISABLE USB_INT / INT_ENABLE USB_INT into the SPWMhandler, however the output still flicker quite a bit. I also tried to turn USB_INT into a lower priority interrupt but that doesn't work (the PIC does crash).Code:INCLUDE "cdc_desc.bas" INCLUDE "DT_INTS-18.bas" INCLUDE "ReEnterPBP-18.bas" INCLUDE "SPWM_INT.bas" INCLUDE "USB_ASM_Service.pbp" ASM ;----[High Priority Interrupts]------------------------- INT_LIST macro ; IntSource, Label, Type, ResetFlag? INT_Handler INT0_INT, _ButtonPressed, PBP, Yes INT_Handler TMR1_INT, SPWMhandler, ASM, yes INT_Handler USB_INT, _DoUSBSERVICE, PBP, yes endm INT_CREATE ; Creates the High Priority interrupt processor ENDASM
Is there a particular solution to make them work together? any hint on this would be greatly appreciated.






Bookmarks