M2: Q26-Q40

¡Supera tus tareas y exámenes ahora con Quizwiz!

For each of the below-mentioned components, choose one of the below four options: 1. It is part of the UART module only. 2. It is part of the I2C module only. 3. It is part of both UART and I2C modules. 4. It is not part of either of the UART or I2C modules. You need to decide for the following components: 1. Clock source multiplexer 3 2. Clock Prescaler 3 3. open-drain transistor 2 4. Receive shift register 3 5. Schmitt trigger 4 6. Slave address 2 7. Modulator 1 8. An inverter gate 2

1. 3 2. 3 3. 2 4. 3 5. 4 6. 2 7. 1 8. 2

Consider a Timer_A in the count-up mode with CCR0 = 4000 and CCR1 = 1000. Referring to Figure 19-12 of MCU user guide, fill the below table. The first row is given as an example.

1. 8000 2. 50 3. 4000 4. 75

Choose True/False: The best way to generate a PWM is to use the processor and a general timer such as Timer32 because the processor is very fast and accurate. False The most accurate way to generate a PWM on our chip is using Timer_A, but using Timer_A is very expensive in terms of power and energy. False

1. F 2

Choose True/False regarding the below image. 1. IC is 1/3 of IA. 2. Bz represents LSB. T 3. ID is twice IA. 4. If Bx is 0, the switch is positioned on the right dotted line. 5. If we wish to convert 110, the current going through the feedback resistor is 1.5* Iref.

1. F 2. T 3. F 4. T 5. F

Choose T/F. DMA stands for Direct Memory Accelerator. DMA allows for direct data transfer between the memory and other peripherals. CPU can be in low-power mode while DMA handles data transfers.

1. F 2. T 3. T

Choose T/F: ISR stands for Interrupt Service Register. F Another name for ISR is interrupt handler. T ISR is essentially a function. T

1. F 2. T 3. T

Choose T/F about I2C? I2C is pronounced 'eye two see'. F I2C is a synchronous serial interface. T I2C needs pullup resistors on the SDA and SCL terminals. T I2C uses half-duplex data transfers. T

1. F 2. T 3. T 4. T

For each of the below functions, decide whether they are stored on ROM or not on ROM. 1. MAP_WDT_A_initIntervalTimer ROM 2. MAP_WDT_A_registerInterrupt not on ROM Hint: Refer to rom_map.h and rom.h for help.

1. ROM 2. not on ROM

Which one of the below statements is true about S/H circuit? 1. At least two switches are needed to build the S/H circuit. True 2. The capacitor is needed to avoid a short in the S/H circuit. False 3. The resistor is not necessary for building the S/H circuit and it is only used to improve the quality of the design. False 4. The delay of the S/H circuit is increased exponentially when the size of the capacitor is increased linearly. False 5 .The speed of the S/H circuit is increased when the size of the resistor is decreased. True

1. T 2. F 3. F 4. F 5. T

1. We can use Timer32 to generate a square wave with a varying duty cycle (PWM). True 2. Using PWM is an expensive, but highly effective control solution for applications such as motor speed control, oven temperature control, etc. False 3. In order to know our exact location on earth, we use an accurate measurement of time (as in GPS). True

1. T 2. F 3. T

Choose T/F: It is not possible to have more than one active interrupt. T It is not possible to have more than one pending interrupt. F A high-priority interrupt can stop the execution of a lower priority interrupt's ISR. T

1. T 2. F 3. T

Choose T/F. 1. In SPI, it is possible to configure on what phase/edge of the clock the master and slaves should sample the data. 2. In SPI, it is possible that the master and the slaves sample the data at two different phase/edges (e.g. one during rising edge and another during falling edge). 3. In SPI, only the master can drive the clock. 4. In SPI, activating the Slave Select signifies the start of communication.

1. T 2. F 3. T 4. T

Which statements are true about SAR and flash converter? 1. They are both Analog to Digital converters. 2. SAR is smaller but slower compared to the flash converter. 3. SAR is both smaller and faster than the flash converter.

1. T 2. T 3. F

Which of the following statements is True or False about the watchdog timer? At the heart of a watchdog timer is a counter that tries to count between 0 and the load value. T The counter in the watchdog timer should be reset (loaded with 0) on a regular basis by the software. T If the counter in the watchdog timer overflows (rolls over), the processor is reset. T Resetting a watchdog timer resets the processor. F When a processor faces a hardware or software issue and is stuck, it fails to reset the watchdog timer. T Resetting the watchdog timer on a regular basis acts as a healthy pulse for the processor status. T

1. T 2. T 3. T 4. F 5. T 6. T

