EE345L Fall 2007 December 14, 2007, 9am-12 Version 1 Page 1 of 8

Similar documents
EE445L Fall 2010 Final Version A Page 1 of 10

EE345L Spring 2006 May 10, 2006, 2-5pm Page 1 of 8

EE345L Fall 2008 Final Page 1 of 12

Clock. EE345L Spring 2003 Final Page 1 of 6. April 9, 2003, 1:00pm-1:50pm. (5) Question 1. Choose A-F. (5) Question 2. Choose A-E. (5) Question 3.

EE445L Fall 2018 Final EID: Page 1 of 7

EE445L Fall 2012 Quiz 2B Page 1 of 6

EE445L Fall 2014 Final Version A Page 1 of 7

Chapter 1. Solutions Solution 1.1. Most RAMs are volatile, meaning the information is lost if power is removed then restored.

EE345L Spring 2004 Quiz 1 Page 1 of 5. Last Name: First Name:

EE445L Fall 2014 Final Version A solution Page 1 of 7

EE345L Spring 2004 Final Version 3 Page 1 of 8

EE445L Fall 2016 Quiz 2A Solution Page 1

DS1306. Serial Alarm Real Time Clock (RTC)

// middle priority ISR Status.flag = 1; Status.y = 6;

History of the Microprocessor. ECE/CS 5780/6780: Embedded System Design. Microcontrollers. First Microprocessors. MC9S12C32 Block Diagram

DS1305EN. Serial Alarm Real-Time Clock

Lab 3c Performance Debugging Page 3c.1

DS1305 Serial Alarm Real Time Clock (RTC)

DS1305EN. Serial Alarm Real-Time Clock

Embedded Systems and Software

Final Exam Study Guide

EE319K Final Fall 2005 Solution C. (3) Question 1. (3) Question 2. short function(const short in){ return in+5; } const

Course Introduction. Content: 21 pages 4 questions. Learning Time: 35 minutes

12V. time V 12. time. V 2 Switch. time. G S V GS > constant turns on MOSFET. EE445M/EE380L Final Exam Spring 2014 Page 1 of 8

Basic Interface Techniques for the CRD155B

CS/ECE 5780/6780: Embedded System Design

PIN ASSIGNMENT PIN DESCRIPTION

Lab 3e LCD Alarm Clock

DS1305. Serial Alarm Real Time Clock (RTC) FEATURES PIN ASSIGNMENT ORDERING INFORMATION

NATIONAL CERTIFICATE (VOCATIONAL) ELECTRONIC CONTROL AND DIGITAL ELECTRONICS NQF LEVEL 2 SUPPLEMENTARY EXAMINATION 2010

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

ECSE-2610 Computer Components & Operations (COCO)

PSIM Tutorial. How to Use SPI in F2833x Target. February Powersim Inc.

DS1306 Serial Alarm Real-Time Clock

LGR-5325 Specifications

Lab 13 Real Time Debugging

Low Cost Multifunction I/O 100 ks/s, 12-Bit, 8 Analog Inputs

Mechatronics and Measurement. Lecturer:Dung-An Wang Lecture 6

ICS548A-03 LOW SKEW CLOCK INVERTER AND DIVIDER. Description. Features. Block Diagram DATASHEET

Product Specification

UNIT 3 THE 8051-REAL WORLD INTERFACING

ILI2511. ILI2511 Single Chip Capacitive Touch Sensor Controller. Specification ILI TECHNOLOGY CORP. Version: V1.4. Date: 2018/7/5

PART IN+ IN- TX_DISABLE TX_FAULT BIAS SET BIASMAX 2 APCSET 2 MODSET 2 MOD SET PC_MON BS_MON

DSP240-LPI Inverter Controller Card. Technical Brief

Frequency Generator for Pentium Based Systems

PI6C :4 Clock Driver for Intel PCI Express Chipsets. Features. Description. Block Diagram. Pin Configuration

APR9301 APLUS INTEGRATED CIRCUITS INC. Single-Chip Voice Recording & Playback Device for Single 20 to 30 Second Message. Features

EMBEDDED SYSTEMS COURSE CURRICULUM

Product Specification

NOTIFICATION (Advt No. 1/2018) Syllabus (Paper III)

eip-24/100 Embedded TCP/IP 10/100-BaseT Network Module Features Description Applications

A product Line of Diodes Incorporated. Description OUT0 OUT0# OUT1 OUT1# OUT2 OUT2# OUT3 OUT3#

Lab 5: EBI and ADC: Digital Voltmeter

Home Security System with Remote Home Automation Control

with 3 allocated blocks (1,2,3 containing 32,32,8 bytes), file B

