A PB switch is connected to the external interrupt pin INT of the pic microcontroller and eight LEDs are connected to PORT C. Whenever the button is pressed, the microcontroller is interrupted and ISR is executed. The ISR toggles the LEDs connected to PORTC for 0.5 second.
Note: Use TIMER 1 to generate delay of 0.5 second. Use 100ms delay routine with needed overflows to generate delay of 0.5 seconds. Use TIMER 1 delay program in a function and call function to generate delay.