0% found this document useful (0 votes)
271 views27 pages

ReportTemplate PracticalTask or Project

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
271 views27 pages

ReportTemplate PracticalTask or Project

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 27

PRACTICAL TASKS #1

NUCLEO-F411RE BOARD USING ASSEMBLY LANGUAGE


(KEIL ENVIRONMENT)

By

MUHAMMAD DURRANI HAKIM BIN MOHD FARED (21001225)

WAN HAFIY ARRAZIQ BIN WAN MOHD FAIZAL (ID : 21001595)

MICROPROCESSOR & COMPUTER ARCHITECTURE (EEB 2083) REPORT

Submitted in Partial Fulfillment of the Requirements


for EEB 2083
to

Assoc. Prof. Dr. Mohd Zuki Yusoff

Universiti Teknologi PETRONAS


32610 Bandar Seri Iskandar
Perak Darul Ridzuan

Day and Date of Experiment:

Day and Date of Submission:

ii
ABSTRACT

The ARM processor encompasses a range of computer processors and


architectures with varying applications. This report aims to explore the basics of
ARM language and commands through practical application using the STM32
Nucleo Development Studio and STM32 Nucleo F411RE board. The learning process
involves utilizing the Keil uVision4 program and ARM Assembly Language, which
enhances comprehension of assembly language. Each hardware connection
corresponds to a unique pin and data line, and the assembly language will be utilized
to solve practical issues in this report. The Keil uVision4 platform will facilitate the
integration of hardware and software to apply assembly language code. Effective
communication between software and hardware data lines is crucial to the successful
execution of tasks. This task's significance lies in understanding how to utilize
different pins and ports to incorporate assembly language codes.

iii
TABLE OF CONTENTS

LIST OF TABLES......................................................................................................vii
LIST OF FIGURES....................................................................................................viii
LIST OF ABBREVIATIONS......................................................................................ix
CHAPTER 1 INTRODUCTION...................................................................................1
1.1 OBJECTIVE.....................................................................................1
CHAPTER 2 LITERATURE REVIEW………………………………………………2
CHAPTER 3 METHODOLOGY……………………………………………………..4
CHAPTER 4 RESULTS AND DISCUSSION………………………………………11
CHAPTER 5 CONCLUSION……………………………………………………….19
REFERENCES..............................................................................................................2
APPENDICES...............................................................................................................3

iv
LIST OF TABLES

Table 1 Result for Task1A(a) 11


Table 2 Result for Task1A(b) 11
Table 3 Result for Task1A(c) 12
Table 4 Result for Task1A(d) 12
Table 5 Result for Task1A(e) 12
Table 6 Result for Task1A(f) 13
Table 7 Result for Task1A(g) 13
Table 8 Result for Task1A(h) 14
Table 9 Result for Task1A(f,g and h combined) 14
Table 10 Result for Task1B(a) 15
Table 11 Result for Task1B(b) 16
Table 12 Result for Task1C 17
Table 13 Result for Task1D 18

v
LIST OF FIGURES

Figure 1..........................................................................................................................1
Figure 2..........................................................................................................................1
Figure 3..........................................................................................................................1
Figure 4..........................................................................................................................1

vi
LIST OF ABBREVIATIONS

GPIO General Purpose Input/Output

BSSR Port Bit Set/Reset Register

ODR Port Output Data Register

IDR Port Input Data Register

PUPDR Pull-up/Pull-down Register

MODER Port Mode Register

OTYPER Port Output Type Register

OSPEEDR Port Output Speed Register

EQU Equivalent

BNE Branch Not Equal

BEQ Branch Equal

vii
CHAPTER 1
INTRODUCTION

The Arm® Cortex®-M processor-based 32-bit STM32F411RE microcontroller was


