Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
volatile long unsigned int mSecCounter=0; // counts millisecond interrupts
/* interrupt service routine for Timer1 ISR*/
void __attribute__((__interrupt__, __shadow__)) _T1Interrupt(void)
{
int i;
/* Interrupt Service Routine code goes here */
IFS0bits.T1IF = 0; //Reset Timer1 interrupt flag
mSecCounter++;
}
mSecCounter=0;
while(mSecCounter<1000)
...; // code executed for 1 second
no, you define in one module and declare it extern in other modules that use itwhat is a variable is shared by different modules of my code. In that case also do i need to declare that variable with volatile.
thanks