Embedded Final

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

L14 Consider a communication scheme where the bitrate is 1 Mbit/sec. The bits are packaged as packets of 20 bits, where 4 bits are used to specify the start and stop of the package and other protocol-related information. The rest of the bits are data bit. What is the data rate (in bits per second)?

0.8M

L39 Match each communication protocol with the explanation that best describes how many pins are required. I2C SPI UART Choose from: 2 for RX and TX + 1 for Ground 3 + the number of followers 2 for clock and data

2 for clock and data 3 + the number of followers 2 for RX and TX + 1 for Ground

L27 For a signal with the bandwidth of 1KHz, what is the minimum sampling rate that guarantees the sampled data is free of distortion, i.e. it is close enough to the original signal?

2000 samples per second

L35 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: Clock source multiplexer Clock Prescaler open-drain transistor Receive shift register Schmitt trigger Slave address Modulator An inverter gate

3 3 2 3 4 2 1 2

L6 How many bits in an integer (MSP432)?

32

L33 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? It resets the processor immidiately after it is cleared. We do not have enough information to answer this question. 0.5 seconds 500 seconds 2 milliseconds

500 seconds

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

512

L14 Consider a communication scheme where each symbol (baud) represents two bits. If the bitrate in this communication is 10 Kbit/sec, what is the baudrate?

5k

L6 How many bits in a signed character?

8

L26 How many resistors exist in an n-bit R-2R ladder? A. 2n+1 B. 2^n+1 C. n+1

A

L38 Which component is at the heart of an SPI module? A regular register A FIFO A shifter A shift-register

A shift-register

L40 Which peripheral on MPS432 is connected to the accelerometer? I2C SPI ADC Timer_A

ADC

L40 Which peripheral on MPS432 is connected to the microphone? ADC SPI I2C Timer_A

ADC

L31 Which statement is true? An interrupt is called pending when the trigger is about to happen. For example, the timer is close to being expired. An interrupt is active when the trigger has happened. For example the timer has expired. An interrupt is active while it is being serviced. An interrupt is inactive when it is not being serviced.

An interrupt is active while it is being serviced.

L34 In I2C, masters ____ able to drive the data line to zero. In I2C, masters ____ able to drive the data line to one. In I2C, slaves ____ able to drive the data line to zero. In I2C, slaves ____ able to drive the data line to one.

Are are not are are not

L18 Which one is the correct formula for UCBRF where N is the division factor? A. INT(N/16) B. INT([(N/16) - INT(N/16)] × 16) C. INT([(N/16) - INT(N/16)] / 16) D. INT([(N*16) - INT(N*16)] / 16)

B

L41 Which one of the below did we use for our projects this semester? Choose all that applies. Bare Metal Free RTOS TI RTOS COTS RTOS

Bare Metal

L41 Considering Bare Metal and RTOS: Which one gives you more control over the flow of program execution? Which one is easier to test and debug? Which one is better suited to support sophisticated User Interfaces? Which one improves the time-to-market in complicated applications with multiple tasks?

Bare metal Bare metal RTOS RTOS

L38 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? The initiator is writing and the follower is reading. Both the initiator and the follower are sampling data (reading). The initiator is reading and the follower is writing. Both the initiator and the follower are changing data (writing).

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

L26 How many resistors exist in an n-bit binary-weighted D/A converter? A. n B. n-1 C. n+1

C

L2 Which file types are mostly or entirely in machine language binary and unintelligible to humans? C File Assembly file Object file Executable file

C File -- Int Assembly file -- Int Object file -- Unint Executable file -- Unint

L2 The tool that translates high-level language to assembly is called _____ The tool that combines object files to create one executable is called _____ The tool that translates assembly to machine code is called ____

Compiler Linker Assembler

L31 In order to enable an interrupt source to "interrupt" the processor, which action is NOT needed? Enabling an interrupt enable flag that is associated with this source only. Configuring the interrupt source such that it can activate an interrupt trigger. Configuring the interrupt source to have the highest interrupt priority.

Configuring the interrupt source to have the highest interrupt priority.

L32 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? UART_ISR EUSCIA0_IRQHandler EUSCIA1_IRQHandler We can choose the name as we wish. UART_IRQHandler

