Quiz2S23

pdf

School

University of Texas *

*We aren’t endorsed by this school

Course

445L

Subject

Electrical Engineering

Date

Apr 3, 2024

Type

pdf

Pages

4

Uploaded by DukeCheetah4199

Report
EE445L Spring 2023 Quiz 2 EID = ______________ Page 1 First: Last: April 6, 2023, 12:30 to 1:45 pm. Open book, open notes, open computer, calculator (wireless devices must be in airplane mode). Screens must not be visible to other students. (10) Question 1. An output device is interfaced to the microcontroller using SPI. The TM4C123 uses Freescale mode with the TM4C123 as master. The following waveforms were captured with the logic analyzer. Your task is to reverse engineer the SPI mode. (3) Part a) What value did the software write to DSS during initialization? (2) Part b) What value did the software write to SPO during initialization? (2) Part c) What value did the software write to SPH during initialization? (3) Part d) What data value is being transmitted (in hexadecimal)? (10) Question 2. Consider this SPI interface where the distance between the microcontroller and the device is 2 meters. Assume a velocity factor of 0.6. What is the time delay between clock output at the microcontroller and SSI0Rx data input at the microcontroller just due to the 2-meter cable. Neglect capacitance in cable. (10) Question 3. We will store the value +1.00V with the integer +8. The range of values are -16V to +15.875V, what are the precision and resolution of this fixed-point number system? Give units for each. Precision = Resolution =
EE445L Spring 2023 Quiz 2 EID = ______________ Page 2 (20) Question 4. You are given a GPIO input on PB0. Create a GPIO output on PB1 with a frequency 4 times slower. E.g., if the frequency of PB0 is 1 kHz, make the frequency of PB1 250 Hz. The frequency of PB0 can range from 0 to 10 kHz. Other than DisableInterrupts or EnableInterrupts , you write all the software needed. The main program is fixed and cannot be changed. Don’t worry about priority. You can add global variables. int main(void){ DisableInterrupts(); // running at 16 MHz Init(); // you write this EnableInterrupts(); while(1){ } } Part a) Write your Init Part b) Write your ISR
EE445L Spring 2023 Quiz 2 EID = ______________ Page 3 (10) Question 5. A sensor has analog outputs V 1 and V 2 . The range is 0 < (V 1 - V 2 ) < 0.03V. Design an analog circuit to interface this sensor to the 0 to 3V ADC on the TM4C123. Show all chip numbers and resistors. Show equations used to define resistance values. No LPF is needed here. (10) Question 6. Consider this analog filter. First, write the complex impedances of the two capacitors (Z 1 and Z 2 ) in terms of j2πf, where f is the frequency of the input V in , and j is the sqrt(-1). Next, use these impedances to characterize the filter as low-pass, high-pass, or band-pass. C 1 is much bigger than C 2 .
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
EE445L Spring 2023 Quiz 2 EID = ______________ Page 4 (15) Question 7. Implement the following digital filter: y(n)=0.75*y(n-1)+0.25*x(n) where y(n) is stored in global y , and x(n) is stored in global x. Use only integer addition and integer shift. uint32_t x,y; void ADC0Seq0_Handler(void){ ADC0_ISC_R = 0x01; // acknowledge ADC sequence 0 completion x = ADC0_SSFIFO0_R; // input x(n) } (15) Question 8. REF is 3.00V for this 3-bit DAC. What is the maximum DAC output voltage? Show your work. Hint : solve for the current in the right-most 2R for digital input equal to 7.