MPI-DN, MPI-D MULTICHANNEL ELECTRONIC RECORDER for HART or RS-485/ MODBUS RTU SENSORS

EMBEDDED SYSTEMS. Part I: Introduction and Hardware

DS75 Digital Thermometer and Thermostat

CPT-DA Texas Instruments TMS320F28377D controlcard compatible. DA Series Interface Card. Technical Brief

EMBEDDED SYSTEMS: Jonathan W. Valvano INTRODUCTION TO THE MSP432 MICROCONTROLLER. Volume 1 First Edition June 2015

Western Washington University. Electrical Engineering Technology. Etec 471. Professor Morton. Senior Hardware Description. Automated Aquarium

PI6C20400A. 1:4 Clock Driver for Intel PCIe Chipsets. Features. Description. Pin Configuration. Block Diagram

DS2405. Addressable Switch PIN ASSIGNMENT

END-TERM EXAMINATION

Pentium Processor Compatible Clock Synthesizer/Driver for ALI Aladdin Chipset

Amarjeet Singh. January 30, 2012

Supply voltage. Input current. Encoder supply. Memory SIMATIC S7-200, CPU 221 COMPACT UNIT, DC POWER SUPPLY 6 DI DC/4 DO DC, 4 KB CODE/2 KB DATA,

Understanding the basic building blocks of a microcontroller device in general. Knows the terminologies like embedded and external memory devices,

Temperature-Controlled, NV, I2C, Logarithmic Resistor DS1841

DS WIRE INTERFACE 11 DECOUPLING CAP GND

DS1676 Total Elapsed Time Recorder, Erasable

Embedded Systems and Software. Serial Interconnect Buses I 2 C (SMB) and SPI

MicroProcessor. MicroProcessor. MicroProcessor. MicroProcessor

EE4390 Microprocessors. Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System

Digital Thermometer and Thermostat

T1/E1 CLOCK MULTIPLIER. Features

8051 Microcontroller Interrupts

XC1701L (3.3V), XC1701 (5.0V) and XC17512L (3.3V) Serial Configuration PROMs. Features. Description

INTERFACING HARDWARE WITH MICROCONTROLLER

eip-10 Embedded TCP/IP 10-BaseT Network Module Features Description Applications

Features INSTRUCTION DECODER CONTROL LOGIC AND CLOCK GENERATORS COMPARATOR AND WRITE ENABLE EEPROM ARRAY READ/WRITE AMPS DATA IN/OUT REGISTER 16 BITS

D115 The Fast Optimal Servo Amplifier For Brush, Brushless, Voice Coil Servo Motors

PROGRAMMING AND CUSTOMIZING

E Series Multifunction I/O 1.25 MS/s, 12-Bit, 16 or 64 Analog Inputs

Lecture (02) PIC16F84 (I)

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

LGR-5327 Specifications

Lecture 2 VLSI Testing Process and Equipment

CAT25C02/04/08/16/32 2K/4K/8K/16K/32K SPI Serial CMOS E 2 PROM FEATURES

Laboratory: Introduction to Mechatronics. Instructor TA: Edgar Martinez Soberanes Lab 1.

ECE 471 Embedded Systems Lecture 20

LC75808E, 75808W. 1/8 to 1/10 Duty LCD Display Drivers with Key Input Function

AZ DISPLAYS, INC. SPECIFICATIONS FOR LIQUID CRYSTAL DISPLAY DATE: July 1, Page 1 of 13

EE251: Tuesday December 4

BT-22 Product Specification

QPro XQ17V16 Military 16Mbit QML Configuration PROM

DU MSc Electronics. Topic:- DU_J18_MSC_ELEC. Correct Answer :- C only [Option ID = 89628] Correct Answer : kw [Option ID = 89858]

2-Wire, 5-Bit DAC with Three Digital Outputs

Ali Karimpour Associate Professor Ferdowsi University of Mashhad

SN8200 LI+ DUAL BATTERY CONTROLLER

Transcription:

EE345L Fall 2007 December 14, 2007, 9am-12 Version 1 Page 1 of 8 Jonathan W. Valvano First: Last: This is the closed book section. You must put your answers in the boxes on this answer page. When you are done, you turn the closed-book part and pick up the open book part. (4) Problem 1. (4) Problem 2. (4) Question 3. Choose A-I (4) Question 4. ADC bits (4) Question 5. (4) Question 6. (4) Question 7. (4) Question 8. (4) Question 9. (4) Question 10. Ethics Question

