Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

BACKGROUND As an embedded system engineer of a local consulting company, you are tasked to familiarize with the recently acquired NUCLEO - F 4 1

BACKGROUND
As an embedded system engineer of a local consulting company, you are tasked to familiarize with
the recently acquired NUCLEO-F411RE and ESP32C3 boards -> by coming up with some
hardware wiring (breadboarding) and software developments in assembly languages.
PART 1 UTILIZATION OF CORTEX-M4 BOARD
Use the theoretical and practical knowledge/skills gathered so far to undertake TASK 1.1A through
TASK 1.1B below, which deal with writing an ARM processor assembly language (Keil
environment) to satisfy the specified requirements from your company.
Note:
- The green LED (LD2) also termed as LED1 available on the NUCLEO-F411RE board is active
high.
- Select the following STM32 chip when a new Keil Vision Project is created using Keil IDE
version 4: STM32F401RE.
- Each of your project should contain at least two (2) main files namely the
startup_stm32f401xx.s file and your_main_file.s. Using assembly language, you need to
comment out (remove by commenting, using a semicolon) the boldface letters in the following
assembly code fragment of the startup_stm32f401xx.s file:
Code Fragment 1
; Reset Handler
Reset_Handler PROC
EXPORT Reset_Handler [WEAK]
;-> Line 180 IMPORT SystemInit
IMPORT __main
;-> Line 183 LDR R0,=SystemInit
2
;-> Line 184 BLX R0
LDR R0,=__main
BX R0
ENDP
Code Fragment 2
; User Initial Stack & Heap
IF :DEF:__MICROLIB
EXPORT __initial_sp
EXPORT __heap_base
EXPORT __heap_limit
ELSE
;-> Line 367 IMPORT __use_two_region_memory
EXPORT __user_initial_stackheap
__user_initial_stackheap
Note: It is advisable that you save the modified startup file to a slightly different name from the
original one, as the contents of the original startup file should remain unaltered.
Task 1.1A: Activation/Deactivation of Output Devices (LEDs) by NUCLEO-F411RE Board
i) Using GPIOA_ODR (not GPIOA_BSRR here), blink the NUCLEO-F411RE boards green
LED (labelled as LD2) to be called as LED1. Note: LD2 is connected to the PA5 pin.
[7 points]
ii) Using GPIOA_BSRR (not GPIOA_ODR), blink the NUCLEO-F411RE boards green LED
i.e., LD2/LED1 which is stated in part 1.1A(i).
[7 points]
iii) Using GPIOB_BSRR, continuously illuminate an external (preferably red) LED using Port C
to be called as LED2. Note: LED2 is to be active high.
[5 points]
iv) Using GPIOB_ODR, continuously illuminate the active high red LED (LED2) stated in part
1.1A(iii).
[5 points]
v) Using GPIO_ODR, blink LED2 stated in part (c) using a suitable time delay.
[7 points]
Task 1.1B: Display of Static Message on Output Device (LCD) using Assembly Language
Develop an assembly language program for the NUCLEO-F411RE processor to display the
following messages on the LCD display:
Row 1:
Row 2: <>
[25 points]
3
Note: As a guide, refer to the Motorola 68000 assembly program 1a_congrats.asm provided
by the instructor.
PART 2 UTILIZATION OF ESP32C3-BASED BOARD
In the tasks below, you are to write a RISC V processor assembly language (Code::Blocks
environment) to satisfy the specified requirements from your company. In this part, you are free to
choose any port and pin of the ESP32C3 chip as input.
Task 1.2A: Activation/Deactivation of Output Devices (LEDs) by ESP32C3 Board
i) Using a port and pin of your choice, continuously illuminate an external (preferably yellow)
LED to be called as LED3. Note: LED3 is to be active low.
[5 points]
ii) Blink LED3 stated in part 1.2A(i) using a suitable time delay.
[7 points]
iii) Using a port and pin of your choice, continuously illuminate an external (preferably green)
LED to be called as LED4. Note: LED4 is to be active high.
[5 points]
iv) Blink LED4 stated in part 1.2A(iii) using a suitable time delay.
[7 points]
Task 1.2B: Using Input Devices (Switches) to Control Output Devices (LEDs) by ESP32C3
Board
Connect two (2) external switches to be labelled as SW1 and SW2 to any port and pin (as
output) of your choice. These switches will be used to control the illumination of LED3 and
LED4 introduced in part 1.2A. For this purpose, write a RISC V assembly language program
(Code::Blocks environment) to achieve the following requirements:
i) When switch SW1 is pushed, only the yellow LED (LED3) should be turned ON, and when
the switch is released, only the green LED (LED4) should be ILLUMINATED.
[9 points]
ii) When the switches SW1 and SW2 are not pushed, both LEDs (LED3 and LED4) should
be turned OFF. When SW1 is pressed while SW2 is not pressed, only the yellow LED
(LED3) should ILLUMINATE. Lastly, when both SW1 and SW2 are pressed, only the green
LED (LED4) should be ILLUMINATED.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server T-SQL Recipes

Authors: David Dye, Jason Brimhall

4th Edition

1484200616, 9781484200612

More Books

Students also viewed these Databases questions

Question

How do you see FWAs affecting a companys bottom line?

Answered: 1 week ago

Question

=+d) Why does the no trend model from Exercise 40 no longer work?

Answered: 1 week ago

Question

Design an internal skills transfer system through tutoring.

Answered: 1 week ago