CPRE 288 Quiz 5

pdf

School

Iowa State University *

*We aren’t endorsed by this school

Course

288

Subject

Electrical Engineering

Date

Apr 3, 2024

Type

pdf

Pages

4

Uploaded by AdmiralPencil12563

Report
Quiz 5 Instructions An exam prep and practice quiz is included in a Quizzes (Exam Prep) grade in the course. The purpose of am exam prep quiz is to check your understanding of knowledge and concepts (resulting in feedback to both student and instructor), provide more practice with problem- solving exercises, and show you examples of types of questions that may be on an exam. Up to eight exam prep quizzes will posted during the semester. The lowest quiz score will be dropped. You are not required to complete quizzes before taking an exam. But you are strongly encouraged to complete relevant quizzes before an exam to help you prepare for the exam. A quiz is an individual assignment. You are expected to submit your own work. You can ask general questions about quiz questions and have general discussions with other students. Do not share answers to quiz questions. Please honor these expectations for academic integrity. You can do your own work and do well. You have up to 4 attempts to submit the quiz. Having multiple attempts will let you get back into the quiz if you submit by mistake, or if there is some technical problem that closes the session. It also lets you return after reviewing class materials as part of the learning process. IMPORTANT NOTE: If you submit and go back in, you are starting over with a new attempt (that's how Canvas works). So, just in case, record your answers outside of the quiz so you can re-enter them if needed. Canvas does not have a separate save option for quizzes; however, as long as you do not submit, you can return to finish a quiz (still the same attempt). NOTE: There is no actual due date, other than before prep week. The due date shown is a target date so it appears in your list of assignments before the next quiz. You should complete quizzes before each exam because they will help you prepare for and practice questions similar to what you might find on an exam. If you need additional attempts on a quiz, please email the instructor. Questions Question 1
Datasheet When initializing a UART, in what order should the following UART registers be written to or accessed? Match the register that should be written to (or accessed) first with a 1, and so on. The registers are on the right, and the order is on the left. Answer: 1 RCGCUART 2 PRUART 3 UARTCTL (disable) 4 UARTIBRD 5 UARTLCRH 6 UARTCTL (enable) Click here for reference Question 2 Interrupt Processing Answer 2a - 2b. 2a Which interrupt register is used to clear the interrupt status bit for a trigger event? Answer: UARTICR Click here for reference (See page 933) 2b Which of the following conditions must be true for an interrupt to occur? Answer: The NVIC is enabled to process interrupt requests from the device. YES Interrupts are enabled globally. YES Interrupt priority of the requesting device must be at level 0. NO A trigger event sets a status flag for the device. YES Only one device is making an interrupt request to the NVIC. NO
Interrupt requests from the device are enabled. YES Question 3 Analog to Digital Conversion (ADC) Answer 3a - 3d. 3a An ADC module in the microcontroller has a 12-bit analog-to-digital converter. What does the "12" refer to? Answer: 12 bits in FIFO register Click here for reference 3b Provide a mask value to complete the following line of code to configure the GPIOAMSEL register to enable the analog function for all AIN inputs on pins of Port E . Use friendly code that preserves unused bits. Write your answer in binary or hex. Do not include leading zeros, e.g., 0x01 should be written as 0x1. Include the 0b or 0x prefix. GPIO_PORTE_AMSEL_R |= _mask_; mask (in binary or hex): Answer: 0x3F Click here for reference (See pages 1344, 687, and this table ) 3c Which analog input channels (AIN#) are sampled by the ADC given the following initialization of a sample sequencer? Answer: First Sample 0 Second Sample 3 Third Sample None ADC0_SSMUX2_R = 0x2630; ADC0_SSCTL2_R = 0x0060;
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Fourth Sample None Click here for reference (See page 867 for SSMUX2 and page 868 for SSCTL2) 3d Recall that the maximum input voltage for a 12-bit ADC on the TM4C is 3.3 V. If the input voltage on analog input channel 2 (AIN2) is 0.75 V, what is the value of the digital result after conversion? Possible answers are given in decimal. Digital Value=(Max Analog Voltage/Analog Voltage)×Max Digital Value Answer: 930