/* ADC Special Event Trigger Configuration Example */ SEVTCMP = 1248; /* Special Event Trigger value set at ~25% of period value (4999)*/ PTCONbits.SEVTPS = 0; /* Special Event Trigger output postscaler set to 1:1 selection (trigger generated every PWM cycle */ PTCONbits.SEIEN = 0; /* Special event interrupt is disabled */ while (PTCONbits.SESTAT == 0); /* Wait for special event status change */