Anytime you are using interrupts (other than ON INTERRUPT), it interrupts things.
USB_ASM_Service uses USB interrupts that happen quite frequently.
Software timed routines like SEROUT2, PAUSE, PULSIN/OUT etc. Will lose time that they don't know about.
When using interrupts, Hardware devices should be use instead of software commands.
Instead of SEROUT2, use HSEROUT with the USART.
PAUSE ... use a timer.
PULSIN ... use a CCP module.
COUNT ... use a Timer
There are still many PBP commands you can use without problems.
But, if if they require specific timing thru software, that timing will be disturbed.
Bookmarks