EUSCIA0_IRQHandler

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

Easiest-to-write Hardest-to-write Moderately-easy-to-write

L29 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. 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.

F F

L12 Choose T/F for True and False. A static in C is a variable that is constant and does not change. A static variable is stored on the stack. A static variable defined within function Func1 can be accessed from outside Func1 by other functions. A static variable defined within function Func1 holds its value after Func1 finishes. The next time Func1 starts the old value of the static variable is still available.

F F F T

L41 Choose T/F. RTOS is always free. RTOS is always very complicated and one cannot build his/her own RTOS. There is a variety of options available for RTOS.

F F T

L41 Choose T/F. When a task is critical and needs to be done under a certain condition reliably, the best approach is to use RTOS. For applications with too many tasks especially complicated user interfaces, RTOS is more suitable.

F T

L40 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.

F T T

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

F T T T

L9 (T/F) In memory-mapped i/o, peripherals and memory certainly share a physical address bus. In memory-mapped i/o, peripherals and memory certainly share the same address space. In memory-mapped i/o, memory and the peripherals may share a physical address bus. In memory-mapped i/o, the processor uses the same instruction for reading from memory and reading from an i/o.

F T T T

L2 (T/F) The compiler that is used inside CCS (Code Composer Studio) for compiling C code to be executed on MPS432 chip is a native compiler.

False

L14 In terms of duplex: What is SPI? What is I2C? What is UART?

Full Half Full

L31 Which one is true about an ISR? ISR has neither input arguments nor returned value. ISR can have input arguments but no returned value. ISR can have returned value but no input arguments. ISR can have both input arguments and returned value.

ISR has neither input arguments nor returned value.

L31 Which one is NOT true about ISR? ISR stands for Interrupt Service Register. Another name for ISR is interrupt handler. ISR is essentially a function.

ISR stands for Interrupt Service Register.

L32 In our development environment including library files, stater code, etc, where can we find the names of the ISR functions? We do not need to find them, we can give ISR any name we like. In interrupt.h In startup_msp432p401r_ccs.c

In startup_msp432p401r_ccs.c

L15 When is the ideal time for sampling the data of a bit?

In the middle of the data bit.

L31 Consider TA2, Timer_A2, which is the one that is connected to the blue LED on the BoosterPack. We would like this timer's interrupt trigger to reach the processor. What command achieves that? Interrupt_enableInterrupt(INT_TA2_N); Timer_A_enableInterrupt(TIMER_A2_BASE); Timer_A_getInterruptStatus(TIMER_A2_BASE); Timer_A_getEnabledInterruptStatus(TIMER_A2_BASE);

Interrupt_enableInterrupt(INT_TA2_N);

L6 Consider an 8-bit number A is equal to 11001100. What can we say about value of A in decimal?

It can be either -52 or 204.

L30 Which one is true about TA0.4? It is connected to Pin 7 of Port 2. It is connected to Pin 2 of Port 7. It is associated with channel 0 of Timer_A with index 4. It is associated with channel 4 of the only Timer_A available on MSP432.

It is connected to Pin 7 of Port 2.

L30 Which one is NOT true about Red LED on the booster board? It is driven by channel 0.3 of Timer_A. It is driven by Port 2, pin 6 GPIO. It is driven by channel 3 of Timer_A0. It is connected to J4.39 connector pin on the Booster board.

It is driven by channel 0.3 of Timer_A.

L31 Which statement is NOT true? It is not possible to have more than one active interrupt. It is not possible to have more than one pending interrupt. A high-priority interrupt can stop the execution of a lower priority interrupt's ISR.

It is not possible to have more than one pending interrupt.

L38 MOSI pin on the initiator/master can connect to what pins on the follower/slave? (choose all that are possible) MISO MOSI SOMI SIMO SS CS

MOSI SIMO

L38 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 We cannot tell. LSB

MSB

L38 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. Master closes the transmit line (puts it in high-impedance) and receives the desired byte.

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