In I2C, masters are able to drive the data line to zero. In I2C, masters are not able to drive the data line to one. In I2C, slaves are able to drive the data line to zero. In I2C, slaves are not able to drive the data line to one.

1. are 2. are not 3. are 4. are not

Answer the following questions: Using which method guarantees a faster response to a hardware event? Development, debugging, and testing of which type of code is easier? Which type of code development lends itself well to building low-power smart devices? Which type of program is allowed to use global variables. Interrupt-based programming can use global variables for communication between ISR and other parts of the code only.

1. using interrupts and ISR 2. A code written by polling the hardware triggers. 3. A code that waits for peripheral inetrrupts 4. Interrupt-based programming can use global variables for communication between ISR and other parts of the code only.

If the clockSource's frequency is 48MHz and we are interested to create a PWM to play a musical note B1 with the frequency of 61.74 Hz, what is the minimum acceptable prescaler value to be used for clockSourceDivider? Note: In our board, we use a PWM with the duty cycle of 50% that matches the frequency of the note to play it. (Give your answer as a numerical value such as 1 as opposed to TIMER_A_CLOCKSOURCE_DIVIDER_1 for this problem.)

12

In the figure with three followers connected to one initiator in a daisy chain shown in class, how many clock cycles does it take for one byte of data from the Slave #2 (the middle one) to reach the master (after SS is activated)?

16

What is the ratio between the smallest resistor and the largest resistor in an n-bit R-2R ladder D/A?

2

Assume we wish to create a PWM with a frequency of 200Hz and a duty cycle of 30%. Also, assume the input clock of the timer_A is 3MHz, the output mode is reset/set and the effective clock divider is 2. What should be the dutyCycle in the below config?

2,250

What is the ratio between the smallest resistor and the largest resistor in an n-bit binary-weighted ladder D/A?

2^(n-1)

What is the number of amplifiers needed in an n-bit A/D flash converter?

2^n-1

How many resistors exist in an n-bit R-2R ladder?

2n+1

Consider a processor with a system clock of 4MHz and initialization of the watchdog timer as below: WDT_A_initWatchdogTimer(WDT_A_CLOCKSOURCE_SMCLK, WDT_A_CLOCKITERATIONS_2G); How long after clearing the watchdog time it takes for the watchdog timer to reset the processor?

500 seconds

For a SAR A/D with n = 10, what is the first digital guess?

512

What is the light sensor slave address in our kit? Enter your answer as a **decimal value**. Hint: you need to check both the light sensor datasheet and the BoosterPack guide to see how the light sensor is configured on our board.

68

Which one is an interrupt trigger?

A hardware event that initiates the interrupt

Which component is at the heart of an SPI module?

A shift-register

If we wish to record the result of the conversion of the microphone input in 15th storage location in the ADC, and we like to use VSS and VCC as the Vref- and Vref+, what line of code we should use? (Keep in mind the microphone provides one single analog signal)

ADC14_configureConversionMemory(ADC_MEM14, ADC_VREFPOS_AVCC_VREFNEG_VSS, ADC_INPUT_A10, ADC_NONDIFFERENTIAL_INPUTS);

Which statement is true?

An interrupt is active while it is being serviced.

When the polarity of the clock is 1 and the phase of the clock is 0, what happens on the falling edge of the clock?

Both the initiator and the follower are sampling data (reading).

In order to enable an interrupt source to "interrupt" the processor, which action is NOT needed?

Configuring the interrupt source to have the highest interrupt priority.

What is the name of the ISR for the UART on our kit that gets connected to the computer as we used in project 1?

EUSCIA0_IRQHandler

What driverlib function configures the i/o pin for microphone to act as an analog input?

GPIO_setAsPeripheralModuleFunctionInputPin with last argument as GPIO_TERTIARY_MODULE_FUNCTION

Which one is true about an ISR?

ISR has neither input arguments nor returned value.

In our development environment including library files, stater code, etc, where can we find the names of the ISR functions?

In startup_msp432p401r_ccs.c

Which one is true about TA0.4?

It is connected to Pin 7 of Port 2.

Which one is NOT true about Red LED on the booster board?

It is driven by channel 0.3 of Timer_A.

Assume you have used Equation 11 of chapter 22 in MSP432 user manual and based on the values at hand in your A/D setup, you have figured that the right side of the inequality is 1ms. What can you say about the sampling speed?

It is less than or equal to 1000 samples per second.

Based on the figure shown in class (the one with the shift register), what bit is transferred in the first clock cycle of the SPI communication?

MSB

In an R-2R ladder, the switch that is connected to the left-most resistor (the resistor that is connected directly to the voltage source) is controlled by which bit?

MSB

In SPI, what happens if a master needs to read a byte from the slave, but does not need to send any data?