EE345L Fall 2007 Final Version 1 Page 2 of 8 (4) Question 1. Consider the following interrupt service rine unsigned short Elapsed; // time between interrupt void interrupt 20 handler(void){ XXXXX unsigned short last=0; Elapsed = TCNT-last; last = TCNT; } The goal is to measure the elapsed time from one interrupt call to the other. What qualifier do you place in the XXXXX position to make this measurement operational? A) volatile B) float C) static D) public E) const F) none (it is OK as it is) (4) Question 2. Consider a system that needs to represent the numbers from 0.00 to 10.00 with a resolution of 0.01. No human put will be required. I.e., only calculations internal to the computer will be calculated and there are a lot of multiplies, divides, adds and subtracts with these numbers. Which number system would be most efficient on a microcontroller like the 9S12? A) Boolean B) Binary fixed-point C) Decimal fixed-point D) Floating-point E) Friendly F) Reentrant (4) Question 3. Consider the situation in which the put of one digital circuit is connected to the input of another digital circuit. The difficulty arises because the two digital circuits are built with different logic families (e.g., 74LS, 74HC, 74S, etc.) There are no other connections on this signal, i.e., one put is tied to one input. The put specifications of the first circuit are V OH, V OL, I OH and I OL. The input specifications of the second circuit are V IH, V IL, I IH and I IL. These are the specifications, like you would find in a data sheet, not actual measurements of voltage and current like you would measure in lab with a DVM. First Digital Circuit Second Digital Circuit In a particular situation, you find that V OH V IH and currents are not an issue. Will it work? Secondarily, if it doesn t work what is the simplest solution to make it work? A) Yes is will work. B) No, put a snubber diode to V C) No, add a resistor to V D) No, put a capacitor to ground E) No, add a resistor to ground F) No, add an op amp amplifier G) No, add a capacitor to H) No, add an instrumentation amplifier H) No, add a 7406 driver I) No, add 2N2222 NPN transistor (4) Question 4. The desired ADC range is -1V to +1V with a resolution of 0.001V. How many ADC bits are required?

EE345L Fall 2007 Final Version 1 Page 3 of 8 (4) Question 5. A solid-state can be used to switch 120 VAC power to a. For example, the might be an AC motor. To activate the (apply power to the motor), you must energize an. The needs ab 2V at 10 ma. To deactivate the, the coil current should be zero. Assume V CE of the transistor is 0.5V. Which interface would you choose for this system. If more than one circuit works choose the best one. A B 200Ω C 200Ω D E 200Ω F (4) Question 6. What purpose might there be to use the PLL and slow down the 9S12? A) The system is CPU bound B) To make the batteries last longer on a battery-powered system C) In order to adjust the interrupt period when using RTI interrupts to a convenient value D) In order to balance the between foreground and background threads E) To reduce latency F) None of the above, because there is never a reason to run slower (4) Question 7. Consider the situation in which a FIFO queue is used to buffer data between a main program (e.g., SCI_OutChar that calls TxFifo_Put) and an put interrupt service rine (e.g., SCIhandler that calls TxFifo_Get and writes to SCIDRL). Experimental observations show this FIFO is usually empty, and at most 3 elements. What does it mean?. A) The system is CPU bound B) Bandwidth could be increased by increasing FIFO size C) The system is I/O bound D) The FIFO could be replaced by a global variable E) The latency is small and bounded F) Interrupts are not needed in this system

EE345L Fall 2007 Final Version 1 Page 4 of 8 (4) Question 8. Consider the situation in which a FIFO queue is used to buffer data between an interrupt service rine (e.g., SCIhandler that reads SCIDRL and calls RxFifo_Put)and the main program (e.g., SCI_InChar that calls RxFifo_Get). Experimental observations show this FIFO is usually empty, and at most 3 elements. What does it mean?. A) The system is CPU bound B) Bandwidth could be increased by increasing FIFO size C) The system is I/O bound D) The FIFO could be replaced by a global variable E) The latency is small and bounded F) Interrupts are not needed in this system (4) Question 9. This is a functional debugging question. However, the debugging instrument still needs to be minimally intrusive. Assume y=function(x) is a function with 16-bit input x and 16- bit put y and is called from an ISR as part of a real-time system. The SCI, PTT and PTAD are unused by the system, and PTT and PTAD are digital puts. The debugging code will be placed at the end just before the return, unless otherwise stated. SCI_OutSDec puts a 16-bit signed integer. BufX and BufY are 16-bit signed global buffers of length 100, n is a global variable initialized to 0. Which debugging code would you add to verify the correctness of this function? A) PTT=x; PTAD=y; B) SCI_OutSDec(x); SCI_OutSDec(y); // busy-wait C) SCI_OutSDec(x); SCI_OutSDec(y); // interrupt driven D) if(n<100){bufx[n]=x; BufY[n]=y; n++;} E) PTT = 0x01; // at beginning PTT &= ~0x01; // at end D) if(n<100){bufx[n]=x; BufY[n]=TCNT; n++;} (4) Question 10. Consider this situation. You are a new employee assigned to design a new feature for an existing product. During the testing of your feature, you discover a possible fault in another part of the system that might result in the compromise of safety. To whom do you first report this error? end of closed book section