L3 On the Launchpad, how many chips (also known as microchips, or IC's) are there?

More than 4

L10 For each of the programming methods, choose whether the high-level code can be easily ported from one processor, such as MSP432, to another processor, such as PIC32. noHAL_noDriverlib: not portable noHAL_Driverlib: not portable HAL_noDriverlib portable

Not portable Not portable Portable

L8 In an MSP432 digital I/O module, there are ___ Schmitt triggers, ___ 2-input logic gates, ___ multiplexers, and ___ components that act as switches (tri-state buffers, latch with enables, etc.)

One Two Three Three

L36 What does "static" mean in this declaration? volatile static bool JSBmodified; Only functions within this file will have access to it. It will not be stored on the stack; it will be stored in the data section of the memory and will maintain its status from one call to the next.

Only functions within this file will have access to it.

L40 Where can stack and heap be located in MSP432? Choose all possibilities. RAM ROM Flash

RAM

L40 Where can Driverlib functions be located in MSP432? Choose all possibilities. RAM ROM Flash

RAM ROM Flash

L3 What types of memory are included on the MSP432?

ROM, SRAM, and Flash memory

L14 In terms of synchronous or asynchronous: What is SPI? What is I2C? What is UART?

S S A

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

SCL and SDA

L23 How do we initialize a SW timer to wait for 8 seconds?

SWTimer_construct(8000)

L14 In terms of serial or otherwise: What is SPI? What is I2C? What is UART?

Serial Serial Serial

L33 (T/F) 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.

T

L40 Choose T/F. MAP_GPIO_setAsPeripheralModuleFunctionInputPin is stored on ROM. MAP_GPIO_interruptEdgeSelect is stored on ROM.

T F

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

T F T

L36 Select T/F. In project3 , we are not given an application structure, but you can add one if you wish. Since this project is interrupt-based, you will not need an enum for your state. You must use a hardware timer to measure the Title Screen's 2 second display time.

T F T

L38 Choose T/F. In SPI, it is possible to configure on what phase/edge of the clock the master and slaves should sample the data. 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). In SPI, only the master can drive the clock. In SPI, activating the Slave Select signifies the start of communication.

T F T T

L11 What can you say about FSM? Choose between T/F. FSM stands for Finite State Machine. FSM is a mathematical model of computation. FSM is an abstract machine. FSM is the C code that implements a certain algorithm. FSM is a mechanical machine that is capable of doing calculations. FSM is a machine that can go into an infinite number of states. FSM is defined by a list of states, an initial state, and conditions for transitions between the states. An FSM is weaker than the combinational logic model. Some examples of the behavior of an FSM are traffic lights, vending machines, and elevators. An FSM is more powerful than the Turing machine.

T T T F F F T F T F

L33 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. The counter in the watchdog timer should be reset (loaded with 0) on a regular basis by the software. If the counter in the watchdog timer overflows (rolls over), the processor is reset. Resetting a watchdog timer resets the processor. When a processor faces a hardware or software issue and is stuck, it fails to reset the watchdog timer. Resetting the watchdog timer on a regular basis acts as a healthy pulse for the processor status.

T T T F T T

L34 When you buy a chip with an I2C interface, who decides on the I2C address used by that chip? The programmer The chip manufacturer The PCB designer Your boss

The chip manufacturer

L29 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. The duty cycle of the PWM goes lower than the desired value. The duty cycle of the PWM does not change, but the whole pulse gets shifted (delayed)

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

L41 In the examples, we covered in this class, who decides what part of code is run at any given time? A scheduler program (OS) on MPS432. A scheduler program (OS) on the debugger chip. The flow of the program as was written in the project decides what part of the code is run next. A hardware scheduler decides what part of code is executed next.

The flow of the program as was written in the project decides what part of the code is run next.

L31 Which one is an interrupt trigger? The hardware event that initiates the interrupt A flag in the interrupt controller A button that initiates an interrupt

The hardware event that initiates the interrupt

L30 Which statement is true? There are multiple timer_A modules on MSP432 SoC and each timer_A has several OC/IC channels. There are multiple timer_A modules on MSP432 SoC and each timer_A has one OC/IC channel. There is one timer_A module on MSP432 SoC that has just one OC/IC channel. There is one timer_A module on MSP432 SoC that has several OC/IC channels.

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

