Question: Assume two LEDs (LED1 and LED2) and one switch input (SW1) are connected to PIC24 microcontroller. Both LEDs should be initially blinking. On each
Assume two LEDs (LED1 and LED2) and one switch input (SW1) are connected to PIC24 microcontroller. Both LEDs should be initially blinking. On each press AND release of SW1, alternate between terminating the blinking and resuming the blinking. You may use any of the RBn ports you wish to implement the problem. Assume switch input is a pushbutton input with internal weak pull-up of the port. You may use either Timer2 or Timer 3 for implementing periodic timer interrupt.
Step by Step Solution
3.31 Rating (151 Votes )
There are 3 Steps involved in it
Periodic interrupts can be generated very easily using an onchip timer Specific configuration details will depend on which timer is chosen Timers 0 an... View full answer
Get step-by-step solutions from verified subject matter experts
