Question: in keil uvision c . Task 1 : Configure the GPIO for the UART Unzip the template, compile it and run it . Make sure
in keil uvision c Task : Configure the GPIO for the UART
Unzip the template, compile it and run it Make sure that Teraterm is connected and set to the correct baud rate,
and parameters as given: Baud Rate
Thursday UART
Communication parameters
bits, odd parity, stop bits
Prescaler
: Check that the program shows GO in the terminal and that any key press is
displayed on the terminal. This echo is the standard way to check that the serial program that you wrote is
working correctly.
Write a function called setupGPIO which will which will configure the GPIO for use by the UART subsystem.
Make use of the values you determined in the preliminary question and Start by turning on the clock and
waiting for it to become stable. Ensure all commands are nondestructive.
Rebuild and run your program, and check that it still shows GO in the terminal, and you can still type
and echo characters in the terminal. #include TMCh
#include "LabThu.h
Thursday
Uart UART
Baud Rate
Comms bits, odd parity, stop
Prescaler
Instructions:
Wire the UART as per Task
Compile and run this template to check the connection. It echoes teh keys typed.
The different tasks will ask you to rewrite the supplied functions. You can use the same name.
int mainvoid
uintt c;
setSysClkMHz ; Do NOT remove. Set the System clock to MHz
RedirectOutput; Do NOT remove. Redirect output from U to the terminal via U
setupGPIO ; rewrite function for Part
setupUART ; rewrite function for Part
bannerStart typing. You should see the keys echoed on the terminal";
ECHO jhECHo ECho Echo echo
while
echo keys back to you
This tests your connection
creadUART; read from Uart rewrite function for Part
writeUARTc; write to Uart rewrite function for Part
return ;
end main
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
