electrical and computer engineering fall 2012 …...electrical and computer engineering fall 2012...

10
NAME:_________________________________ Electrical and Computer Engineering FALL 2012 BREADTH EXAM Problems 2/3/4 TTG Area: High Performance and Embedded Computing ECGR-5101: Embedded Systems All engineers want to know the accurate time of the New Year, midnight, January 1, so you have decided you want a “Countdown to the New Year” clock. You believe it is more fun to design and build your own rather than buy one. You have learned that it is effective to write good requirements up front in order to best design the device. A friend will take care of the decorations and power supply for the end device (she will provide you with 5v and 3.3v). a) Write 10 requirements for the control and display system. Use proper requirements language (complete sentences, use words like should and will). (60 points) b) Assume you will use a Renesas RX62N microcontroller for this effort (note: NOT the RX62N Evaluation Board). List the RX62N microcontroller on-board peripherals you will need for this design. (15 points) c) Write a state diagram for your design. (25 points) This photo shows a similar counter to count down to Santa Claus’ arrival.

Upload: others

Post on 15-May-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Electrical and Computer Engineering FALL 2012 …...Electrical and Computer Engineering FALL 2012 BREADTH EXAM Problems 2/3/4 TTG Area: High Performance and Embedded Computing ECGR-5101:

NAME:_________________________________

Electrical and Computer Engineering FALL 2012 BREADTH EXAM

Problems 2/3/4 TTG Area: High Performance and Embedded Computing

ECGR-5101: Embedded Systems

All engineers want to know the accurate time of the New Year, midnight, January 1, so you have decided you want a “Countdown to the New Year” clock. You believe it is more fun to design and build your own rather than buy one. You have learned that it is effective to write good requirements up front in order to best design the device. A friend will take care of the decorations and power supply for the end device (she will provide you with 5v and 3.3v).

a) Write 10 requirements for the control and display system. Use proper requirements language (complete sentences, use words like should and will). (60 points)

b) Assume you will use a Renesas RX62N microcontroller for this effort (note: NOT the RX62N Evaluation Board). List the RX62N microcontroller on-board peripherals you will need for this design. (15 points)

c) Write a state diagram for your design. (25 points)

This photo shows a similar counter to count down to Santa Claus’ arrival.

Page 2: Electrical and Computer Engineering FALL 2012 …...Electrical and Computer Engineering FALL 2012 BREADTH EXAM Problems 2/3/4 TTG Area: High Performance and Embedded Computing ECGR-5101:

NAME:_________________________________

Page 3: Electrical and Computer Engineering FALL 2012 …...Electrical and Computer Engineering FALL 2012 BREADTH EXAM Problems 2/3/4 TTG Area: High Performance and Embedded Computing ECGR-5101:

NAME:_________________________________

Page 4: Electrical and Computer Engineering FALL 2012 …...Electrical and Computer Engineering FALL 2012 BREADTH EXAM Problems 2/3/4 TTG Area: High Performance and Embedded Computing ECGR-5101:

NAME: _________________________________

Department of Electrical and Computer Engineering FALL 2015 COMPREHENSIVE/BREADTH EXAM

Questions 4.1 TTG Area: High Performance Embedded Computing

ECGR 4101 Embedded Systems

Consider the embedded system described below: Your goal is to design an embedded system (embedded system board with electronics and sensors) that interfaces with a quad rotor’s flight control board that will prevent the vehicle from colliding with objects. Req. 1. The embedded system (board) you design will consist of a microcontroller, sensors,

and any other circuitry needed. Req. 2. The board will be bolted to the bottom of the quadrotor vehicle. Req. 3. The embedded system will use inexpensive, low-mass ultrasound sensors that are

digitally triggered (microcontroller sends a pulse to activate, gets a pulse back when an object is detected).

Req. 4. The embedded system will use an inexpensive MSP430 microcontroller. Req. 5. The embedded system will determine if a collision is imminent (1 meter) and instruct

the quad rotor flight control board to move in a safe direction. Req. 6. The embedded system should sense an imminent collision in all directions except up. Req. 7. The embedded system will communicate with the quad rotor flight control board via

UART. Req. 8. The embedded system will have access to 5v, 3.3v, and ground from the quad rotor

flight control board. Req. 9. The embedded system will send a single data byte to the quad rotor flight control board

to indicate the direction to move (including “no change needed”). Req. 10. The quad rotor flight control board will respond to the embedded system with an ACK

or NAK response. Req. 11. The embedded system should send the move commands 10 times a second. Req. 12. The speed of sound is 340 m/s.

Test Questions 1) Which MSP430 chip would you choose to work on the embedded system board and why?

(use the MSP430 reference pages from the appendix) (10 points) 2) Draw a hardware block diagram of your embedded system. Include connection labels. Do