L31 Consider TA2, Timer_A2, which is the one that is connected to the blue LED on the BoosterPack. We would like this timer to trigger an interrupt whenever the timer rolls over. What command achieves that? Interrupt_enableInterrupt(INT_TA2_N); Timer_A_enableInterrupt(TIMER_A2_BASE); Timer_A_getInterruptStatus(TIMER_A2_BASE); Timer_A_getEnabledInterruptStatus(TIMER_A2_BASE);

Timer_A_enableInterrupt(TIMER_A2_BASE);

L13 (x,y) = (0,0) is located at the ___ ___ of the LCD screen (x,y) = (0,127) is located at the ___ ___ of the LCD screen

Top, Left Bottom, Left

L3 (T/F) MCU (Microcontroller unit) consists of a CPU (Central Processing Unit), memory and some other peripherals.

True

L33 How many voltage thresholds are needed for a proper implementation of brownout reset? two. one. none.

Two

L32 How does ISR communicates with other functions in the program? Using external variables. Using global variables. Using static variables. An ISR never needs to communicate with other functions. Using input and output arguments.

Using global variables.

L6 Does adding 0x0fffefee and 0x0efffffff result in an overflow?

We do not have sufficient information to answer this question with yes or no.

L31 How do we clear an interrupt? We send a command to the interrupt source to remove the interrupt. We send a command to the interrupt controller to remove the interrupt.

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

L33 When does a brownout situation occur? When the microcontroller heats up due to high activity. When the operating voltage of the microcontroller falls below its nominal value. When the operating voltage of the microcontroller drops to a point that the processor starts to make mistakes. When the microcontroller is reset due to a problem.

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

L20 Choose if any of the below computer systems is working under real-time constraints or not? A small microcontroller implementing the anti-lock brake system of a car. A massive supercomputer which is performing DNA sequencing. The MCU inside a joystick that handles the joystick operations. A laptop zipping up a large folder while the human user is anxiously waiting.

Y N Y N

L28 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? We do not have enough information. always 1us. always 10us. on avarage 5us.

always 10us.

L2 Order the abstraction levels from low to high

atoms transistors gates digital circuits architectural units (cash, register file, FIFO, ALU) system components (CPU, UART, RAM)

L28 Mechanism of SAR implementation is based on binary search linear search machine learning op-amps with feedback.

binary search

L39 Which of the following are SPI interrupts on the MSP432? Choose all that apply. receive buffer is empty transmit buffer is full character is loaded into the receive buffer transmit buffer is ready to accept a character

character is loaded into the receive buffer transmit buffer is ready to accept a character

L38 Compare the daisy-chain and direct-configuration for multi-slave SPI setup. daisy-chain direct-configuration Choose from: cheaper but slower faster but needs more SS pins

cheaper but slower faster but needs more SS pins

L32 What is the task that any properly designed ISR should do? ring an alarm clear the interrupt flag count the number of times the interrupt has happened

clear the interrupt flag

L17 According to the Launchpad schematics, XDSET_RXD is .....

directly across P1.3_BCLUART_TXD and is connected to it when a jumper is present.

L16 Where is the best place to keep project variables, such as FSM states?

in an application struct

L34 In I2C who can create the stop condition to finish the communication? only slaves only masters both masters and slaves

only masters

L29 The PWM is NOT suitable for which of the below applications? steering a self-driving car control the speed of a motor control the temperature of an oven create a certain RGB color mix

steering a self-driving car

L36 In project 3, what feature signifies your processor is asleep? the green Launchpad LED turns off the green Launchpad LED stays lit except for fractions of a second the Boosterpack LED toggles when JSB is pressed

the green Launchpad LED stays lit except for fractions of a second

L31 For each type of function, who decides its address? Functions: regular function ISR Choose between: the software toolchain (compiler/linker/loader) the vector table within the interrupt controller

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

L32 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? A code written by polling the hardware triggers. Which type of code development lends itself well to building low-power smart devices? Which type of program is allowed to use global variables.

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

L40 Choose "volatile" or "non-volatile": RAM is _____ ROM is _____ Flash is _____

volatile non-volatile non-volatile

