Answered step by step
Verified Expert Solution
Question
1 Approved Answer
a. Complete the functionRAbased on the comments and figure below to configure Port B and Port C, while preserving the other port's configuration. (5pts) YOUR
a. Complete the functionRAbased on the comments and figure below to configure Port B and Port C, while preserving the other port's configuration. (5pts) YOUR CODE HERE: // Start Port B and Port c clock YOUR CODE HERE; // Enable Digital functionality?f Port B and Port C YOUR CODE HERE; //Set direction of port ?'s pins, based on the figure YOUR CODE HERE //set direction of Port c's pins, based on the figure TM4C123 Microcontroller 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Port B Port C BO (LO B1) (B2 B3) (L2 L3 Name: lan Simon Lab Section: A b. Write C code that will read in button values, and send those values to their corresponding LEDs i.e. BO corresponds to LO), based on the figure in part a. Add any variables that you think you may need. (5pts) There are 4 buttons (80, B1, B2, B3), whose values should be stored in elements 0 to 3 of buttons (i.e. button BO should be stored in buttapstOl). There are four LEDs (LO, L1, L2, L3) that can have a value of 1 or 0 written to them. All wires that do not have an LED or button connected should have their value persevered (i.e. your code should not change their value) voi^ main(void) AAR char buttons[4 YOUR CODE HERE a. Complete the functionRAbased on the comments and figure below to configure Port B and Port C, while preserving the other port's configuration. (5pts) YOUR CODE HERE: // Start Port B and Port c clock YOUR CODE HERE; // Enable Digital functionality?f Port B and Port C YOUR CODE HERE; //Set direction of port ?'s pins, based on the figure YOUR CODE HERE //set direction of Port c's pins, based on the figure TM4C123 Microcontroller 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 Port B Port C BO (LO B1) (B2 B3) (L2 L3 Name: lan Simon Lab Section: A b. Write C code that will read in button values, and send those values to their corresponding LEDs i.e. BO corresponds to LO), based on the figure in part a. Add any variables that you think you may need. (5pts) There are 4 buttons (80, B1, B2, B3), whose values should be stored in elements 0 to 3 of buttons (i.e. button BO should be stored in buttapstOl). There are four LEDs (LO, L1, L2, L3) that can have a value of 1 or 0 written to them. All wires that do not have an LED or button connected should have their value persevered (i.e. your code should not change their value) voi^ main(void) AAR char buttons[4 YOUR CODE HERE
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started