not include the quad rotor flight control board (that is already designed!). (30 points) 3) Write the software interface description for communications between the embedded system

board and the quad rotor flight control board. (20 points). 4) Write the algorithms needed for the embedded system board to operate. (40 points)

Page 5: Electrical and Computer Engineering FALL 2012 …...Electrical and Computer Engineering FALL 2012 BREADTH EXAM Problems 2/3/4 TTG Area: High Performance and Embedded Computing ECGR-5101:

ti.com/msp430

12 Device Catalog

1Prices are quoted in U.S. dollars and represent year 2014 suggested resale price for TSSOP package. New products are listed in bold red. *Represents number of capture/compare registers per timer.

MSP430G2xx Value Line Series – Up to 16 MHz

Part Number Flash(KB)

SRAM(B)

I/O(max)

Timers

Watchdog BORUSI:

I2C/SPI

USCI: I2C/SPI/

UART Comp_A+Temp

SensorADC

Ch/ResAdditionalFeatures Packages

1ku Price1

(U.S. $)Total A* B*

G2xx0MSP430G2210 2 128 4 1 2 — l l — — l — Slope — 8SOIC 0.35MSP430G2230 2 128 4 1 2 — l l l — — l 4 ch ADC10 — 8SOIC 0.40G2xx1MSP430G2001 0.5 128 10 1 2 — l l — — — — — — 14TSSOP, N; 16QFN 0.34MSP430G2101 1 128 10 1 2 — l l — — — — — — 14TSSOP, N; 16QFN 0.44MSP430G2121 1 128 10 1 2 — l l l — — — — — 14TSSOP, N; 16QFN 0.46MSP430G2201 2 128 10 1 2 — l l — — — — — — 14TSSOP, N; 16QFN 0.47MSP430G2221 2 128 10 1 2 — l l l — — — — — 14TSSOP, N; 16QFN 0.49MSP430G2111 1 128 10 1 2 — l l — — l — Slope — 14TSSOP, N; 16QFN 0.46MSP430G2211 2 128 10 1 2 — l l — — l — Slope — 14TSSOP, N; 16QFN 0.49MSP430G2131 1 128 10 1 2 — l l l — — l 8 ch ADC10 — 14TSSOP, N; 16QFN 0.49MSP430G2231 2 128 10 1 2 — l l l — — l 8 ch ADC10 — 14TSSOP, N; 16QFN 0.55G2xx2MSP430G2102 1 256 16 1 3 — l l l — — — — CT 14TSSOP; 20TSSOP, N; 16QFN 0.48MSP430G2202 2 256 16 1 3 — l l l — — — — CT 14TSSOP; 20TSSOP, N; 16QFN 0.50MSP430G2302 4 256 16 1 3 — l l l — — — — CT 14TSSOP; 20TSSOP, N; 16QFN 0.55MSP430G2402 8 256 16 1 3 — l l l — — — — CT 14TSSOP; 20TSSOP, N; 16QFN 0.65MSP430G2112 1 256 16 1 3 — l l l — l — Slope CT 14TSSOP; 20TSSOP, N; 16QFN 0.49MSP430G2212 2 256 16 1 3 — l l l — l — Slope CT 14TSSOP; 20TSSOP, N; 16QFN 0.55MSP430G2312 4 256 16 1 3 — l l l — l — Slope CT 14TSSOP; 20TSSOP, N; 16QFN 0.60MSP430G2412 8 256 16 1 3 — l l l — l — Slope CT 14TSSOP; 20TSSOP, N; 16QFN 0.65MSP430G2132 1 256 16 1 3 — l l l — — l 8 ch ADC10 CT 14TSSOP; 20TSSOP, N; 16QFN 0.55MSP430G2232 2 256 16 1 3 — l l l — — l 8 ch ADC10 CT 14TSSOP; 20TSSOP, N; 16QFN 0.55MSP430G2332 4 256 16 1 3 — l l l — — l 8 ch ADC10 CT 14TSSOP; 20TSSOP, N; 16QFN 0.60MSP430G2432 8 256 16 1 3 — l l l — — l 8 ch ADC10 CT 14TSSOP; 20TSSOP, N; 16QFN 0.70MSP430G2152 1 256 16 1 3 — l l l — l l 8 ch ADC10 CT 14TSSOP; 20TSSOP, N; 16QFN 0.55MSP430G2252 2 256 16 1 3 — l l l — l l 8 ch ADC10 CT 14TSSOP; 20TSSOP, N; 16QFN 0.60MSP430G2352 4 256 16 1 3 — l l l — l l 8 ch ADC10 CT 14TSSOP; 20TSSOP, N; 16QFN 0.65MSP430G2452 8 256 16 1 3 — l l l — l l 8 ch ADC10 CT 14TSSOP; 20TSSOP, N; 16QFN 0.70G2xx3MSP430G2203 2 256 24 2 3 — l l — l — — — CT 20TSSOP, N; 28TSSOP; 32QFN 0.60MSP430G2303 4 256 24 2 3 — l l — l — — — CT 20TSSOP, N; 28TSSOP; 32QFN 0.65MSP430G2403 8 512 24 2 3 — l l — l — — — CT 20TSSOP, N; 28TSSOP; 32QFN 0.75MSP430G2213 2 256 24 2 3 — l l — l l — Slope CT 20TSSOP, N; 28TSSOP; 32QFN 0.60MSP430G2313 4 256 24 2 3 — l l — l l — Slope CT 20TSSOP, N; 28TSSOP; 32QFN 0.65MSP430G2413 8 512 24 2 3 — l l — l l — Slope CT 20TSSOP, N; 28TSSOP; 32QFN 0.75MSP430G2513 16 512 24 2 3 — l l — l l — Slope CT 20TSSOP, N; 28TSSOP; 32QFN 0.90MSP430G2133 1 256 24 2 3 — l l — l — l 8 ch ADC10 CT 20TSSOP, N; 28TSSOP; 32QFN —MSP430G2233 2 256 24 2 3 — l l — l — l 8 ch ADC10 CT 20TSSOP, N; 28TSSOP; 32QFN 0.60MSP430G2333 4 256 24 2 3 — l l — l — l 8 ch ADC10 CT 20TSSOP, N; 28TSSOP; 32QFN 0.65MSP430G2433 8 512 24 2 3 — l l — l — l 8 ch ADC10 CT 20TSSOP, N; 28TSSOP; 32QFN 0.75MSP430G2533 16 512 24 2 3 — l l — l — l 8 ch ADC10 CT 20TSSOP, N; 28TSSOP; 32QFN 0.90MSP430G2153 1 256 24 2 3 — l l — l l l 8 ch ADC10 CT 20TSSOP, N; 28TSSOP; 32QFN 0.60MSP430G2253 2 256 24 2 3 — l l — l l l 8 ch ADC10 CT 20TSSOP, N; 28TSSOP; 32QFN 0.65MSP430G2353 4 256 24 2 3 — l l — l l l 8 ch ADC10 CT 20TSSOP, N; 28TSSOP; 32QFN 0.70MSP430G2453 8 512 24 2 3 — l l — l l l 8 ch ADC10 CT 20TSSOP, N; 28TSSOP; 32QFN 0.80MSP430G2553 16 512 24 2 3 — l l — l l l 8 ch ADC10 CT 20TSSOP, N; 28TSSOP; 32QFN 0.90G2xx4MSP430G2444 8 512 32 2 3 3 l l — l — l 12 ch ADC10 HF 38TSSOP, 40QFN, 49DSBGA 1.05MSP430G2544 16 512 32 2 3 3 l l — l — l 12 ch ADC10 HF 38TSSOP, 40QFN, 49DSBGA 1.10MSP430G2744 32 1024 32 2 3 3 l l — l — l 12 ch ADC10 HF 38TSSOP, 40QFN, 49DSBGA 1.14G2xx5 MSP430G2755 32 4094 32 3 3 3 l l — l l l 12 ch ADC10 CT, HF 38TSSOP, 40QFN 1.20MSP430G2855 48 4094 32 3 3 3 l l — l l l 12 ch ADC10 CT, HF 38TSSOP, 40QFN 1.24MSP430G2955 56 4094 32 3 3 3 l l — l l l 12 ch ADC10 CT, HF 38TSSOP, 40QFN 1.30

