You are on page 1of 1

EE 333 Microprocessors and Embedded Systems lab

LAB 08
ARM embedded programming

Instructions:
● To submit your work:
First:Right-click on the project > Export> General >Archive File> Save the
file in zip format with <yourRollNumber>_LAB8.zip as the file name.
Second: Upload the zip file created in the previous step

Experiments to be done on the STM board. [20 marks]

Implement the following using external interrupts (Button press should trigger
an interrupt and perform the required task. This should be configured for both
user button and external push button)

1. Design a 3 bit Up-Down counter. The user button B1 is your reference for the
count. When it is pressed, the count should be increased/decreased by 1 depending
on the type of the counter selected. To reset the counter, B1 should be long
pressed(Held for 3s). There should be an enable signal(Only if it is high, the
counter should count otherwise it should reset to 0).
Use the 3 on-board LEDs to display the value of the counter (take LD3 as the
MSB).
Use an external push button to select the type of the counter. Everytime you press
the button the counter toggles its type(from up to down / down to up).
Use an external LED to show the current type of the counter (ON⇒Up Counter,
OFF ⇒ Down counter).
Use another external LED which is ON whenever the counter reaches zero.
Implement the discussed design to enable the process using the STM board. Also,
comment the code in a verbose manner.

You might also like