EE345L Fall 2007 Final Version 1 Page 5 of 8 Jonathan W. Valvano First: Last: This is the open book section. You must put your answers on pages 5 to 8. (5) Question 11. An SPI system is used to input data from an input device. The 9S12 is the master and the input device is a slave. The following figure shows the timing of the input device. clock data bit 7 bit 0 This clock comes from the 9S12 and this data is transmitted from the input device back to the 9S12. What is the appropriate configuration mode for CPOL and CPHA in the 9S12 master? CPOL = CPHA = (10) Question 12. The goal of this question is to interface a DC motor. The software will put a digital low on PT7 to deactivate the motor (current = 0). To activate the motor you must deliver between 11 and 12V to the motor coil. The minimum resistance of the coil is 10 Ω (at maximum torque) and its inductance is 0.01 mh. Show the circuit diagram that interfaces PT7 to the motor. There are two power supplies to choose from V and +12V. Give part numbers and resistor values. V +12V PT7 DC motor

EE345L Fall 2007 Final Version 1 Page 6 of 8 (15) Question 13. Interface the following ROM to a 6811 running at 2 MHz. Assume the gate delay through each 74HC digital logic gate is [5ns min, 15ns max]. CE is positive logic. Assume there is no internal EEPROM or boot er at BFxx. The full address decoder should select addresses $8000 to $FFFF. The ROM timing is described in the following figure: CE CE ROM A14-A0 D7-D0 [50,60ns] [50,60ns] 10ns 10ns A14-A8 A7-A0 D7-D0 Part a) Design the interface between the ROM to the 6811. You are limited to the following digital devices (you can use more than one copy if you want) 74HC00 74HC04 74HC10 74HC20 74HC573 LE 8 8 Q D 6811 E A15 R/W A14-A8 7 7 CE ROM A14-A8 AS AD7-AD0 8 8 A7-A0 D7-D0 Part b) Read data required is (450,510). Calculate the worst-case Read Data Available interval for this interface and show that the timing requirements are satisfied.

EE345L Fall 2007 Final Version 1 Page 7 of 8 (15) Question 14. You will interface a transducer to the 9S12 needed for a data acquisition system to measure angle. The range of angles is 0 to 360º. The linear transducer has a sensitivity of 0.002778 V/degree. The angle signal exists in the 0 to 5 Hz frequency band. Part a) The transducer put (V ) is a differential voltage, with a range of 0 to 1V. The individual transducer put voltages are ab 2.5V. A good CMRR is required. Design the analog circuit mapping the transducer put into the ADC input channel 5. (You do not have to add an antialiasing analog low pass filter.) Show chip numbers, resistor values, but not pin numbers. Angle + Transducer - V PAD5 9S12 Part b) Assuming the only error occurs in the 10-bit ADC, what decimal fixed-point resolution would you use (give units)? Part c) Write a C function that converts the 10-bit ADC sample (0 to 1023) into the integer part of the fixed-point number representing angle. You do not need to call the ADC, just convert a 16-bit unsigned number (0 rawdata 1023) to the integer part of the fixed-point angle. unsigned short Convert(unsigned short rawdata){

EE345L Fall 2007 Final Version 1 Page 8 of 8 (15) Question 15. Assume PT0 is connected to a digital input that has a maximum frequency of 1000 Hz (high for at least 500 us, then low for at least 500us). The PS1 serial put is interfaced to another system. The serial protocol is 19200 bits/sec, 1 start, 8 data, and 1 stop bit. You may assume the E clock is 4 MHz (the PLL is not active). You will design the entire software system that puts the letter V (ASCII 0x56) to the SCI on every 5 th rising edge of PT0. You must use input capture interrupts to detect the rising edges of PT0, and must use busy-wait synchronization for the SCI. The main program initializes the data structures, input capture, and SCI. Then the main program performs a do nothing while loop. An input capture interrupt occurs on each rising edge of PT0 and no backward jumps are allowed in the ISR. Other than the I/O port definitions no starter code is allowed. #include <mc9s12c32.h> /* derivative information */ Show all software required to make this system run.