Question: 3. Assume two LEDS (LEDI, LED2) and one switch input (SW1). Both LEDs should be initially off. After each press and release of SWI, change

3. Assume two LEDS (LEDI, LED2) and one switch input (SW1). Both LEDs should be initially off. After each press and release of SWI, change the LED state (LEDI/LED2) in the sequence: ONON, ON/OFF, OFF/ON, and then back to OFF/OFF. (a) Draw the state machine of the design that changes LED states. (b) Draw the state machine of the design that control SWI. (c) Draw the schematic diagram of the design (use PIC24HU32GP202) (d) Write the source code for the design (you may use the macros and the inline functions that you defined in question 1)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
