Starting from:

$29.99

LAB 2: I/O INTERFACE, INTERRUPT FUNCTION OF ARM

1
ELEC 3300
LAB 2: I/O INTERFACE, INTERRUPT FUNCTION OF ARM
A. OBJECTIVE:
1. To familiarize yourself with the MINI-V3 Development Board.
2. To understand the basic input/output of the microcontroller.
3. To understand the difference of polling and interrupt.
B. PRE-LAB ASSIGNMENT:
1. Study the information about MINI-V3 Development Board from the course website.
2. Study the information about Fire Debugger from the course website.
3. Study the information about STM32CubeMX from the course website.
4. Study the Tutorial for LAB2, and Tutorial for CubeMX.
C. LAB SETUP DETAILS
1. Connect the Fire Debugger according to the information about Fire debugger. Make sure
that the Green LED of the Fire Debugger is ON.
2. Follow the Tutorial for CubeMX, generate a Project for Task 1 using CubeMX.
3. Follow the Tutorial for CubeMX, generate another Project for Task 2 and 3 using CubeMX.
D. EXPERIMENT
In this LAB, there are 3 tasks.
Task 1 – Generate a BINKING LED Project using CubeMX.
Task 2 – Implementation of the polling I/O
In the while(1) loop of main.c, implement a polling method that using External Key to
toggle the RGB LED in order.
Task 3 – Implementation of the interrupted I/O
In main.c, and modify the stm32f1xx_hal_gpio.c, implement an interrupt driven
method that will toggle the external LED when K1 is pressed.
E. PROCEDURE
Task 1 – Generate a BINKING LED Project using CubeMX
Follow the Tutorial of CubeMX, generate a blinking LED on PB.5.
Show your Task 1 result to TA
For Task 2 and Task 3, we will be using one RGB LED, K1 button from the MINI-V3
Development Board, one external LED and one external Key. Please refer to Tutorial for LAB2
for information.
Task 2 – Implementation of the polling I/O
In the while(1) loop of main.c, implement a polling method that using External Key to
toggle the RGB LED in order.
Show your Task 2 result to TA
2
Task 3 – Implementation of the interrupt I/O
In main.c, and modify the stm32f10x_it.c, implement an interrupt driven method that
will toggle the external LED when K1 is pressed.
Modify the function so that whenever K1 is pressed, the External LED will toggle.
Show your Task 3 result to TA
Rebuild, download the run your program. Verify that when you pressing K1, the External LED
will toggle. At the same time, your Task 2 Code should still work. (i.e. pressing the External
Key will toggle the RGB LED in order) 

More products