created to provide MCU users additional levels of flexibility. It provides devices with
full integration and simplicity of development while integrating very high
performance, real-time capabilities, digital signal processing, low-power / low-
voltage operation, and connection. Many software programmes, including Mbed and
Keil uVision4, are used to programme the STM32F411RE. This development board
has several technical functionalities that are common to microcontrollers, including
input-output, timers, clocks, ODRs, and many others. To create results, each selected
pin needs to cooperate with every piece of electrical hardware. An experiment's
success will be shown and confirmed using LED, LCD, and switches.

1.1 OBJECTIVE

a. To toggle on switches on the STM32F411RE board to illuminate an LED.


b. To examine if the STM32F411RE board has engaged or disabled output
devices.
c. c. Designing assembly language code to show static and display a logic (Logic
0 or Logic 1), when the switch “SW1” is continuously left in the following
position: pressed or released.
CHAPTER 2
LITERATURE REVIEW

The Arm® Cortex®-M processor-based 32-bit STM32 series of


microcontrollers is intended to provide MCU users additional levels of flexibility. It
provides devices with full integration and simplicity of development while integrating
very high performance, real-time capabilities, digital signal processing, low-power /
low-voltage operation, and connection. A wide variety of evaluation tools, from very
basic kits to fully featured, high-end application development boards, are available to
support STM32 microcontrollers. They use all of the device peripherals and features
available in each product line. A comprehensive set of third-party solutions using an
IDE and an in-circuit debugger/programmer is also included with the assessment
tools. Using any STM32 MCU, STM32 Nucleo boards enable design engineers to
swiftly build prototypes and test out novel concepts. All Nucleo boards have
Arduino™ connections as standard, and STMicroelectronics' Morpho connectors
make it simple to add devices. Users of the STM32 Nucleo have free access to the
mbed online C/C++ SDK, online compiler, and developer community at mbed.org.
Pushbuttons, Arduino pins, LEDs, a microcontroller chip, and a mini-USB B
connection are all features of the STM32F411RE, as seen in figure 1.

Figure 1: STM32F411RE Board.

2
The programming language employed is assembly language code, which is
written using Keil uVision4, an Integrated Development Environment (IDE) that
includes a text editor, compiler, and the ability to convert source files to the .bin
format. To make modifications to the STM32F411RE project model in Keil
uVision4, a similar model, the STM32F401RE, is selected from the menu. It is
important to save the file before making any changes, compiling, and converting it to
the .bin format.

Figure 2 shows the Keil uVision4 software.

Figure 2: Keil uVision4 software.

3
CHAPTER 3
METHODOLOGY
The NUCLEO-F411RE board has been selected as the hardware for the task,
while Keil uVision4 has been chosen as the software. The "startup stm32f401xx.s"
file serves as the primary file for editing, compiling, and converting the model.

3.1 TASK 1A

The chosen extra components are male-to-female wires and LEDs. A system
of binary codes consisting of 1's and 0's is utilized to indicate whether the LEDs are
in an "ON" or "OFF" state. It's important to have knowledge about the different LED
connections, such as active-high and active-low, in order to communicate effectively
between the hardware and software. An active-high configuration means that when
the bit is 1, the LED will light up, while an active-low setup will illuminate the LED
when the bit is 0.

Figure 3: Active high and active low setup

4
3.1.1 TASK 1A (a)
To create the code, the output pins selected were GPIO and PA5. To transfer
the code to the NUCLEO-F411RE board, a mini-USB B port was used along with a
USB Type-A to Mini-B cable to receive the data. LED 1 is indicated by a green light.
To illuminate LED 1, bit 1 is assigned to PA5 through the use of GPIOA ODR. After
receiving the pre-developed instruction via a .bin file, the hardware executes the code
and the resulting data is obtained.

3.1.2 TASK 1A (b)


During the coding process, the output pins chosen were GPIOB and PB6. To
transfer the code to the NUCLEO-F411RE board, a mini-USB B port was used in
conjunction with a USB Type-A to Mini-B cable to receive the data. LED 2 is
denoted by a red light. To illuminate LED 2, bit 1 is assigned to PB6 utilizing the
GPIOB BSR. Following the hardware's reception of the pre-existing instruction via
a .bin file, the code is executed and the resulting data is obtained.