Value LineHigh performance for cost-sensitive applications The MSP430G2xx 16-bit microcontroller features Flash-based ultra-low-power MCUs up to 16 MIPS with 1.8V – 3.6V opera-tion. Includes the very-low power oscillator (VLO), internal pull-up/pull-down resistors and low-pin-count options.

Device parameters• Flash options: 0.5 KB – 56 KB• RAM options: 128 B – 4 KB• GPIO options: 10, 16, 24, 32 pins• ADC options: Slope, 10-bit SAR• Other integrated peripherals: Capacitive Touch I/O (CT),

High Frequency Oscillator (HF)

Page 6: Electrical and Computer Engineering FALL 2012 …...Electrical and Computer Engineering FALL 2012 BREADTH EXAM Problems 2/3/4 TTG Area: High Performance and Embedded Computing ECGR-5101:

NAME: _________________________________

Department of Electrical and Computer Engineering SPRING 2017 COMPREHENSIVE/BREADTH EXAM

Questions 4.1 TTG Area: High Performance Embedded Computing

ECGR 4101 Embedded Systems

1. For a particular 10-bit analog to digital converter with a reference voltage of v+ = 3.3 volts and v- = 0 volts

a. determine the input voltage if the digital representation is 10 1000 0010. b. determine the digital representation of the input voltage 1.7 volts.

