EE445L Fall 2014 Quiz 2B Page 1 of 5

Similar documents
EE445L Fall 2014 Quiz 2A Page 1 of 5

EE445L Fall 2014 Quiz 2A Page 1 of 5

EE445L Fall 2015 Quiz 2 Page 1 of 5

EE445L Fall 2011 Quiz 2A Page 1 of 6

EE445L Fall 2015 Quiz 2A Solution Page 1

EE445L Spring 2017 Final Page 1 of 7

Quiz 2A EID Page 1. First: Last: (5) Question 1. Put your answer A, B, C, D, E, or F in the box. (7) Question 2. Design a circuit

EE445L Fall 2015 Final Version B Page 1 of 7

EE445L Fall 2012 Final Version B Page 1 of 7

EE445L Spring 2018 Final EID: Page 1 of 7

CprE 288 Introduction to Embedded Systems (Output Compare and PWM) Instructors: Dr. Phillip Jones

Roland Kammerer. 13. October 2010

802.11g Wireless Sensor Network Modules

DNT24MCA DNT24MPA. Low Cost 2.4 GHz FHSS Transceiver Modules with I/O. DNT24MCA/MPA Absolute Maximum Ratings. DNT24MCA/MPA Electrical Characteristics

ECE 363 FINAL (F16) 6 problems for 100 pts Problem #1: Fuel Pump Controller (18 pts)

ENGR4300 Test 3A Fall 2002

Instrument Cluster Display. Grant Scott III Erin Lawler Mike Carlson

Activity 4: Due before the lab during the week of Feb

EIE/ENE 334 Microprocessors

EMG Sensor Shirt. Senior Project Written Hardware Description April 28, 2015 ETEC 474. By: Dylan Kleist Joshua Goertz

Microcontrollers and Interfacing

ELCT 912: Advanced Embedded Systems

Exercise 3: Sound volume robot

Linear Integrated Circuits

DNT2400. Low Cost 2.4 GHz FHSS Transceiver Module with I/O

Characteristic Sym Notes Minimum Typical Maximum Units Operating Frequency Range MHz. RF Chip Rate 11 Mcps RF Data Rates 1, 2, 5.

SPI, Talking to Chips, and Minimizing Noise

Embedded Systems and Software

DNT90MCA DNT90MPA. Low Cost 900 MHz FHSS Transceiver Modules with I/O

Lab 1.2 Joystick Interface

LM2662/LM2663 Switched Capacitor Voltage Converter

Chapter 13: Comparators

Project Final Report: Directional Remote Control

ENGR4300 Test 3A and 3B Fall 2003

DNT900. Low Cost 900 MHz FHSS Transceiver Module with I/O

Real Time Operating Systems Lecture 29.1

Stensat Transmitter Module

FIRSTRANKER. 1. (a) What are the advantages of the adjustable voltage regulators over the fixed

The University of Texas at Arlington Lecture 10 ADC and DAC

Application Circuits 3. 3V R2. C4 100n G PI O. 0 G PI O S e t u p d a ta G PI O. 5 G PI O M o t i o n I n t G PI O. 4 G PI O.

PCB Scope / Logic Analyzer Hardware Design Description

Analog Interface 8.1 OVERVIEW 8 1

Copyright by Syed Ashad Mustufa Younus Copyright by Syed Ashad Mustufa Younus

Receiver 10-5 BER -100 dbm Transmitter RF Output Power 1 10 or 63 mw mw Antenna Impedance 50 Ω

DASL 120 Introduction to Microcontrollers

In this lab, you ll build and program a meter that measures voltage, current, power, and energy at DC and AC.

In this lecture, we will look at how different electronic modules communicate with each other. We will consider the following topics:

LIC & COMMUNICATION LAB MANUAL

Ocean Controls KT-5198 Dual Bidirectional DC Motor Speed Controller

Interfacing Sensors & Modules to Microcontrollers

Hello, and welcome to this presentation of the STM32 Digital Filter for Sigma-Delta modulators interface. The features of this interface, which