3.1.3 TASK 1A (c)


During the code-writing process, the output pins chosen were GPIOB and
PB6. To transfer the code to the NUCLEO-F411RE board, a mini-USB B port was
utilized along with a USB Type-A to Mini-B cable to receive the data. LED 2, which
is red in color, is connected in an active-low configuration. To illuminate LED 2, bit
0 is assigned to PB6 through the use of GPIOB ODR. Following the hardware's
receipt of the pre-existing instruction via a .bin file, the code is executed and the
resulting data is obtained.

3.1.4 TASK 1A (d)


During the code-writing process, the output pins chosen were GPIOC and
PC6. To transfer the code to the NUCLEO-F411RE board, a mini-USB B port was
utilized along with a USB Type-A to Mini-B cable to receive the data. LED 3, which
is yellow in color, is connected in an active-low configuration. To illuminate LED 3,
bit 0 is assigned to PC6 through the use of GPIOC BSRR. Following the hardware's
receipt of the pre-existing instruction via a .bin file, the code is executed and the

5
resulting data is obtained.
3.1.5 TASK 1A (e)
During the code-writing process, the output pins chosen were GPIOC and
PC6. To transfer the code to the NUCLEO-F411RE board, a mini-USB B port was
utilized along with a USB Type-A to Mini-B cable to receive the data. LED 3, which
is yellow in color, is connected in an active-high configuration. To illuminate LED 3,
bit 1 is assigned to PC6 through the use of GPIOC ODR. Following the hardware's
receipt of the pre-existing instruction via a .bin file, the code is executed and the
resulting data is obtained
3.1.6 TASK 1A (f)
The GPIOA and PA5 pins were chosen as the output when the code was being
written. A mini-USB B connector was utilised to accept the data from a USB Type-A
to Mini-B cable in order to send the code to the NUCLEO-F411RE board. When the
delay function is chosen, LED 1 (green) starts flashing. Bit 0 is reset, bit 1 is set, and
bit 1 is assigned to BSRR in order to turn off the LED 1 (green). Bits 1 and 0 are in
the reset and set positions, respectively, to restart LED 1. In exchange, the hardware
was given a previously generated instruction through a.bin file, and outcomes were
obtained.

3.1.7 TASK 1A (g)


During the code-writing process, the output pins chosen were GPIOB and
PB6. To transfer the code to the NUCLEO-F411RE board, a mini-USB B port was
utilized along with a USB Type-A to Mini-B cable to receive the data. By selecting
the delay function, LED 2 (red) is programmed to blink on and off. To turn off the
LED 2 (red), bit 0 is reset and bit 1 is set, then assigned to BSRR. To turn on LED 1,
bit 1 is reset and bit 0 is set. Following the hardware's receipt of the pre-existing
instruction via a .bin file, the code is executed and the resulting data is aquired.

3.1.8 TASK 1A (h)


When developing the code, the GPIOC and PC6 pins were designated as the
output pins. To upload the code to the NUCLEO-F411RE board, a mini-USB B port
was used to receive the data using a USB Type-A to Mini-B cable. Using the delay
function, LED 3 (yellow) blinks. To turn on the LED 3, bit 0 is assigned in the ODR
register, while bit 1 is assigned to turn it off. The hardware executes an instruction

6
that was previously developed in a .bin file and the results are obtained.
3.2 TASK 1B
Task 1B involves the use of additional hardware, including LEDs, switches,
and male-to-female jumper wire. As with Task 1, LED1, LED2, and LED3 were
utilized. To successfully carry out this task, one needs to have basic knowledge of
setting up switches with pull-up resistors, which is illustrated in Figure 4.

Figure 4: Pull-up resistor switch setup


The input value is HIGH when the switch is open, and it is LOW when the switch is
closed.

3.2.1 TASK 1B(a)