L36 Under what conditions is it OK to use the SWTimer in project 3? when it's called in the main loop when timer expiration doesn't require immediate action when it's called in the ISR

when timer expiration doesn't require immediate action

L18 Which one of the below components is part of a UART module on MSP432? Choose between "Yes" and "No" Transmit State Machine Transmit shift register Receive shift register Baud rate generator The error flag generator Transmit and Receive buffers

y y y y y y

L26 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

L6 Which one of the following numbers can fit in a 2's complement 16-bit register?

-2^15

L15 A UART module shares a clock with the processor core that is 4MHz. The Baudrate is set at 10,000 baud/sec. What is the length of time the UART has to wait between sampling two consecutive bits?

0.1ms

L14 What is the odd parity for this 8-bit piece of data 10101111? What is the even parity for this 8-bit piece of data 11101111?

1 1

L23 SWTimer_elapsedCycles is called when using which functionality? (Check all that apply.) 1. stopwatch 2. timer 3. percentage of time elapsed

1, 2, AND 3

L15 What are the number of bits in a UART packet of data with the default number of start bits, 8 data bits, 2 stop bits, and no parity bits?

11

L15 A UART uses Baudrate of 100 K Baud/sec. The counter inside the UART uses a 1MHz clock as its input, how long after the beginning of the start bit (the falling edge moment), we should sample the first data bit?

15us

L6 What is the highest number that can be stored in an unsigned long? (Hint: A C long is four bytes.)

2^32-1

L6 Which one is bit 4 mask? A. 2^4 B. 2^5 C. 2^3

2^4

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

2^n - 1

L26 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? A. MSB B. LSB C. It can be either of LSB or MSB depending on R-2R design.

A

L17 Choose T/F: Launchpad has a dedicated serial port for UART communication. Most modern laptops have a dedicated serial port for UART communication. The UART frame arriving at Launchpad port is routed directly to MSP432. MobaXterm is an application that provides a variety of communication terminals including serial (UART). XDS11 receives a USB package from the Launchpad USB port and converts it to a UART frame before passing it to MSP432.

F F F T T

L8 (T/F) A programmer is not able to change the functionality of a digital I/O after the chip is manufactured with a certain configuration. A programmer is not able to change the functionality of a digital I/O after the chip is placed on a PCB board with certain peripherals and a specific configuration. A programmer is able to change the configuration of a digital I/O at any time.

F F T

L15 (T/F) In UART, sender, and transmitter share a clock signal. In UART, baud rate is equal to bit rate. In UART, bit rate is equal to data rate.

F T F

L9 (T/F) One single port has multiple memory addresses that are associated with different pins One single port has multiple memory addresses that are associated with different functionalities. One single port has one single memory address. One single pin has one single memory address.

F T F F

L10 (T/F) API is a special form of HAL. HAL is a special form of API. HAL functions can be found in the driverlib manual. We can use driverlib functions to develop (implement or write the code for) HAL. HAL stands for Hardware Abstraction Level. Driverlib is a form of API. Driverlib is a form of HAL.

F T F T F T F

L8 (T/F) In MSP432, a digital I/O cannot be used for any other purpose such as an analog input. In MSP432, any digital I/O pin can be configured to be a digital input. In MSP432, any digital I/O pin can be configured to be a digital output. In MSP432, a digital input can use any of these three options: 1) attached pull-up resistor, 2) attached pull-down resistor, 3) no attached resistor.

F T T T

L4 What's the difference between Little Endian and Big Endian? Which is applied on the MSP432?

In Little Endian machines, last byte of binary representation of the multi-byte data-type is stored first while in Big Endian machines, first byte of binary representation of the multi-byte data-type is stored first. Little-Endian

L8 What selects a certain input among multiple inputs? What is able to cut off a path in the circuit? What can act as a basic analog to digital converter?

Multiplexor Tri-state buffer Schmitt trigger

L8 (T/F) A port is a combination of pins. MSP432 has 1 port, but many pins. A port is used as output and a pin as input. Port and pin are two names of the same thing.

T F F F

L5 (T/F) 1) A struct in the C programming language is a composite data type (or record) declaration that defines a physically grouped list of variables to be placed under one name in a block of memory, allowing the different variables to be accessed via a single pointer. 2) In C, a struct can be returned value of a function. 3) In C, it is possible to pass a struct to a function by its pointer and get it modified by the function.