Master sends a dummy byte in exchange for the desired data.

Q26 What port the microphone is connected to?

P4

What pin is the microphone connected to?

Pin 3

Where can stack and heap be located in MSP432? Choose all possibilities.

RAM

Where can Driverlib functions be located in MSP432? Choose all possibilities.

RAM ROM Flash

The temperature sensor and the light sensor use I2C to connect the MSP432 on our kit. What signals do they share?

SCL and SDA

MOSI pin on the initiator/master can connect to what pins on the follower/slave? (choose all that are possible)

SIMO MOSI

When you buy a chip with an I2C interface, who decides on the I2C address used by that chip?

The chip manufacturer

In the basic_example_interrupts code, the two global variables are volatile. Learn more about volatile variables here: https://en.wikipedia.org/wiki/Volatile_(computer_programming) (Links to an external site.) What may happen if we do not put the volatile keyword in the variable declaration for S1modifiedFlag?

The compiler might modify the main function assuming S1modifiedFlag is always false and no one sets it to true. So, it may delete line 69 to 78 to improve the code.

Consider a processor that uses a Timer32 to generate PWM. Imagine a situation when the PWM is in the "on" cycle and the processor gets busy with another task, and therefore, is not able to change the "on" state to "off" state at the right moment. Nevertheless, the processor is not busy during the "off" cycle and switches back to the "on" cycle at the proper time. What happens to the PWM?

The duty cycle of the PWM goes higher than the desired value.

Which of the following is not part of the ADC block diagram?

The error flag generator in case something goes wrong with the conversion

Which statement is true?

There are multiple timer_A modules on MSP432 SoC and each timer_A has several OC/IC channels.

Between an A/D and D/A with the same number of bits, building an A/D is always more costly than D/A.

True

Robustness generally refers to the capability of a micro-controller or its software to deal with unexpected events, such as faults and loss of power.

True

Which eUSCI module on MSP432 is connected to the light sensor and temperature sensor on our kit?

UCB1

How does ISR communicates with other functions in the program?

Using global variables.

How do we clear an interrupt?

We send a command to the interrupt source to remove the interrupt.

When does a brownout situation occur?

When the operating voltage of the microcontroller drops to a point that the processor starts to make mistakes.

For a 10-bit SAR resolving one bit takes 1us. In other words, one round of making a digital guess, D/A conversion, comparison with the analog input and finally making a decision about the bit at hand takes 1us. How long does it take to do a complete conversion of an analog input?

always 10us.

Mechanism of SAR implementation is based on

binary search

Compare the daisy-chain and direct-configuration for multi-slave SPI setup. daisy-chain direct-configuration

cheaper but slower faster but needs more SS pins

What is the task that any properly designed ISR should do?

clear the interrupt flag

Match the memory type with how easy it is to write. RAM ROM Flash

easiest-to-write hardest-to-write moderately-easy-to-write

SPI is full-duplex , synchronous, and serial

full-duplex , synchronous, and serial

Assume we have recorded the conversion result of the microphone input in 15th storage location of the ADC. Which instruction correctly reads the result?

int result = ADC14_getResult(ADC_MEM14);

How many resistors exist in an n-bit binary-weighted D/A converter?

n+1

In I2C who can create the stop condition to finish the communication?

only masters

The PWM is NOT suitable for which of the below applications?

steering a self-driving car

For each type of function, who decides its address? Regular function ISR

the software toolchain (compiler/ linker / loader) the vector table within the interrupt controller

Consider a signal with a dynamic range of 50 mV. This means the difference between the minimum and maximum amount of this signal is 50 mV. If we like to feed this signal to an A/D where the Vref- is 0V and Vref+ is 3V, and n = 14. We need to amplify this signal before feeding it to the A/D. Among the below options, which one is the most suitable value for the gain of this amplifier?

times 50

Where can we find the I2C slave address of the temperature sensor?

tmp0006 datasheet

What is the name of the gate in the i/o pin schematics for pin 6.0 that passes an analog input without changing it?

transmission gate

How many voltage thresholds are needed for a proper implementation of brownout reset?

two

RAM is volatile ROM is non-volatile Flash is non-volatile

volatile non-volatile non-volatile

In a binary-weighted ladder D/A with n = 8, if the resistor attached to MSB is 256 kilo-ohm, what is the resistance of the resistor connected to LSB?

~33 Mega-ohm


Conjuntos de estudio relacionados

PrepU Chapter 3: Health, Illness, and Disparities

View Set

Chapter 1: Understanding Sociology

View Set

Principles of Nutrition and Human Development Chapter 1

View Set

NUR 222 - Test 1 PrepU super set

View Set