For this task, a switch (SW1) and two LEDs (LED1 and LED2) were utilized as
additional hardware. LED1 is connected to PB0 and LED2 is connected to PB1 using
an active-low setup. On the other hand, SW1 is connected in a pull-up resistor setup,
as depicted in Figure 4. The code was written using the GPIOB and GPIOC, where
PB1 is configured as an output and PC0 as an input. To upload the code onto the
NUCLEO-F411RE board, a mini-USB B port was employed with the use of a USB
Type-A to Mini-B cable.

• When the switch (SW1) is pressed, the input value becomes LOW and the bit
1 (HIGH) is assigned to PB0 using ODR, which causes LED 1 to light up and
LED2 to turn off.
• When switch (SW1) is pulled, the input is HIGH and PB0 receives bit 0
(LOW) using ODR resulting in LED1 turning off and LED2 lights up.

The hardware was given a pre-developed instruction via a .bin file, and the outcome
was obtained as a result.

7
3.2.2 TASK 1B(b)

To accomplish this task, two switches (SW1 and SW2) and three LEDs
(LED1, LED2, and LED3) were utilized. LED1 is connected to PA0, LED2 to PA5 in
an active-low configuration, and LED3 to PA1 in an active-high setup. SW1 is
connected to PC0 and SW2 to PB0 with pull-up resistors as shown in Figure 4.
GPIOA, GPIOB, and GPIOC are used in the code, with PA0, PA5, and PA1 set as
output, and PC0 and PB0 as input. A mini-USB B port was utilized to transfer the
code to the NUCLEO-F411RE board via a USB Type-A to Mini-B cable.

 If both switches SW1 and SW2 are activated, the input at C is [11]. This leads
to an output of 0 being transmitted to PA0 (LED1) and PA1 (LED3), while an
input of 1 is transferred to PA5 (LED2).

 If SW1 is pushed while SW2 is activated, the input at C becomes [10],


resulting in an output of 1 being transferred to PC2.

 If SW1 is activated while SW2 is pushed, the input at C becomes [01], which
leads to an output of 1 being transferred to PA0.

 When both switch SW1 and SW2 are pushed, the input at C is [00]. Output of
0 is transferred to PA5 (LED2).

The hardware obtained a pre-developed instruction via a .bin file, and the
outcomes were obtained in return.

3.3 TASK 1C

An LCD is also used in this operation, with Ports B and C being utilised, in
addition to switches and Lights. Connect all of the LCD's high-order and low-order
buses using GPIO ODR in 8-bit mode to display a message on the LCD. The third
command is used to check for the busy flag after the command set function has been
updated three times. The LCD's entry command is set up as 0000000110, where 1
denotes increases and 0 denotes decreases. Moreover, the message can flash or shift
to the right by using bit 1.

8
Figure 5: Pin connection of LCD.
Lastly, using the vector table, set two lines of characters for display on the
LCD. The first line of characters reads "<Programming My>" while the second line
reads "<<Nucleo Board>>".