True True True

L10 What is the reason to use HAL? Choose "yes" for all that applies. It makes the code more readable. It makes the code easier to port from one processor to another. It reduces the size of the machine code binary after compilation. It improves the efficiency of the program (e.g. it becomes faster or uses fewer resources.)

Yes Yes No No

L3 For the following components, choose if they're related to the Boosterpack, Launchpad, or MSP432 chip. - Joystick - ADC (Analog-to-Digital Converter) - Large round S1 and S2 buttons - Timer_A - Timer32 - UART - micro-USB port - Debugger chip

B M B M M M L L

L17 According to MSP432 datasheet, is it possible for P2.3 to have the below roles? Choose Y/N 1) RXD (Rx of UART) 2) TXD( Tx of UART) 3) SIMO (SIMO of SPI) 4) SOMI (SOMI of SPI)

N Y Y N

L24 (T/F) Consider an A/D with n = 4 and Vref- = 0V and Vref+ = 4V. Assume the A/D uses the floor of the conversion formula when turning non-integers to integers. There are 16 possible digital outputs. If the input is 0 V, the output is 0000. The voltage value of LSB is 0.25 V. If the input voltage is 0.95, the output is 0011. The A/D analog span is 4 V. If the input voltage is 1.95, the output is 1000.

T T T T F F

L6 What is the lowest number that can be stored in a signed short? (Hint: A C short is two bytes.)

-2^15

L12 Which instruction draws the string with an opaque background (overwrites what is beneath)? A. Graphics_drawString(g_sContext_p, (int8_t *)"Test", -1, 10, 10, true); B. Graphics_drawString(g_sContext_p, (int8_t *)"Test", -1, 10, 10, false); C. Graphics_drawString(g_sContext_p, (int8_t *)"Test", 0, 10, 10, false);

A

