Question: Q 1 [ 4 0 Points ] . For a daisy - chained SPI with 4 devices ( C Device # 1 Device # 2
Q Points For a daisychained SPI with devices C Device # Device # Device # Device # the
SPI master intends to send the following bytes to the devices in sequence:
xA to Device #
xB to Device #
xC to Device #
xD to Device #
Additionally, at the start of communication, all devices hold the byte xFF in their SPI shift registers.
Part After clock cycles, what will be the contents of the SPI shift registers of devices?
Part If the SPI clock operates at kHz how long in milliseconds will it take for the SPI master to complete the
transmission to all devices and receive back the first byte sent?
Part Suppose the master sends the byte sequence with an incorrect clock frequency of kHz but the devices
expect kHz What would be the potential impact on the data received by Device # and why?
Part If Device # is configured to reverse the bits of the data it receives before passing it on what will be the final
byte received by the master after clock cycles?
Q Points You are designing a system to control the brightness of an LED using timerbased Pulse Width Modulation
PWM on a microcontroller.
Part Calculate the period of a PWM signal with a frequency of kHz in microseconds. The microcontrollers clock
frequency is MHz and the timer uses a prescaler of Calculate the value to be loaded into the timers register
TACCRx value to achieve a kHz PWM frequency.
Part Given the calculated TACCRx value from part compute the TACCRx for the and duty cycle.
Part Assume the timer is in bit mode max Calculate the minimum and maximum achievable PWM fre
quencies using the MHz clock and a prescaler of Determine the resolution of the duty cycle as a percentage.
Part Suppose you switch to a bit timer with the same MHz clock and a prescaler of Calculate the
maximum TACCRx value. Calculate the minimum achievable PWM frequency.
Q Points A push button is used to control an LED based on these rules: Every time the push button is pressed,
the LED turns ON for seconds; If the button is pressed again within the second window, the timer resets, and the
LED stays ON for another seconds from the latest press. A user interacts with the button as follows:
Press : Time seconds
Press : Time seconds
Press : Time seconds
Press : Time seconds
Part Calculate the total time the LED stays ON based on the button press sequence. Provide a timeline showing
the ON and OFF states of the LED.
Part Explain if there are any periods where pressing the button has no effect and why that happens.
Part Consider a scenario where the button is pressed every seconds starting at Time seconds. How long
would the LED remain ON by the th press?
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