2. Convert the decimal number -223.0625 to a single precision floating point number. Show the bits in binary.

3. The top of the heap is address 0x0006 0000. The bottom of the heap is 0x0007 FFFF. Show the contents of the heap (use a picture) if the following code is executed. Indicate pointers to the first memory address of the arrays. Indicate free areas. Represent memory in any width you want. int i=512; int * a; float * b; char * c; char * d; a = (int *) malloc (i, sizeof (int)); b = (float *) malloc (i, sizeof (float)); c = (char *) malloc (i, sizeof (char)); free (a); d = (char *) malloc (i, sizeof (char));

4. Consider the following waveform that shows short pulses (TMOn) from an RX63N board (with 96MHz processor clock). Using the values of certain key registers given in the waveform, find the frequency and duty cycle of the generated pulse. PCLK/8 is used as clock source. Remember what the PCLK is compared to the processor clock!

For the following two questions use the snippet of code at the right:

SCI2.SMR.BYTE = 0x3A; SCI2.BRR = 21;

Also, use excepts from Section 35 of the Renesas RX63N Hardware Manual (last pages of this test). 5. Based on the above code, what is the baud rate that this serial connection is operating at? 6. Based on the above code, correctly describes the serial communications configuration.

Page 7: Electrical and Computer Engineering FALL 2012 …...Electrical and Computer Engineering FALL 2012 BREADTH EXAM Problems 2/3/4 TTG Area: High Performance and Embedded Computing ECGR-5101:

NAME: _________________________________

Page 8: Electrical and Computer Engineering FALL 2012 …...Electrical and Computer Engineering FALL 2012 BREADTH EXAM Problems 2/3/4 TTG Area: High Performance and Embedded Computing ECGR-5101:

NAME: _________________________________

Page 9: Electrical and Computer Engineering FALL 2012 …...Electrical and Computer Engineering FALL 2012 BREADTH EXAM Problems 2/3/4 TTG Area: High Performance and Embedded Computing ECGR-5101:

NAME: _________________________________

Department of Electrical and Computer Engineering FALL 2017 COMPREHENSIVE/BREADTH EXAM

Questions 4.1 TTG Area: High Performance Embedded Computing

ECGR 4101 Embedded Systems

1. For a particular 10-bit analog to digital converter with a reference voltage of v+ = 3.3 volts and v- = 0 volts

a. determine the input voltage if the digital representation is 10 0000 0010. (8 points) b. determine the digital representation of the input voltage 2.7 volts. (7 points)

2. Convert the decimal number -128.125 to a single precision floating point number. Show the bits in binary. (10 points)

3. Write the C code for the MSP430 Launchpad Board to, forever, read the digital input on pins 2 to 0 of Port 2 as a binary encoded value and output on pins 7 to 0 of Port 1 as a simple decoded value, according to the table at the right. Write the FULL code listing needed (we have already helped with identifying include files, disabling the watchdog timer). This is so simple, there is no need for interrupts. You do not need to write comments or a block headers for this question. (25 points)

Input (bits 2:0)

Output (bits 7:0)

000 00000001 001 00000010 010 00000100 011 00001000 100 00010000 101 00100000 110 01000000 111 10000000

//*********************************************************** // simpleconvert.c // Read 3 bits of Port 2, output the decoded values on 8 bits // of Port 1. For example, 010 -> 00000100, 101 -> 00100000 //*********************************************************** #include <msp430.h> //*********************************************************** // main – do all of the work in the exercise – decode input // Input: Port 2, bits 2:0 // Output: Port 1, bits 7:0 //*********************************************************** int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer return 0; }

Page 10: Electrical and Computer Engineering FALL 2012 …...Electrical and Computer Engineering FALL 2012 BREADTH EXAM Problems 2/3/4 TTG Area: High Performance and Embedded Computing ECGR-5101:

NAME: _________________________________

4. A recent McDonalds Happy Meal toy was a “wrist band” which contained an embedded system. This wrist band had the following features: It had a single button – “on”. It had internal circuitry that would count “steps” of the wearer via a simple switch

activated by a weight moving – one switch on/off per step (internal to the device). (think pedometer)

The step count would be displayed on a 5 digit LCD screen. If the “on” switch is pressed while the device is already on, the count displayed on the

LCD is reset to 0. The device will turn off after 5 minutes of no activity, but the step count is not reset. If the device is off, it will not display anything on the LCD and it will not count steps.

For this assignment you will create the Software State Machine for this device. Use this paper to:

a. Create the state diagram, with ALL states, transitions, and labels. (25 points) b. Create the Software Architecture (just provide the names of all functions and interrupt

service routines (ISRs)). Also provide, for each function and ISR a one-sentence description of what is done in the function. (25 points)