Question: Write a code that performs the following using GPIO & Systick Interrupt: If Button 1 (PJ0) is pressed, LEDs turn ON/OFF in the following pattern:

Write a code that performs the following using GPIO & Systick Interrupt:

If Button 1 (PJ0) is pressed, LEDs turn ON/OFF in the following pattern: L1, L1 & L2, L1 & L2 & L3, L1 & L2 & L3& L4, L1 & L2 & L3, L1 & L2 , L1 .. If Button 2 (PJ1) is pressed, LEDs turn ON/OFF in the following pattern: L2 &L3, L1&L4, L2 &L3, L1&L4.

If both are released, all LEDs turn OFF.

Note: GPIO Interrupt is used to check which switch was pressed, and Systick to perform delays. Both interrupts are enabled as long as the code is running

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!