2015 International Future Energy Challenge Topic B: Battery Energy Storage with an Inverter That Mimics Synchronous Generators. Qualification Report

Using Z8 Encore! XP MCU for RMS Calculation

Pololu TReX Jr Firmware Version 1.2: Configuration Parameter Documentation

EE-110 Introduction to Engineering & Laboratory Experience Saeid Rahimi, Ph.D. Lab Timer: Blinking LED Lights and Pulse Generator

Development of a MATLAB Data Acquisition and Control Toolbox for BASIC Stamp Microcontrollers

Thursday 5 June 2014 Afternoon

Pulse Sensor Individual Progress Report

B Robo Claw 2 Channel 25A Motor Controller Data Sheet

LINEAR IC APPLICATIONS

Applications. Operating Modes. Description. Part Number Description Package. Many to one. One to one Broadcast One to many

LM2660/LM2661 Switched Capacitor Voltage Converter

Homework Assignment 03

Serial Communication AS5132 Rotary Magnetic Position Sensor

Lecture 6: Digital/Analog Techniques

PIC ADC to PWM and Mosfet Low-Side Driver

Training Schedule. Robotic System Design using Arduino Platform

LAX016 Series Logic Analyzer User Guide

ECE251: Tuesday October 3 0

ACPL Data Sheet. Three-Channel Digital Filter for Sigma-Delta Modulators. Description. Features. Specifications.

Generating DTMF Tones Using Z8 Encore! MCU

Portland State University MICROCONTROLLERS

IFB270 Advanced Electronic Circuits

Wireless hands-free using nrf24e1

Application Note. I C s f o r M o t o r C o n t r o l. Evaluation board for the TDA5143/TDA5144. Report No: EIE/AN R. Galema

PHYS 536 Active Filters

Electric Bike BLDC Hub Motor Control Using the Z8FMC1600 MCU

EE283 Electrical Measurement Laboratory Laboratory Exercise #7: Digital Counter

RF4463F30 High Power wireless transceiver module

Arduino Microcontroller Processing for Everyone!: Third Edition / Steven F. Barrett

DEPARTMENT OF ELECTRICAL ENGINEERING LAB WORK EE301 ELECTRONIC CIRCUITS

Electronic Concepts and Troubleshooting 101. Experiment 1

ME 333 Assignment 7 and 8 PI Control of LED/Phototransistor Pair. Overview

8-Bit, high-speed, µp-compatible A/D converter with track/hold function ADC0820

Lab 5 Timer Module PWM ReadMeFirst

ES /2 CAP AUTO DMM

Module 13: Interfacing ADC. Introduction ADC Programming DAC Programming Sensor Interfacing

DS1801 Dual Audio Taper Potentiometer

PWMLib PWM Library. Jim Schimpf. Document Number: PAN Revision Number: April Pandora Products. 215 Uschak Road Derry, PA 15627

OBJECTIVE TYPE QUESTIONS

MCU Reset and Oscillator Circuits Application Note

IST TSic Temperature Sensor IC. Technical Notes ZACwire Digital Output

Standard single-purpose processors: Peripherals

UM1082 User manual. The STPM10 single-phase meter evaluation boards. Introduction

Electronic Instrumentation ENGR-4300 Fall 2004 Section Experiment 7 Introduction to the 555 Timer, LEDs and Photodiodes

Measuring Distance Using Sound

ECE251 Intro to Microprocessors Final Exam July 6 th, 2017

uc Crash Course Whats is covered in this lecture Joshua Childs Joshua Hartman A. A. Arroyo 9/7/10

Brian Hanna Meteor IP 2007 Microcontroller

EE 314 Spring 2003 Microprocessor Systems

Transcription:

EE445L Fall 2014 Quiz 2B Page 1 of 5 Jonathan W. Valvano First: Last: November 21, 2014, 10:00-10:50am. Open book, open notes, calculator (no laptops, phones, devices with screens larger than a TI-89 calculator, devices with wireless communication). You have 50 minutes, so please allocate your time accordingly. Please read the entire quiz before starting. (5) Question 1. What is the difference between a buck-boost and a linear regulator? Pick the answer that best differentiates the two regulator types. Put your answer in the box. A) A linear regular needs capacitors on both input and output, but the buck-boost does not need capacitors. B) The linear regulator only creates an output voltage that is less than the input voltage, and the buck-boost only creates an output voltage that is greater than or equal to the input voltage. C) A linear regulator can be used to create a power voltage, whereas a buck-boost is used to create a low-noise analog reference voltage for analog circuits. D) A linear regulator does not exhibit back EMF, but a buck-boost requires a snubber diode because of the inductor in the circuit; the di/dt in the inductor will cause a large back EMF voltage. E) Assume the current is 1 A, the input voltage is 9 V, and the output voltage is 3.3 V. A linear regulator will get hot and a buck-boost will not get hot. F) The linear regulator is only used for currents less than 1 A, while the buck-boost is only used for currents above 1 A. G) A linear regulator is better for a battery powered application because the large dropout voltage allows the battery to discharge for longer before the battery voltage finally drops out of range. E (10) Question 2. For each application choose busy-wait synchronization or interrupt synchronization. For Specify BW for busy-wait, and specify for interrupts. Place your answers in the boxes. A) With a UART transmission such that packets of 17 or more frames are to be sent at a time at unknown intervals. The baud rate is 115200 bits/sec. The protocol is 1 start bit, 8 data bits, even parity, and one stop bit. B) With an SSI interface where the microcontroller is the slave and the time between the arrival of frames is variable. The SSI clock is 10 MHz and frame size is 8 bits. C) With timer-start ADC sampling, 1 MHz ADC mode, and 64-element hardware averaging. The sampling rate is periodic (a regular rate). The system has many real-time tasks. D) An interface of 24 independent input signals, where a corresponding software task is to be executed on the rising edge of each input. E) The goal is to spin six stepper motors all at a constant speed, but the speed of each motor must be independently controlled.

EE445L Fall 2014 Quiz 2B Page 2 of 5 (15) Question 3. The goal is to transmit synchronous serial data as fast as possible using SSI. The external device sends data from the outside world into the microcontroller. The microcontroller is the master, and the external device is a slave. The following figure shows the timing of the external device. uc Sclk MISO Device Clock in Data out Clock in SPO=1 Data out Part a) Assume SPH=1; what should SPO be? SPO=1, so output on fall, input on rise Part b) The time is [50, 400ns]. What is the shortest SSI clock period that this device can be interfaced? You may assume S4 and S5 are zero, and the clock will be 50% duty cycle. Show your work. Let T be the SSI period, DR = (0.5*T - S8, 0.5*T + S9) DR = (0.5*T 17.15, 0.5*T + 0) DA = (, T + ), DA = (400, T + 50), taking worst case So 400 0.5*T - 17.15, 2*417.17 0.5*T, 834.34ns T, f max = 1/834.34ns = 1.2 MHz With SPH=1

EE445L Fall 2014 Quiz 2B Page 3 of 5 (10) Question 4. Assume Ports A, B, C and D are already initialized to interrupt on rising edges of PA7 PB7, PC7 and PD7. Also assume interrupts are armed and enabled. Write C code to set the priority so that PD7 is the highest, PC7 is the next highest, and PA7/PB7 are equal priority. Assume there are priority 3 interrupts that are less important than any of these edge-triggered interrupts, NVIC_PRI0_R = 0x00204040; // D=0, C=1, A=B=2 (10) Question 5. Design a two-pole Butterworth low pass filter with a cutoff frequency of 51 Hz. Show your work. Specify RA, C1A, and C2A. C1A RA RA C2A All you need to do is divide both capacitors by (2π51). C1A=0.44 µf, C2A=0.22 µf. first design step is to select the cutoff fc (Hz) 51 fill this in RA (kohm) 10 same as initial R C1A (µf) 0.44126 is 141.4/(2 fc) C2A (µf) 0.22063 is 70.7/(2 fc) or 0.5 C1A second design step is to choose convenient Capacitor values fc (Hz) 51 same as previous fc RB (kohm) 10.029 new value to match exact fc C1B (µf) 0.44 fill this in C2B (µf) 0.22 is 0.5 C1B third design step is to choose a convenient resistor value fc (Hz) 51.1466 new cutoff based on these convenient values RC (kohm) 10.000 fill this value in C1C (µf) 0.44 same as C1B C2C (µf) 0.22 same as C2B