9
3.4 TASK 1D
Additional hardware used in this task is SW1 switch. Set up GPIO Port A pin 0 as
input (connected to SW1) . The first four instructions enable the clock for GPIOA by
setting bit 0 of the RCC_AHB1ENR register to 1. This is done to enable access to the
GPIOA registers. The next two instructions clear the moder register and pupdr
register for GPIOA. This is done to configure GPIOA pin 0 as an input with no pull-
up or pull-down resistor.The program enters an infinite loop labelled "loop". Within
the loop, the program reads the state of the switch connected to GPIOA pin 0.
The instruction LDR R0, [R1, #0x10] loads the value of the IDR (input data register)
of GPIOA into register R0. The offset of 0x10 is used because the IDR register is
located at an offset of 0x10 from the base address of GPIOA. The instruction ANDS
R0, R0, #1 performs a bitwise AND operation between R0 and the value 1. This is
done to check the value of the first bit of R0, which corresponds to the state of the
switch connected to GPIOA pin 0. The instruction BEQ switch_released branches to
the label "switch_released" if the result of the ANDS operation is zero. This means
that the switch is not pressed.If the switch is pressed, the program sets the value of R0
to 1 and branches to the label "display_logic". The label "switch_released" is
executed if the switch is not pressed. It sets the value of R0 to 0. The label
"display_logic" is where the logic value of the switch (0 or 1) is displayed. The code
to display the value is shown after the label.Finally, the program branches back to the
beginning of the loop, where it repeats indefinitely.

10
CHAPTER 4
RESULTS AND DISCUSSION

4.1 Task 1A

4.1.1 Task 1A(a)


Expected result
Actual result

LED1/YELLOW LED illuminates https://youtu.be/jMUi1P8NDNo

LED1/YELLOW LED illuminates

Table 1: Result for Task 1A(a)

The green LED labeled LED1 on the NUCLEO-F411RE board lights up when
the board is powered on and code is running, as anticipated. This LED turns on
because pin PA5 receives a signal of 1 through BSSR.

4.1.2 Task 1A(b)

Expected result Video / Actual result

LED2/RED LED illuminates https://youtu.be/JJ_5VHK_2Uc


LED2/RED LED illuminates


Table 2: Result for Task 1A(b)

As soon as the NUCLEO-F411RE board is powered on and the code starts


running, the board's red LED labeled LED2 lights up as anticipated. This LED turns
on because pin PB6 receives a signal of 1 through BSRR.

11
4.1.3 Task 1A(c)

Expected result Video / Actual result

LED2/RED LED illuminates https://youtu.be/JJ_5VHK_2Uc



LED2/RED LED illuminates

Table 3: Result for Task 1A(c)

The red LED, LED2, on the board lights up when the board is powered on and
the code is executed, as anticipated. LED2 is configured as an active-low, which
means it illuminates when pin PB6 receives a signal of 0 through BSSR.

4.1.4 Task 1A(d)

Expected result Video/Actual result

LED3/YELLOW LED illuminates


https://youtu.be/LzJDHQ9L5Bo

LED3/YELLOW LED illuminates


Table 4: Result for Task 1A(d)

As expected, the yellow LED labeled LED3 lights up when the board is
powered on and the code starts running. LED3 is set up as an active-low, which
means it illuminates when pin PC6 receives a signal of 1 through BSRR.

4.1.5 Task 1A(e)

Expected result Video/Actual result

LED3/YELLOW LED illuminates


• https://youtu.be/LzJDHQ9L5Bo
LED3/YELLOW LED illuminates

Table 5: Result for Task 1A(e)

As expexted, when the board is powered on and the code is executed, the yellow
LED named LED3 lights up. LED3 is configured as active-high and turns on because pin C6
receives a signal of 1 through ODR.

12
4.1.6 Task 1A(f)

Expected result Video/Actual result

Blink LED 1/BLUE LED using suitable


delay
• https://youtu.be/6P0xKES4bVw

LED 1/Blue LED blinks

Table 6: Result for Task 1A(f)

The desired outcome was achieved, where the green LED blinks when the
board is powered on and the code is executed. LED1 is configured as active-high
and lights up because pin A5 receives a signal of 1 through BSRR.

4.1.7 Task 1A(g)


Expected result Video/Actual result

Blink LED 2/RED LED •


using suitable https://youtu.be/UxD90_Jpiq0
delay
LED2/Red LED blinks

Table 7: Result for Task 1A(g)

The anticipated result was achieved as the red LED named LED2 blinks when
the board is powered on and the code is executed. LED2 is configured as active-high
and lights up because pin B6 receives a signal of 1 through BSRR.

4.1.8 Task 1A(h)

13
Expected result Actual result

• https://youtu.be/3bjUDyHdebY
Blink LED 3/YELLOW LED
using suitable delay LED 3/Yellow LED blinks

Table 8: Result for Task 1A(h)

The desired outcome was achieved, where the yellow LED named LED3
blinks when the board is powered on and the code is executed. LED3 is set up as
active-high and lights up because pin C6 receives a signal of 1 through ODR.

4.1.9 Task 1A (f,g,h combined)

Expected result Actual result

LED1, LED2 and LED3 blinks • https://youtu.be/8BpgO8HOSBw


alternately by using suitable
delay LED1, LED2 and LED3 blinks alternately

Table 9: Result for Task 1A(f,g and h combined)

As anticipated, each LED1, LED2, and LED3 illuminates alternately. This can
be accomplished by implementing a delay function and looping through the same
code repeatedly. Similar to the previous task, the BSRR and ODR were used to light
up each LED.

4.2 Task 1B

4.2.1 Task 1B(a)

14
Step No Action Expected Result
Actual Result Recorded Result

1 Push SW1 LED1 LED1 https://youtu.be/DsICJNKzO98


downward illuminates, illuminates,
LED2 OFF LED2 OFF

2 SW1 released LED1 OFF, LED2 LED1 OFF,


illuminates LED2
illuminates

Table 10: Result for Task 1B(a)

SW1 was set up to produce a HIGH input signal when it's in an


unclicked state and a LOW input signal when it's clicked. The input pin assigned to
SW1 is linked to PC0. Once SW1 is clicked, the input signal becomes LOW.
Consequently, PB0 pin holds a bit 1, leading LED1 to turn on, whereas PB1 pin has a
bit 1, causing LED2 to stay off due to its active LOW state. In contrast, when SW1 is
in an unclicked state, the input signal is HIGH. As a result, PB0 pin carries a value of
0, resulting in LED1 not illuminating. PB1 pin, on the other hand, contains a bit 0 that
makes LED2 light up since it's active LOW.

4.2.2 Task 1B(b)

Step No Action Expected Result Actual Result


Recorded Result

15
1 SW1 and SW2 LED1,LED2 and LED1,LED2 and https://youtu.be/uh2IghqXz_Y
are released LED 3 OFF LED 3 OFF
2 LED3 LED3
SW1 pushed
illuminates, illuminates,
downward, SW2
LED1 and LED2 LED1 and LED2
released
OFF OFF
3 SW1 released, LED1 LED1
SW2 pushed illuminate, illuminate,
downward LED2 and LED3 LED2 and LED3
OFF OFF
4 SW1 and SW2 are LED2 LED2
pushed illuminates, illuminates,
downward LED1 and LED3 LED1 and LED3
OFF OFF
Table 11: Result for Task 1B(b)

SW1 and SW2 were configured to produce a HIGH input signal when they are
not pressed and a LOW input signal when they are pressed. SW1's input pin is
connected to PC0, while SW2's input pin is linked to PB0. When both switches are
not pressed, the input pin becomes [11], which switches off all LEDs by sending 0 to
PA0 and PA1 for LED1 and LED3, respectively, and 1 to PA5 for LED2. The input
at pin [10] is then [10] when SW1 is pressed, while SW2 is not pressed. As a result,
only LED3 will light up when PA1 receives a signal of 1. Additionally, when SW1 is
not pressed, while SW2 is pressed, the input at pin [01] is set, causing LED1 to be the
only one to turn on by providing a signal of 1 to PA0. When both switches are
pressed, the input at the pin becomes [00], causing LED2 to be the only one to
illuminate. This is achieved by setting LED2's PA5 output to zero. To keep LED1 and
LED3 in the off state, PA0 and PA1 must have a signal of 0.

4.3 Task 1C

Expected result Video / Actual result

16
Static message displayed on LCD https://youtube.com/shorts/HCQNlwHVPu8?
as per below: feature=share
ROW 1: <Programming My> • Static message displayed on the LCD
ROW 2: << Nucleo Board>>

Table 12: Result for Task 1C

The LCD displayed two lines of text, with "<Programming My>" shown on
the first row, and "<<Nucleo Board>>" on the second row. The first and second rows
of the vector table were used to display these messages. To move from the first row to
the second, the cursor was positioned to the second line.

4.4 Task 1D

Step No Action Expected Result


Actual Result Recorded Result

17
1 Push SW1 Static message https://youtube.com/
downward displayed on LCD shorts/JSm2jRTYJQo
as per below:

ROW1:Logic 0: 0 V
ROW 2: SW1 Pressed
Static message
displayed on LCD
as per below:

ROW1:Logic 0: 0 V
ROW 2: SW1 Pressed

2 SW1 released Static message Static message


displayed on LCD displayed on LCD
as per below: as per below:

ROW1:Logic 1: 3.3 V ROW1:Logic 1: 3.3 V


ROW 2: SW1 Released ROW 2: SW1 Released

Table 13: Result for Task 1D

When the SW1 button is pressed, two lines of text were displayed on the LCD: "
Logic 0: 0 V " in the first row and " SW1 Pressed " in the second. The switches SW1
was configured to provide a LOW input when they are released and a HIGH input when
they are clicked. When the SW1 button is released, two lines of text were displayed on
the LCD: " Logic 1: 3.3 V " in the first row and " SW1 Released " in the second..

CHAPTER 5
CONCLUSION

By the end of practical task #1, all objectives had been achieved. The first
objective was to learn how to utilise the NUCLEO-F411RE Board to switch output

18
devices on and off by assigning bit 1 or bit 0 to the initialised output pins. The second
objective was to employ switches to adjust the brightness of the LEDs using the
NUCLEO-F411RE Board. This was accomplished by transmitting high or low input
through bit 1 or 0 when the switch was pressed or released. To achieve the remaining
two objectives of displaying messages on the LCD, change the display when the
switch is pressed or released, addresses were established, the LCD was initialised,
and the vector table was utilised. Ultimately, all goals were successfully
accomplished. Throughout the project, two critical skills were gained: learning how
to write code in a new language on a new platform, specifically assembly language in
Keil's case, and acquiring proficiency in using the NUCLEO-F411RE Board. These
skills will be useful in future careers, particularly when working with processors.

19
REFERENCES
STMicroelectronics NV. (2021) NUCLEO-XXXXCX NUCLEO-XXXXRX NUCLEO-
XXXXRX-P Data Brief, STM32 Nucleo-64 Boards. STMicroelectronics. Retrieved from
https://docs.rs-online.com/2f7f/0900766b81440071.pdf

STMicroelectronics NV. (2015) UM1724 User Manual, STM32 Nucleo-64 Boards.


STMicroelectronics. Retrieved from
https://docs.rs-online.com/a623/0900766b814400bf.pdf

Digi-Key Electronics. (2022) STM32® 32-bit MCU Family, Leading Supplier of ARM®
Cortex®-M Microcontrollers, Development Boards. Retrieved from
https://www.digikey.com/en/product-highlight/s/stmicroelectronics/stm32-kits

Anas Ejaz. (2020) Pull-Up and Pull-Down Resistor, Electronics Tutorial. Retrieved from
https://www.circuits-diy.com/pull-up-and-pull-down-resistor-electronics-tutorial/

20
APPENDICES
Link to the code:

1. Task 1A

a. https://drive.google.com/file/d/1DioMNsQ4H41KZthv3k5WJidkJFhaErf1/
view?usp=share_link

2. Task 1B(a)

a. https://drive.google.com/file/d/1iFLtPBg2ihSLSJysjiE9JP5dWobmLgib/view?
usp=share_link

3. Task 1B(b)

a. https://drive.google.com/file/d/1d_2FppPRJH9B5jX-iuEqWtgg6ppBzKhH/view?
usp=share_link

4. Task 1C

a.https://drive.google.com/file/d/1tEwhFBmzcmp7lOu2t0G2RM4A289HK612/view?
usp=share_link

5. Task 1D

a. https://drive.google.com/file/d/1OTS40t3V0NCiGPF8ATZ91X7jO-F_SFlD/view?
usp=share_link

21

You might also like