Question: One line codeSingle Pulse Output Setup and Interrupt Servicing ( 1 6 - Bit Mode ) Set the Output Compare 1 module for interrupts on
One line codeSingle Pulse Output Setup and Interrupt Servicing Bit ModeSet the Output Compare module for interrupts on the single pulse event and select Timer as the clock source for the compare time base.TCONSET ; Configure Timer for a prescaler of OCCON ; Turn off OC while doing setup.OCCONSET ; Configure for single pulse modeOCR ; Initialize primary Compare Register with hexOCRS ; Initialize secondary Compare Register with hexPR; Load period register with hex configure interruptIFSCLR Clear the OC interrupt flagIECSET Enable OC interruptIPCSET Set OC interrupt priority to the highest levelIPCSET Set Subpriority of OC to maximumTCONSET Enable TimerOCCONSET Enable OC ISR code for Output Compare ISR:voidISR ipl OCIntHandler void LATAINV ; toggle RAIFSCLR ; Clear the OC interrupt flag
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