EE445L Fall 2014 Quiz 2B Page 4 of 5 (10) Question 6. You will use decimal fixed-point to implement area equals width times length. Assume width and length are fixed-point numbers with 0.001 cm resolution; W and L are the integer parts respectively. Assume area is a fixed-point number with 0.001 cm 2 resolution; A is the integer part of area. Write C code that calculates A as a function of W and L. // Area = Width*Length; objective // Area = A/1000; Width=W/1000; Length=L/1000; definitions // A/1000 = W/1000 * L/1000; algebraic substitution A = (W*L)/1000; (15) Question 7. Design an analog circuit with the following transfer function V out = 2V in +2. The input is a single voltage (not differential). You may assume the input is bounded such that the output ranges from 0 to 3V (-1 V in 0.5). R1 and R2 are already chosen such that the analog reference is 2.00V. You will use one rail to rail op amp (not an instrumentation amp). Show your work and label all chip numbers and resistor values, including R1 and R2. You do not have to show pin numbers. V out = 2V in +2 Create a 2.00 V reference with LM4041 Vz=1.233 (1+R2/R1), (1.233 is the fixed voltage of the zener) 2 = 1.233(1+R2/R1), R2/R1= 0.622, R2=31.6k, and R1=51.1k V out = 2V in +V ref Add ground gain of -2 to make all gains sum to 1 V out = 2V in +V ref - 2V g Choose R f to be common multiple of 1, 2 R f = 20k, Choose other resistors to create needed gains, R in =10k, R ref =20k, R g =10k V 20k ref 3.3 V LM4041 R 10 k ref 10k LM4041 Adjustable 2.00V R1 51.1k R2 31.6k V in 10k R in R g op amp 20k R f V out

EE445L Fall 2014 Quiz 2B Page 5 of 5 (25) Question 8. The following code uses Timer0A to increment count on the rising edge of PB6. Edit the code so it uses Timer1A to increment count on the rising edge of PB4. You can skip the priority register. volatile uint32_t Count; // incremented on interrupt void TimerCapture_Init(void){ SYSCTL_RCGCTIMER_R = 0x01; 0x02 // activate timer0 SYSCTL_RCGCGPIO_R = 0x00000002; // activate port B Count = 0; 0x01 // allow time to finish activating GPIO_PORTB_DEN_R = 0x40; GPIO_PORTB_AFSEL_R = 0x40; 0x01 // enable digital I/O on PB6 // enable 0xFFF0FFFF alt funct on 0x00070000 PB6 TIMER1 GPIO_PORTB_PCTL_R = (GPIO_PORTB_PCTL_R&0xF0FFFFFF)+0x07000000; TIMER0_CTL_R &= ~0x00000001; TIMER0_CFG_R = 0x00000004; TIMER0_TAMR_R = 0x00000007; TIMER0_CTL_R &= ~(0x000C); TIMER0_TAILR_R = 0x0000FFFF; TIMER0_IMR_R = 0x00000004; TIMER0_ICR_R = 0x00000004; // disable timer0a during setup // configure for 16-bit timer mode // configure for input capture mode // TAEVENT is rising edge // start value // enable capture match interrupt // clear timer0a capture flag PRI5 TIMER0_CTL_R = 0x00000001; 0xFFFF00FF // enable timer0a 0x00004000 NVIC_PRI4_R =(NVIC_PRI4_R&0x00FFFFFF) 0x40000000; //Timer0A=priority 2 NVIC_EN0_R = 0x00080000; TIMER1 Enableerrupts(); 0x00200000 } void Timer0A_Handler(void){ TIMER0_ICR_R = 0x00000004; // enable interrup9 in NVIC // acknowledge timer0a capture match 21 } Count = Count + 1;