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 1: 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 6)
Communication parameters
115200
8 bits, odd parity, 1 stop bits
Prescaler
-:8. 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 setup_GPIO() which will which will configure the GPIO for use by the UART6 subsystem.
Make use of the values you determined in the preliminary question 1 and 2. Start by turning on the clock and
waiting for it to become stable. Ensure all commands are non-destructive.
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 "TM4C129.h"
#include "Lab2_Thu.h"
// Thursday
// Uart UART6
// Baud Rate 115200
// Comms 8 bits, odd parity, 1 stop
// Prescaler 8
// Instructions:
// Wire the UART as per Task 0
// 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 main(void)
{
uint8_t c;
setSysClk80MHz() ; // Do NOT remove. Set the System clock to 80MHz
RedirectOutput(); // Do NOT remove. Redirect output from U3 to the terminal via U4
setup_GPIO() ; // rewrite function for Part 1
setup_UART() ; // rewrite function for Part 2
banner("Start typing. You should see the keys echoed on the terminal");
// ECHO jhECHo ECho Echo echo .
while(1){
// echo keys back to you
// This tests your connection
c=read_UART(); // read from Uart (rewrite function for Part 3)
write_UART(c); // write to Uart (rewrite function for Part 4)
}
return 0;
}// end main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!