L5 Looking at the following code: typedef struct { int x, y, z; char c; } bunch_t; void WorkwithBunch(bunch_t *inputBunch_p) { // Later inside the main bunch_t myBunch = {1, 2, 3, '7'}; bunch_t *bunchPtr = &myBunch; } What is the best way to call WorkwithBunch()? A. WorkwithBunch(bunchPtr); B. WorkwithBunch(*bunchPtr); C. WorkwithBunch(&bunchPtr);

A

L6 A single-bit bitmask is a bitstring where all the bits are 0 except for a single bit, which is 1. If that single bit is located at index i, we call the bitmask BITi. For example, BIT0 is equal to 1 and BIT1 is equal to 2 and BIT2 is equal to 4, and so on. If we intend to reset bits 10 and 20 of an integer, and we like to create a macro mask, what should go in the blank space below?. If we intend to reset bits 10 and 20 of an integer, and we like to create a macro mask, what should go in the blank space below? #define NEW_MASK .... x = x & ~NEW_MASK; A. (BIT10 | BIT20) B. BIT10 | BIT20 C. BIT10 & BIT20 D. ~(BIT10 | BIT20)

A

L19 Which of these functions were written by the device manufacturer (part of Driverlib or Grphics library), and which were written by the application programmer (Matthew Zhong and Leyla Nazhand-Ali)? GFX_print Graphics_drawString GFX_removeSolidCircle LED_isLit

AP DM AP AP

L23 Which of the following is the correct way to start the SW timer defined earlier in the code as blinkingTimer? A. SWTimer_start(blinkingTimer); B. SWTimer_start(*blinkingTimer); C. SWTimer_start(&blinkingTimer);

C

L25 Assume we have recorded the conversion result of the microphone input in 15th storage location of the ADC. Which instruction correctly reads the result? A. int *result = ADC14_getResult(14); B. int result = ADC14_getResult(14); C. int *result = ADC14_getResult(ADC_MEM14); D. int result = ADC14_getResult(ADC_MEM14);

D

L27 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 more than or equal to 1000 samples per second. It is less than or equal to 1000 samples per second. It is equal to 1000 samples per second.

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

L15 (T/F) UART is asynchronous. UART is always half-duplex. UART has two data lines between sender and transmitter.

T F T

L15 Assume we are transmitting single bytes with a parity bit. Choose T/F. When sending ASCII of 'L', the odd parity is 0. When sending 0x23, the even parity is 0. When sending the decimal 0, the odd parity is 1.

T F T

L27 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

L19 (T/F) HAL_refresh and App_GuessTheColor_loop could be called in any order.

True

L6 Which one is bit 23 mask (BIT23)?

(1<<23)

L3 What is the XDS110 What is the MSP432

- the is the emulator on the launchpad board that helps program/debug the main microcontroller - the main microcontroller on the Launchpad board

L8 Consider a Schmitt trigger with two thresholds at 1.4V and 1.6V. Also, assume the logic 0 is 0V, and logic 1 is 3V. What is the output of the Schmitt trigger when the input is 0.2V? What is the output of the Schmitt trigger when the input is 1.55V? What is the output of the Schmitt trigger when the input is 2.33V?

0V We cannot tell. It depends. 3V

L21 A 16-bit periodic count-down timer uses a clock source of 2KHz and clock divider of 2, choose proper options for How much is the frequency of the clock that feeds the counter inside this timer? What is the largest Load value for this timer? Based on the answer to part 2, approximately, how long is the longest period for this periodic timer? Assume the Load value is set at 999 and no rollover has happened between events, e1 and e2. If the counter reading (the value inside the counter) for the two events, c1 and c2, are 550 and 200, how long has elapsed between the two events? Assume the load value is 9999. Once an event, e1, happens, the light should turn on and stay on for 3 seconds. If the counter value when e1 happens is 2000 and we immediately turn on the light, what should be the counter value when we have to turn off the light (after 3 seconds)?

1 KHz 2^16 - 1 65.536 s 350 ms 9000

L8 On the Launchpad board, Button 2 is connected to Port __ , Pin __ and the red LED is connected to Port __ , Pin __.

1,4 2,0

L20 What is the clock frequency of a processor whose clock period is 1ms?

1kHz

L3 How many PCB boards are there in the Launchpad and Boosterpack?

2

L27 Assume in an A/D the maximum possible sampling rate is 4000 samples per second. What is the maximum possible bandwidth of a signal we can sample without distortion?

2kHz

L20 In terms of seconds, how long is 2 million cycles of a processor with a clock frequency of 1MHz?

2s

L20 For a processor with a clock frequency of 1 GHz, how many cycles exist in 3 seconds?

3,000,000,000

L21 Consider a periodic timer in count-down mode where the Load value is 11,999. The counter value at the time of e1 (first event) and e2 (second event) is 5000 and 2000 respectively and three rollovers have happened between the two events. How many counter cycles has it elapsed between the two events?

39000

L15 In a UART where the BRCLK's frequency (BRCLK is the input clock of the UART counter) is 500KHz and Baudrate is 115200, what are the integer part and the fractional part of the division factor (the potential load value of the counter)?

4 and 0.34

L7 A C expression to compute a * 19 (a times 19) is: (Recall that one time shift to left doubles an integer. ) A. (a << 16) + (a << 3); B. (a << 4) + (a << 1) + a; C. (a << 4) + (a << 1) + 1; D. (a << 4) + (a << 2) + a;

B

L21 Consider a periodic counter in the count-down mode. The counter value at the time of events, e1 and e2 were c1, and c2 respectively. What can we say about e1, e2, c1, and c2? A. C1 is more than C2 if e1 happens before e2. B. C1 is less than C2 if e1 happens before e2. C. C1 is can be either more than or less than C2 if e1 happens before e2.

C

L12 Which of the following will draw a horizontal line on the right side of the screen, one quarter of the way up from the bottom? A. Graphics_drawLineH(&g_sContext, 96, 64, 127); B. Graphics_drawLineH(&g_sContext, 32, 64, 127); C. Graphics_drawLineH(&g_sContext, 64, 127, 32); D. Graphics_drawLineH(&g_sContext, 64, 127, 96);

D

L2 (T/F) - A computer is a device that has a keyboard and a monitor and can run arithmetic and logical operations. - All computer systems are embedded systems. - All embedded systems are computer systems. - Embedded systems always use low-end microcontrollers rather than high-end microprocessors. - In today's world, embedded systems consist of about 90% of the computer systems.

F F T F F

L3 (Y/N) Is any of the following components part of MSP432 MCU? - simple peripherals such as buttons and LEDs - Blocks that are in charge of reset, clock, and power - Several timers - Different types of memory - Analog interface including ADC (Analog to Digital Converter) - Digital interface including UART SPI, I2C, I/O ports - CPU

N Y Y Y Y Y Y

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

T

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

T F F F T

L24 (T/F) Consider an A/D with n =1, Vref - = 0V, Vref+ = 1V. Assume the A/D uses the floor of the conversion formula when turning non-integers to integers. If the input is 0.4 V, The output is 0. If the input is 0.7 V, The output is 0. LSB is worth 0.5 V.

T F T

L24 Consider two A/Ds n= 4, Vref-=0, Vref+=2V n = 8, Vref-=-1V, Vref+ = 1V Choose all that is correct. The digital resolution of the second A/D is higher than the first one. The voltage resolution (1LSB or analog resolution) of the second A/D is larger than the first one. Both A/D have the same full-scale range or analog range.

T F T

L15 For a UART module with (8N1) format (which means 8 data bits, No parity and 1 stop bit), and Baudrate of 1000 Baud-per-second. Assume the channel is used at its full capacity. choose all the true statements: The bitrate is 1000 bit/sec. The data rate is 1000 bit/sec. The data rate is 800 bit/sec. The bitrate is 2000 bit/sec.

T F T F

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

T T F

L8 (T/F) In MSP432, the configuration of a single digital I/O pin depends on the values of several registers. In MSP432, one register can affect the configuration of multiple digital I/O pins. In MSP432, each digital I/O has a dedicated register that controls its configuration.

T T F

L14 Choose if the below statements on the subject of debouncing buttons (switches) are true or false. Switch debouncing is some form of signal filtering. When we press a button, the two metals of the button do not create instant contact, instead, they connect and disconnect several times until they settle in the pressed state and remain connected. There is only one method to debounce a button. Switch debouncing is some form of signal amplification. Switch debouncing creates the illusion of a perfect switch to the user. In an FSM, it is possible that some inputs are Don't Care for some of the transition arcs. It is possible to use analog components such as resistors and capacitances to debounce a switch.

T T F F T T T

L24 Consider a D/A with n = 2, Vref- = -1V and Vref+ = +1V. Choose all that is correct. The LSB is worth 0.5V. If the input is 00, the output is -1V. If the input is 11, the output is +1V. If the input is 10, the output is 0V. The digital resolution is 2 bits. The analog resolution is 2/3 of a volt.

T T F T T F

L22 Select T/F. Software timers can be used to measure much longer time periods than hardware timers. You can have an unlimited number of software timers. In the Guess-the-Color project, Timer.h can be found in the HAL folder.

T T T

L9 (T/F) Consider typical 32-bit and 16-bit microcontrollers (Links to an external site.) and choose which of the below statements are true or false. The datapath of a 32-bit microcontroller is twice as wide as a 16-bit microcontroller. The address bus of a 32-bit microcontroller is twice as wide as a 16-bit microcontroller. The Registers of a 32-bit microcontroller have twice as many bits as a 16-bit microcontroller. The ALU of a 32-bit microcontroller is capable of handling operands that are twice as wide as a 16-bit microcontroller. The address space of a 32-bit microcontroller is twice as big of a 16-bit microcontroller. f

T T T T F


Ensembles d'études connexes

MGMT 322 QUIZ 8, MKT 350 Test 3, MKTG 351 CHAPTER 15, MKT 230 Chapter 14, QUIZ Chapters 11, 14,15,, MKTG 330: Chapter 14 Quiz, MKTG 409 Chapter 14

View Set

STI's and HIV (Lewis Ch.s 14 + 52) Practice Quest.'s

View Set

Ch. 18 Disorders of Though, Emotion, and Memory

View Set

Intermediate Financial Management Exam One

View Set

Section 7: Fixed-Period (P) Systems

View Set

Psych- Ch. 10: Emotion and Motivation

View Set