EECS 373 Midterm 2 Fall 2018

Size: px
Start display at page:

Download "EECS 373 Midterm 2 Fall 2018"

Transcription

1 EECS 373 Midterm 2 Fall 2018 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Nor did I discuss this exam with anyone after it was given to the rest of the class. NOTES: 1. Closed book/notes. 2. Calculators are allowed, but no PDAs, Portables, Cell phones, etc. Nothing capable of wireless communication! 3. Don t spend too much time on any one problem. If you get stuck, move on!!! 4. You have about 120 minutes for the exam. 5. Be sure to show work and explain what you ve done when asked to do so. Getting partial credit without showing work will be rare. Page 1 of 18

2 1. Multiple choice/fill-in-the-blank. Pick the best answer. [12 points, 2 each] a. In Verilog an always@* block is generally used to create combinational logic / glitch-free logic / sequential logic / a flip-flop. b. You know a given DAC is monotonic. Which of the following can you then be certain of? the output voltage may go down when the digital input increases. the INL of the converter must be less than 1 LSB. the DNL of the converter must be less than 1 LSB. the output voltage will go down or stay the same when the digital input decreases. none of the above. c. A significant difference between standard UART and I2C transactions is that: I2C allows for full duplex while UART does not. UART has a shared clock wire while I2C does not. I2C requires addresses while UART does not. UART generally requires a pullup resistor while I2C generally does not. d. A significant difference between standard UART and SPI is that: the UART protocol is a standardized and well documented while the SPI protocol is not. UART has a shared clock wire while SPI does not. SPI requires addresses while UART does not. UART generally requires a pullup resistor while I2C generally does not. e. It is useful to have a reference register on a timer because: it allows us to generate interrupts when an event occurs it allows us to generate an interrupt when a certain value is reached it can provide a more precise time of an event than reading the timer in software it provides a way to count the number of events which have occurred in a given amount of time. f. When must data be stable for a correct I²C bus transaction? when the clock is low when the clock is in a high-impedance state when the clock transitions high to low when the clock is high Page 2 of 18

3 2. Short answer. Each question must be answered in 15 words or less. [10 points, 2 points each] a. Why do we use virtual timers? b. What is the main reason to prefer to use an R/2R ladder DAC rather than a flash DAC? c. What is the main reason to prefer to use a flash DAC rather than an R/2R ladder DAC? d. If we say that we allow preemption, what does that mean in the context of interrupts? e. In the context of a complier, what does a linker do? Page 3 of 18

4 3. Consider the following C function. int whatfun(int a, float *b, int *c) { int x; x=bob(*b, c); if(x>0) return(x+a+*c); return(9); } Rewrite the above code in Thumb2 assembly for our SmartFusion while following the ABI. You are to assume the bob() function is ABI-compliant and has a prototype of int bob(float, int*). [11 points] Page 4 of 18

5 4. Consider the following circuit. [6 points] a) Assuming V ref is 4.0V, and there is an INL of ±1/4 LSB, what range of input voltages might cause a value of to come out of the encoder? Show your work. [3] b) Given the same assumptions as above, what range of input values are certain to cause a value of to come out of the encoder? Show your work. [3] Page 5 of 18

6 5. Consider the following circuit: Assuming there is no error beyond quantization error, indicate what the value of V out would be given each of the following values of V in. V ref is 4V. [6 points, 2 points each] a) V in=2.2 Volts b) V in=3.3 Volts c) V in=1.1 Volts Page 6 of 18

7 6. Timers [7 points] You are given a device which contains an 8-bit timer. That timer consists of three 8-bit registers: a count register (CNT) which holds the count value of the timer, a reference register (REF), and a control register (CTL). It also contains a single output EQ that goes high when the counter is enabled and CNT==REF. The CTL register consists of the following fields (0 is the most significant bit): EN (bit 0): Must be set to 1 for the timer to be enabled. RST (bit 1): If this bit is set to 1, CNT will reset to 0 every time the count value reaches the reference value. Otherwise, the timer will continue to increment when the reference value is reached. DIV (bit 2): Setting this bit to 1 divides the system clock by 16 to produce the input clock frequency. If DIV = 0, then the input clock frequency equals the system clock frequency. PRE (bits 3-7, 3 is MSB): A 5-bit prescaler which divides the clock by PRE+1. This division is in addition to the divide by 16 provided by the DIV bit. The system clock runs at 1 MHz. a) What is the maximum range of this timer (how long until it overflows)? What is the resolution (gap between numbers) in that case? [3] Max range: Resolution: b) Say you want EQ to go high every 64ms. Find values of the CTL register and the REF register that will cause that to happen. [4] CTL register (in binary): REF register (in decimal): 7. What is the purpose of the LSB of the PC on the processor we use in lab? Be specific. [3 points] Page 7 of 18

8 Design Problem: Light Follower Your task is to design a simple light follower using the SmartFusion kit. Two light sensors are mounted on the tips of a T shaft connected to a motor. The device follows a light source by keeping the light reading from the two sensors approximately the same. The system will also keep track of the motors angular position. Figure 1: Two sensors on a T-shaft connected to a motor Read the entire problem before beginning! Motor Control The motor turns at a constant speed when activated and can turn in either direction. A hardware controller is provided for you with the following control features. CCW CW Motor Action 0 0 Stop 0 1 Clockwise 1 0 Counter Clockwise 1 1 undefined Page 8 of 18

9 Reading the Light Sensors The light sensors produce a voltage proportional to the light level. The voltages will be read with the ADC described below. The ADC converts an analog voltage into an 8-bit unsigned integer. You can assume that its conversion voltage range is matched to the light sensor s output range. Ain 0 and Ain 1: Analog input channel 0 and 1. SEL: Logical 0 selects analog channel 0 and logical 1 selects channel 1. Start: Start is a one clock cycle pulse that starts the conversion. CLK: The ADC clock input. EOC: A one clock cycle pulse that indicates end of conversion. DATA[7:0]: Data is available on this port after the conversion. A conversion is started by issuing a 1 clock cycle pulse to the Start pin. After the converter finishes, a one clock cycle pulse occurs on the EOC pin. Data is then present on the data port and stable until the next start is issued. Light sensor 1 has been connected to Ain 0 and Light sensor 2 has been connected to Ain 1. Rotational Sensor A rotational sensor provides a pulse every 10 degrees the motor is rotated. We will count the pulses from a known starting position to determine the relative position for motor. The pulses can vary in width depending on the speed of rotation, but will always be greater than the system clock. We will use the pulse to generate an interrupt to count the pulses. You may assume a turn is in the direction the motor is currently turning and that no turn will be registered if the motor is not turning. Page 9 of 18

10 Desired Memory Map There are three devices, each with their own PSEL line: The motor controller, located in the address range 0x x400500FF. This is used to control the motor. The hardware has been done for you. The ADC/light sensor, located in the address range 0x x400501FF. These locations can be used to select an analog input and start a conversion among other things. When a conversion is completed, it will assert FABINT for one clock. The rotary sensor, located in the address range 0x x400502FF. It will assert FABINT for one clock when a new pulse is first detected. Notice that the ADC and rotary sensor both use FABINT. This is handled in two ways: The ADC will actually generate something called FABINT1 and the rotary sensor something called FABINT2. Those two signals will be ORed together into a single FABINT signal sent to the processor. The hardware for this (an OR gate) has been done for you. The other problem is figuring out which device generated the interrupt. The ADC and rotary sensor each have a memory-mapped register which will be asserted when their event occurs and can be cleared from software. Address Usage Register Description 0x Read/Write Bit 0 is mapped to CW of the motor controller. Bit 1 is mapped to CCW of the motor controller. All other bits are zeros when read and have no effect when written. The motor will turn in the direction specified until the next time this address is written. The hardware for this is done for you. 0x Read/Write If bit 0 was last written as a 0, Ain 0 will be used as the analog input. If a 1 was last written to bit 0, Ain 1 will be used as the analog input. 0x Write only When this register is written (with any value), a new ADC conversion is started. When it finishes, FABINT will be asserted. 0x Read only The lower 8 bits of this register are to hold the results of the last ADC conversion done. 0x C Read/Write This register will be set to a 1 once an analog to digital conversion has finished and will stay so until a write is done to this register (which will clear the bit). 0x Read/Write This register will be set to a 1 if the rotary sensor has the start of a pulse and will stay so until a write is done to this register (which will clear the bit). Table 1: Memory Mapped Registers for the Three Devices Page 10 of 18

11 Desired System Behavior A timer has been configured to generate an interrupt every 100ms. That interrupt will cause the ISR Timer_IRQHandler to run. That ISR is to start a new ADC conversion of one of the light sensors. Each time it should change which sensor is being sampled. We do not want to wait in any ISR for the ADC to complete its conversion. We want the main program to be able to run during that conversion. Finally, you should design the system so that the following things happen: If sensor 1 has the higher value (is brighter), the motor should turn clockwise. If sensor 2 has the higher value, the motor should turn counter clockwise. Otherwise it should stay still. Every time the rotary sensor detects a pulse, a global variable named FACING should be incremented (if we are currently turning clockwise) or decremented (if currently turning counter clockwise). Assume the variable is a signed integer that has already been declared. You may freely declare other global variables as needed. Page 11 of 18

12 Part 1: ADC Hardware Design [17 points] Complete the hardware design implementing the ADC interface and interrupt generation for the ADC. There is additional space on the next page for your answer. module control( /*** APB3 BUS INTERFACE ***/ input PCLK, // clock input PRESERN, // system reset input PSEL, // peripheral select input PENABLE, // distinguishes access phase output wire PREADY, // peripheral ready signal output wire PSLVERR, // error signal input PWRITE, // distinguishes read and write cycles input [31:0] PADDR, // I/O address input wire [31:0] PWDATA, // data from processor to I/O device (32 bits) output reg [31:0] PRDATA, // data to processor from I/O device (32-bits) /*** I/O PORTS DECLARATION ***/ output wire FABINT, ); //ADC: output wire ADC_SEL, output wire ADC_CLK, output wire ADC_Start, input EOC, input [7:0] ADC_Data assign ADC_Clock=PCLK; Page 12 of 18

13 Extra Page for Part 1 Page 13 of 18

14 Part 2: Rotary Interrupt Hardware Design [8 points] Complete the hardware design below in schematic form that implements the rotary sensor. You may use: D flip-flops with CE (clock enable) and/or reset. Standard gates (AND, OR, XOR with any number of inputs) as well as inversion bubbles as a shorthand for NOT gates. Tri-state buffers with multiple inputs and outputs. You may use signal labels to show signal connections rather than drawing lines. For example, you can use the name PCLK for all the clock names instead of drawing wires. Input signals are on the left, output signals are on the right. PRDATA[31:0] PCLK PSEL PREADY PENABLE PWRITE PADDR[7:0 PWDATA[31:0 FABINT2 Rotary Pulse Page 14 of 18

15 Part 3: System Control (Timer Interrupt) [7 points] Provide the code in C for the timer IRQ handler. Declare any global variables used above this function. _attribute_((interrupt)) void Timer_IRQHandler( void ) { Page 15 of 18

16 Part 4: Fabric Interrupt [13 points] Complete the design by writing the function below in C. You may declare any needed global variables that you didn t declare in part 3 above the function. _attribute_((interrupt)) void Fabric_IRQHandler( void ) { Page 16 of 18

17 Extra Page for Part 4 Page 17 of 18

18 References Page 18 of 18

EECS 373 Midterm Winter 2016

EECS 373 Midterm Winter 2016 EECS 373 Midterm Winter 2016 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Nor did I discuss this exam with anyone after

More information

EECS 373 Midterm 2 Exam Winter 2018

EECS 373 Midterm 2 Exam Winter 2018 EECS 373 Midterm 2 Exam Winter 2018 Name: SOLUTION unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: Problem # Points 1 /15

More information

EECS 373 Midterm Winter 2013

EECS 373 Midterm Winter 2013 EECS 373 Midterm Winter 2013 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: # Page Points 2 /15 3 /20 4 /12 5 /13

More information

EECS 373 Midterm Winter 2012

EECS 373 Midterm Winter 2012 EECS 373 Midterm Winter 2012 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Nor did I discuss this exam with anyone after

More information

EECS 373 Practice Midterm & Homework #2 Fall 2011

EECS 373 Practice Midterm & Homework #2 Fall 2011 Exam #: EECS 373 Practice Midterm & Homework #2 Fall 2011 Name: Uniquename: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: Problem #

More information

EECS 373 Practice Midterm / Homework #3 Fall 2014

EECS 373 Practice Midterm / Homework #3 Fall 2014 Exam #: EECS 373 Practice Midterm / Homework #3 Fall 2014 Name: Uniquename: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: Problem #

More information

EECS 373, Homework 4, Fall 2018 Assigned: Wednesday 10/3; Due: Wednesday 10/10 at 10pm

EECS 373, Homework 4, Fall 2018 Assigned: Wednesday 10/3; Due: Wednesday 10/10 at 10pm EECS 373, Homework 4, Fall 2018 Assigned: Wednesday 10/3; Due: Wednesday 10/10 at 10pm 1. Read https://blog.feabhas.com/2013/01/weak-linkage-in-c-programming/ [4 points] a. Define the term weak linkage.

More information

EECS 373 Midterm Winter 2017

EECS 373 Midterm Winter 2017 EECS 373 Midterm Winter 2017 Name: unique name: Sign the following honor code pledge. I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: Problem Points 1 /12

More information

EECS 373 Fall 2018 Homework #3

EECS 373 Fall 2018 Homework #3 EECS 373 Fall 2018 Homework #3 Answers 1) Loaders, Linkers and Executables a) In straightforward English, explain the role of a linker. [7 points] A linker receives object files as input and must emit

More information

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 373 Design of Microprocessor-Based Systems Ron Dreslinski University of Michigan Lecture 5: Memory-mapped I/O review, APB, Mostly APB though J January 18 th 2018 1 Administra,ve Midterm Exam: Monday,

More information

esi-multichannel Timer

esi-multichannel Timer 1 Contents 1 Contents 2 2 Overview 3 3 Hardware Interface 4 4 Software Interface 5 4.1 Register Map 5 4.2 Interrupts 6 Version 2.2 - Confidential 2 of 6 2010 EnSilica Ltd, All Rights Reserved 2 Overview

More information

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 373 Design of Microprocessor-Based Systems Mark Brehob University of Michigan Lecture 5: Memory-mapped I/O review, APB, start interrupts. Mostly APB though Sept. 19 th 2018 1 Today Memory-mapped I/O

More information

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 373 Design of Microprocessor-Based Systems Ron Dreslinski University of Michigan Lecture 4: Bit of assembly, Memory-mapped I/O, APB January 16, 2018 1 Admin HW2 Due Thursday. HW1 answers posted as

More information

EECS 373 Lab 3: Introduction to Memory Mapped I/O

EECS 373 Lab 3: Introduction to Memory Mapped I/O EECS 373 Lab 3: Introduction to Memory Mapped I/O In this lab we will learn: To develop custom peripheral hardware in the SmartFusion FPGA using the Libero CAD tools. The fundamentals of memory-mapped

More information

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 373 Design of Microprocessor-Based Systems Branden Ghena University of Michigan Lecture 4: Memory-Mapped I/O, Bus Architectures September 11, 2014 Slides developed in part by Mark Brehob & Prabal

More information

EECS 270 Midterm Exam

EECS 270 Midterm Exam EECS 270 Midterm Exam Fall 2009 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: NOTES: Problem # Points 1 /11 2 /4

More information

1 Contents 2 2 Overview 3 3 Hardware Interface 4 4 Software Interface Register Map Interrupts 6 5 Revision History 8

1 Contents 2 2 Overview 3 3 Hardware Interface 4 4 Software Interface Register Map Interrupts 6 5 Revision History 8 1 Contents 1 Contents 2 2 Overview 3 3 Hardware Interface 4 4 Software Interface 5 4.1 Register Map 5 4.2 Interrupts 6 5 Revision History 8 Version 2.3.2 - Confidential 2 of 8 2011 EnSilica Ltd, All Rights

More information

EECS 452 Midterm Closed book part Fall 2010

EECS 452 Midterm Closed book part Fall 2010 EECS 452 Midterm Closed book part Fall 2010 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: # Points Closed book Page

More information

1 Digital tools. 1.1 Introduction

1 Digital tools. 1.1 Introduction 1 Digital tools 1.1 Introduction In the past few years, enormous advances have been made in the cost, power, and ease of use of microcomputers and associated analog and digital circuits. It is now possible,

More information

By the end of Class. Outline. Homework 5. C8051F020 Block Diagram (pg 18) Pseudo-code for Lab 1-2 due as part of prelab

By the end of Class. Outline. Homework 5. C8051F020 Block Diagram (pg 18) Pseudo-code for Lab 1-2 due as part of prelab By the end of Class Pseudo-code for Lab 1-2 due as part of prelab Homework #5 on website due before next class Outline Introduce Lab 1-2 Counting Timers on C8051 Interrupts Laboratory Worksheet #05 Copy

More information

In this lecture, we will focus on two very important digital building blocks: counters which can either count events or keep time information, and

In this lecture, we will focus on two very important digital building blocks: counters which can either count events or keep time information, and In this lecture, we will focus on two very important digital building blocks: counters which can either count events or keep time information, and shift registers, which is most useful in conversion between

More information

EECS 452 Midterm Closed book part Fall 2010

EECS 452 Midterm Closed book part Fall 2010 EECS 452 Midterm Closed book part Fall 2010 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: # Points Closed book Page

More information

A 3-SPEED STEPPER MOTOR

A 3-SPEED STEPPER MOTOR ECE 36 Projects; Stepper Motor 1 of 5 A 3-SPEED STEPPER MOTOR 1. Design a microprocessing system to implement a 3-speed stepper motor. Your design is constrained to use the parts shown in Fig. 1 and described

More information

May the Schwartz be with you!

May the Schwartz be with you! Department of Electrical & Computer Engineering Tuesday 27 June 17 29-Sep-17 3:54 PM Page 1/13 Exam 1 Instructions: Turn off cell phones beepers and other noise making devices. Show all work on the front

More information

Interrupts, timers and counters

Interrupts, timers and counters Interrupts, timers and counters Posted on May 10, 2008, by Ibrahim KAMAL, in Micro-controllers, tagged Most microcontrollers come with a set of ADD-ONs called peripherals, to enhance the functioning of

More information

Microcomputers. Outline. Number Systems and Digital Logic Review

Microcomputers. Outline. Number Systems and Digital Logic Review Microcomputers Number Systems and Digital Logic Review Lecture 1-1 Outline Number systems and formats Common number systems Base Conversion Integer representation Signed integer representation Binary coded

More information

EECS 473 Midterm Exam

EECS 473 Midterm Exam EECS 473 Midterm Exam Fall 2016 Name: KEY unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. NOTES: 1. Closed book and Closed notes

More information

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1 Anurag Dwivedi Digital Design : Bottom Up Approach Basic Block - Gates Digital Design : Bottom Up Approach Gates -> Flip Flops Digital

More information

EECS 373 Design of Microprocessor-Based Systems

EECS 373 Design of Microprocessor-Based Systems EECS 373 Design of Microprocessor-Based Systems Branden Ghena University of Michigan Today Memory-Mapped I/O Example Bus with Memory-Mapped I/O Bus Architectures AMBA APB Lecture 4: Memory-Mapped I/O,

More information

1 Contents. Version of EnSilica Ltd, All Rights Reserved

1 Contents. Version of EnSilica Ltd, All Rights Reserved 1 Contents 1 Contents 2 2 Overview 3 3 Hardware Interface 4 3.1 Resource requirements 4 4 Software Interface 5 4.1 Register Map 5 4.2 Interrupts 7 5 RSA Operation 8 5.1 Introduction 8 5.2 Cycle counts

More information

Final Exam. Date: May 12, 2017

Final Exam. Date: May 12, 2017 Final Exam Date: May 12, 2017 UT EID: Printed Name: Last, First Your signature is your promise that you have not cheated and will not cheat on this exam, nor will you help others to cheat on this exam:

More information

Photoresistor, Transistor, and LED s

Photoresistor, Transistor, and LED s PH-1 Photoresistor, Transistor, and LD s Purpose: To introduce photoresistors, LD s, FT s, and transistors used as power switching devices To become familiar with the capability of the Atmega 128 to measure

More information

Bachelor of Engineering in Computer and Electronic Engineering

Bachelor of Engineering in Computer and Electronic Engineering Bachelor of Engineering in Computer and Electronic Engineering Computer Engineering 1 Year 2 Semester 3 Autumn 08 Niall O Keeffe Instructions to Candidates: - 2 hours duration Answer 4 out of 6 questions.

More information

Architectural design proposal for real time clock for wireless microcontroller unit

Architectural design proposal for real time clock for wireless microcontroller unit Architectural design proposal for real time clock for wireless microcontroller unit Muhammad Nor Azwan Mohd Alias 1, *, and Shaiful Nizam Mohyar 1 1 School of Microelectronic Engineering, University Malaysia

More information

University of Toronto Mississauga. Flip to the back cover and write down your name and student number.

University of Toronto Mississauga. Flip to the back cover and write down your name and student number. University of Toronto Mississauga Midterm Test Course: CSC258H5 Winter 2016 Instructor: Larry Zhang Duration: 50 minutes Aids allowed: None Last Name: Given Name: Flip to the back cover and write down

More information

A VHDL 8254 Timer core

A VHDL 8254 Timer core An www.opencores.org Project hlefevre@opencores.org Revision History Revision Date Author Description 0.1 3 Aug 2008 H LeFevre Initial Release of source files 0.5 4 Aug 2008 H LeFevre Add info about Timer

More information

MOTENC-Lite 4-Axis PCI Motion & I/O Control Board. Reference Manual Rev 1.1, June 20, Copyright 2005 VITAL Systems Inc

MOTENC-Lite 4-Axis PCI Motion & I/O Control Board. Reference Manual Rev 1.1, June 20, Copyright 2005 VITAL Systems Inc MOTENC-Lite 4-Axis PCI Motion & I/O Control Board Reference Manual Rev 1.1, June 20, 2005 Copyright 2005 VITAL Systems Inc www.vitalsystem.com This Page Intentionally Left Blank Table of Contents 1. OVERVIEW...

More information

Rotary Encoder Basics

Rotary Encoder Basics Rotary Encoder Basics A rotary encoder has a fixed number of positions per revolution. These positions are easily felt as small clicks you turn the encoder. The Keyes module that I have has thirty of these

More information

MOTENC Axis PCI Motion & I/O Control Board. Reference Manual Rev 1A, April Copyright 2004 VITAL Systems Inc

MOTENC Axis PCI Motion & I/O Control Board. Reference Manual Rev 1A, April Copyright 2004 VITAL Systems Inc MOTENC-100 8-Axis PCI Motion & I/O Control Board Reference Manual Rev 1A, April-7-2004 Copyright 2004 VITAL Systems Inc www.vitalsystem.com This Page Intentionally Left Blank Table of Contents 1. OVERVIEW...

More information

Introduction to the MC9S12 Hardware Subsystems

Introduction to the MC9S12 Hardware Subsystems Setting and clearing bits in C Using pointers in C o Program to count the number of negative numbers in an area of memory Introduction to the MC9S12 Hardware Subsystems o The MC9S12 timer subsystem Operators

More information

CS/EE Homework 7 Solutions

CS/EE Homework 7 Solutions CS/EE 260 - Homework 7 Solutions 4/2/2001 1. (20 points) A 4 bit twisted ring counter is a sequential circuit which produces the following sequence of output values: 0000, 1000, 1100, 1110, 1111, 0111,

More information

Unit B - Rotary Encoders B.1

Unit B - Rotary Encoders B.1 Unit B - Rotary Encoders B.1 B.2 Rotary Encoders Electromechanical devices used to measure the angular position or rotation of a shaft. Two types: Absolute: Output a binary number for the current angular

More information

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013

EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013 EPC6055 Digital Integrated Circuits EXAM 1 Fall Semester 2013 Print Here Student ID Signature This is a closed book exam. The exam is to be completed in one-hundred ten (110) minutes. Don t use scratch

More information

IP-Quadrature. Four Channel Quadrature Decoder IndustryPack User s Manual

IP-Quadrature. Four Channel Quadrature Decoder IndustryPack User s Manual IP-Quadrature Four Channel Quadrature Decoder IndustryPack User s Manual Manual Revision: 9 7/26/99 Hardware Revision: A IP-Quadrature Four Channel Quadrature Decoder IndustryPack This document contains

More information

EE251: Tuesday December 4

EE251: Tuesday December 4 EE251: Tuesday December 4 Memory Subsystem continued Timing requirements Adding memory beyond 4 Gbyte Time Allowing: Begin Review for Final Exam Homework #9 due Thursday at beginning of class Friday is

More information

University of Florida EEL 3744 Spring 2018 Dr. Eric M. Schwartz. Good luck!

University of Florida EEL 3744 Spring 2018 Dr. Eric M. Schwartz. Good luck! Page 1/13 Exam 2 Relax! Go Gators! Good luck! First Name Instructions: Turn off all cell phones and other noise making devices and put away all electronics. Show all work on the front of the test papers.

More information

EE445L Fall 2014 Final Version A Page 1 of 7

EE445L Fall 2014 Final Version A Page 1 of 7 EE445L Fall 2014 Final Version A Page 1 of 7 Jonathan W. Valvano First: Last: This is the closed book section. You must put your answers in the boxes. When you are done, you turn in the closed-book part

More information

LCD Display. Other I/O. LCD display Flash ROM SPI EPROM Keyboard (PS/2) UART connectors DAC ADC. 2-line, 16 character LCD display

LCD Display. Other I/O. LCD display Flash ROM SPI EPROM Keyboard (PS/2) UART connectors DAC ADC. 2-line, 16 character LCD display Other I/O LCD display Flash ROM SPI EPROM Keyboard (PS/2) UART connectors DAC ADC LCD Display 2-line, 16 character LCD display 4-bit interface Relatively easy to use once you have it mapped into your processor

More information

EE251: Thursday November 30

EE251: Thursday November 30 EE251: Thursday November 30 Course Evaluation Forms-fill out Memory Subsystem continued Timing requirements Adding memory beyond 4 Gbyte Time Allowing: Begin Review for Final Exam Homework due next Tuesday,

More information

CN310 Microprocessor Systems Design

CN310 Microprocessor Systems Design CN310 Microprocessor Systems Design Microcontroller Nawin Somyat Department of Electrical and Computer Engineering Thammasat University Outline Course Contents 1 Introduction 2 Simple Computer 3 Microprocessor

More information

Good Evening! Welcome!

Good Evening! Welcome! University of Florida EEL 3701 Fall 2011 Dr Eric M Schwartz Page 1/11 Exam 2 Instructions: Turn off all cell phones, beepers and other noise making devices Show all work on the front of the test papers

More information

EECS 470 Final Exam Fall 2015

EECS 470 Final Exam Fall 2015 EECS 470 Final Exam Fall 2015 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: Page # Points 2 /17 3 /11 4 /13 5 /10

More information

Interface DAC to a PC. Control Word of MC1480 DAC (or DAC 808) 8255 Design Example. Engineering 4862 Microprocessors

Interface DAC to a PC. Control Word of MC1480 DAC (or DAC 808) 8255 Design Example. Engineering 4862 Microprocessors Interface DAC to a PC Engineering 4862 Microprocessors Lecture 22 Cheng Li EN-4012 licheng@engr.mun.ca DAC (Digital-to-Analog Converter) Device used to convert digital pulses to analog signals Two methods

More information

8051 Microcontroller

8051 Microcontroller 8051 Microcontroller The 8051, Motorola and PIC families are the 3 leading sellers in the microcontroller market. The 8051 microcontroller was originally developed by Intel in the late 1970 s. Today many

More information

TOPIC: Digital System Design (ENEL453) Q.1 (parts a-c on following pages) Reset. Clock SREG1 SI SEN LSB RST CLK. Serial Adder. Sum.

TOPIC: Digital System Design (ENEL453) Q.1 (parts a-c on following pages) Reset. Clock SREG1 SI SEN LSB RST CLK. Serial Adder. Sum. TOPIC: Digital System Design (ENEL453) Q.1 (parts a-c on following pages) Consider the serial adder below. Two shift registers SREG1 and SREG2 are used to hold the four bit numbers to be added. Each register

More information

University of Florida EEL 4744 Spring 2014 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 1 April Apr-14 9:03 AM

University of Florida EEL 4744 Spring 2014 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 1 April Apr-14 9:03 AM Page 1/15 Exam 2 Instructions: Turn off cell phones beepers and other noise making devices. BEAT UCONN! Show all work on the front of the test papers. If you need more room make a clearly indicated note

More information

Engineering 100 Midterm Exam Technical Part Fall 2010

Engineering 100 Midterm Exam Technical Part Fall 2010 Engineering 100 Midterm Exam Technical Part Fall 2010 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: Page # Points

More information

EECS 470 Midterm Exam Answer Key Fall 2004

EECS 470 Midterm Exam Answer Key Fall 2004 EECS 470 Midterm Exam Answer Key Fall 2004 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: # Points Part I /23 Part

More information

EE 308 Spring A software delay. To enter a software delay, put in a nested loop, just like in assembly.

EE 308 Spring A software delay. To enter a software delay, put in a nested loop, just like in assembly. More on Programming the 9S12 in C Huang Sections 5.2 through 5.4 Introduction to the MC9S12 Hardware Subsystems Huang Sections 8.2-8.6 ECT_16B8C Block User Guide A summary of MC9S12 hardware subsystems

More information

ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS

ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL. Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL Fall 2017 Final Exam (6.00 to 8.30pm) Verilog SOLUTIONS Note: Closed book no notes or other material allowed apart from the one

More information

ED1021 I/O Expander with UART interface & analog inputs

ED1021 I/O Expander with UART interface & analog inputs Preliminary Highlights 4.5V 5.5V power supply range. 12 GPIOs. Up to 40mA maximum current in each output except GPIO8 (up to a total device current of 175mA). Most GPIOs can be an input to a 10bit ADC.

More information

MCU: Interrupts and Timers. Ganesh Pitchiah

MCU: Interrupts and Timers. Ganesh Pitchiah MCU: Interrupts and Timers Ganesh Pitchiah What s an MCU? Frequency = 8 MHz Time Period = 1/f = 0.125 us Code for Switching LED int a; voltage while(1) { a = PINA.0; input) If (a==1) PORTA.1=1; else PORTA.1=0;

More information

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to?

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to? ECE3710 Exam 2. Name _ Spring 2013. 5 pages. 102 points, but scored out of 100. You may use any non-living resource to complete this exam. Any hint of cheating will result in a 0. Part 1 Short Answer 1.

More information

In Class Assignment 2

In Class Assignment 2 In Class Assignment 2 Name: UMBC ID: Academic Integrity Statement: "Integrity of scholarship is essential for an academic community. The University expects that students will honor this. By signing this,

More information

1 Contents. Version of EnSilica Ltd, All Rights Reserved

1 Contents. Version of EnSilica Ltd, All Rights Reserved 56/SHA224 1 Contents 1 Contents 2 2 Overview 3 3 Hardware Interface 4 3.1 Area 4 4 Software Interface 5 4.1 Register Map 5 5 SHA256/SHA224 Operation 8 5.1 Introduction 8 5.2 Cycle counts 8 6 Revision History

More information

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT

Lecture 5: Computing Platforms. Asbjørn Djupdal ARM Norway, IDI NTNU 2013 TDT 1 Lecture 5: Computing Platforms Asbjørn Djupdal ARM Norway, IDI NTNU 2013 2 Lecture overview Bus based systems Timing diagrams Bus protocols Various busses Basic I/O devices RAM Custom logic FPGA Debug

More information

EECS 373. Design of Microprocessor-Based Systems. Prabal Dutta University of Michigan. Announcements. Homework #2 Where was I last week?

EECS 373. Design of Microprocessor-Based Systems. Prabal Dutta University of Michigan. Announcements. Homework #2 Where was I last week? Announcements EECS 373 Homework #2 Where was I last week? Design of Microprocessor-Based Systems VLCS 14 MobiCom 14 HotWireless 14 Prabal Dutta University of Michigan Lecture 5: Memory and Peripheral Busses

More information

HC12 Built-In Hardware

HC12 Built-In Hardware HC12 Built-In Hardware The HC12 has a number of useful pieces of hardware built into the chip. Different versions of the HC12 have slightly different pieces of hardware. We are using the MC68HC912B32 chip

More information

END-TERM EXAMINATION

END-TERM EXAMINATION (Please Write your Exam Roll No. immediately) END-TERM EXAMINATION DECEMBER 2006 Exam. Roll No... Exam Series code: 100919DEC06200963 Paper Code: MCA-103 Subject: Digital Electronics Time: 3 Hours Maximum

More information

APB4 GPIO. APB4 GPIO Datasheet Roa Logic, All rights reserved

APB4 GPIO. APB4 GPIO Datasheet Roa Logic, All rights reserved 1 APB4 GPIO Datasheet 2 Introduction The APB4 GPIO Core is fully parameterised core designed to provide a userdefined number of general purpose, bidirectional IO to a design. The IO are accessible via

More information

CMPSCI 145 MIDTERM #1 Solution Key. SPRING 2017 March 3, 2017 Professor William T. Verts

CMPSCI 145 MIDTERM #1 Solution Key. SPRING 2017 March 3, 2017 Professor William T. Verts CMPSCI 145 MIDTERM #1 Solution Key NAME SPRING 2017 March 3, 2017 PROBLEM SCORE POINTS 1 10 2 10 3 15 4 15 5 20 6 12 7 8 8 10 TOTAL 100 10 Points Examine the following diagram of two systems, one involving

More information

Chapter 10. case studies in sequential logic design

Chapter 10. case studies in sequential logic design Chapter. case studies in sequential logic design This is the last chapter of this course. So far, we have designed several sequential systems. What is the general procedure? The most difficult part would

More information

Lab 5: EBI and ADC: Digital Voltmeter

Lab 5: EBI and ADC: Digital Voltmeter Page 1/5 OBJECTIVES Learn how to use C (as an alternative to Assembly) in your programs. Learn how to use an analog-to-digital conversion (ADC, also known as A/D) system on a microcontroller. Use the ADC

More information

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog ECE 2300 Digital Logic & Computer Organization Spring 2018 More Sequential Logic Verilog Lecture 7: 1 Announcements HW3 will be posted tonight Prelim 1 Thursday March 1, in class Coverage: Lectures 1~7

More information

Note: Closed book no notes or other material allowed, no calculators or other electronic devices.

Note: Closed book no notes or other material allowed, no calculators or other electronic devices. ECE 574: Modeling and Synthesis of Digital Systems using Verilog and VHDL Fall 2017 Exam Review Note: Closed book no notes or other material allowed, no calculators or other electronic devices. One page

More information

EECS 470 Midterm Exam

EECS 470 Midterm Exam EECS 470 Midterm Exam Winter 2014 Name: unique name: Sign the honor code: I have neither given nor received aid on this exam nor observed anyone else doing so. Scores: NOTES: # Points Page 2 /12 Page 3

More information

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited

EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited EECS150 - Digital Design Lecture 20 - Finite State Machines Revisited April 2, 2009 John Wawrzynek Spring 2009 EECS150 - Lec20-fsm Page 1 Finite State Machines (FSMs) FSM circuits are a type of sequential

More information

EECS150 - Digital Design Lecture 17 Memory 2

EECS150 - Digital Design Lecture 17 Memory 2 EECS150 - Digital Design Lecture 17 Memory 2 October 22, 2002 John Wawrzynek Fall 2002 EECS150 Lec17-mem2 Page 1 SDRAM Recap General Characteristics Optimized for high density and therefore low cost/bit

More information

Input/Output Modes Chapter 8

Input/Output Modes Chapter 8 Input/Output Modes Chapter 8 Microcomputers can communicate with a variety of I/O devices This information can be either data or control Data is usually encoded in numeric or alphanumeric forms such as

More information

EE 354 Fall 2015 Lecture 1 Architecture and Introduction

EE 354 Fall 2015 Lecture 1 Architecture and Introduction EE 354 Fall 2015 Lecture 1 Architecture and Introduction Note: Much of these notes are taken from the book: The definitive Guide to ARM Cortex M3 and Cortex M4 Processors by Joseph Yiu, third edition,

More information

82C54 CHMOS PROGRAMMABLE INTERVAL TIMER

82C54 CHMOS PROGRAMMABLE INTERVAL TIMER CHMOS PROGRAMMABLE INTERVAL TIMER Compatible with all Intel and most other microprocessors High Speed Zero Wait State Operation with 8 MHz 8086 88 and 80186 188 Handles Inputs from DC 10 MHz for -2 Available

More information

I also provide a purpose-built ADC/DAC board to support the lab experiment. This analogue I/O board in only needed for Part 3 and 4 of VERI.

I also provide a purpose-built ADC/DAC board to support the lab experiment. This analogue I/O board in only needed for Part 3 and 4 of VERI. 1 2 I also provide a purpose-built ADC/DAC board to support the lab experiment. This analogue I/O board in only needed for Part 3 and 4 of VERI. However I will now be examining the digital serial interface

More information

EECS150, Fall 2004, Midterm 1, Prof. Culler. Problem 1 (15 points) 1.a. Circle the gate-level circuits that DO NOT implement a Boolean AND function.

EECS150, Fall 2004, Midterm 1, Prof. Culler. Problem 1 (15 points) 1.a. Circle the gate-level circuits that DO NOT implement a Boolean AND function. Problem 1 (15 points) 1.a. Circle the gate-level circuits that DO NOT implement a Boolean AND function. 1.b. Show that a 2-to-1 MUX is universal (i.e. that any Boolean expression can be implemented with

More information

CPE/EE 421/521 Fall 2004 Chapter 4 The CPU Hardware Model. Dr. Rhonda Kay Gaede UAH. The CPU Hardware Model - Overview

CPE/EE 421/521 Fall 2004 Chapter 4 The CPU Hardware Model. Dr. Rhonda Kay Gaede UAH. The CPU Hardware Model - Overview CPE/EE 421/521 Fall 2004 Chapter 4 The 68000 CPU Hardware Model Dr. Rhonda Kay Gaede UAH Fall 2004 1 The 68000 CPU Hardware Model - Overview 68000 interface Timing diagram Minimal configuration using the

More information

Microcontroller basics

Microcontroller basics FYS3240 PC-based instrumentation and microcontrollers Microcontroller basics Spring 2017 Lecture #4 Bekkeng, 30.01.2017 Lab: AVR Studio Microcontrollers can be programmed using Assembly or C language In

More information

DEV-1 HamStack Development Board

DEV-1 HamStack Development Board Sierra Radio Systems DEV-1 HamStack Development Board Reference Manual Version 1.0 Contents Introduction Hardware Compiler overview Program structure Code examples Sample projects For more information,

More information

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation

Embedded systems. Exercise session 3. Microcontroller Programming Lab Preparation Embedded systems Exercise session 3 Microcontroller Programming Lab Preparation Communications Contact Mail : michael.fonder@ulg.ac.be Office : 1.82a, Montefiore Website for the exercise sessions and the

More information

EEL 4744C: Microprocessor Applications. Lecture 7. Part 1. Interrupt. Dr. Tao Li 1

EEL 4744C: Microprocessor Applications. Lecture 7. Part 1. Interrupt. Dr. Tao Li 1 EEL 4744C: Microprocessor Applications Lecture 7 Part 1 Interrupt Dr. Tao Li 1 M&M: Chapter 8 Or Reading Assignment Software and Hardware Engineering (new version): Chapter 12 Dr. Tao Li 2 Interrupt An

More information

Reading Assignment. Interrupt. Interrupt. Interrupt. EEL 4744C: Microprocessor Applications. Lecture 7. Part 1

Reading Assignment. Interrupt. Interrupt. Interrupt. EEL 4744C: Microprocessor Applications. Lecture 7. Part 1 Reading Assignment EEL 4744C: Microprocessor Applications Lecture 7 M&M: Chapter 8 Or Software and Hardware Engineering (new version): Chapter 12 Part 1 Interrupt Dr. Tao Li 1 Dr. Tao Li 2 Interrupt An

More information

AvnetCore: Datasheet

AvnetCore: Datasheet AvnetCore: Datasheet CAN Controller with / FIFO Intended Use: Automotive Industry Engine Control Unit Sensors Version 1.0, July 2006 xcan_clk (>8 MHz) pclk reset_n APB Interrupts System Control APB Interface

More information

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences Introductory Digital Systems Lab (6.111) uiz - Spring 2004 Prof. Anantha Chandrakasan Student Name: Problem

More information

Nikhil Gupta. FPGA Challenge Takneek 2012

Nikhil Gupta. FPGA Challenge Takneek 2012 Nikhil Gupta FPGA Challenge Takneek 2012 RECAP FPGA Field Programmable Gate Array Matrix of logic gates Can be configured in any way by the user Codes for FPGA are executed in parallel Configured using

More information

I Introduction to Real-time Applications By Prawat Nagvajara

I Introduction to Real-time Applications By Prawat Nagvajara Electrical and Computer Engineering I Introduction to Real-time Applications By Prawat Nagvajara Synopsis This note is an introduction to a series of nine design exercises on design, implementation and

More information

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Microcontroller It is essentially a small computer on a chip Like any computer, it has memory,

More information

8051 Peripherals. On-Chip Memory Timers Serial Port Interrupts. Computer Engineering Timers

8051 Peripherals. On-Chip Memory Timers Serial Port Interrupts. Computer Engineering Timers 8051 Peripherals On-Chip Memory Timers Serial Port Interrupts Computer Engineering 2 2-1 8051 Timers 8051 Timers The 8051 has 2 internal 16-bit timers named Timer 0 and Timer 1 Each timer is a 16-bit counter

More information

These three counters can be programmed for either binary or BCD count.

These three counters can be programmed for either binary or BCD count. S5 KTU 1 PROGRAMMABLE TIMER 8254/8253 The Intel 8253 and 8254 are Programmable Interval Timers (PTIs) designed for microprocessors to perform timing and counting functions using three 16-bit registers.

More information

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks ECE 331: N0 ECE230 Review Professor Andrew Mason Michigan State University Spring 2013 1.1 Announcements Opening Remarks HW1 due next Mon Labs begin in week 4 No class next-next Mon MLK Day ECE230 Review

More information

2.996/6.971 Biomedical Devices Design Laboratory Lecture 6: Microprocessors II

2.996/6.971 Biomedical Devices Design Laboratory Lecture 6: Microprocessors II 2.996/6.971 Biomedical Devices Design Laboratory Lecture 6: Microprocessors II Instructor: Dr. Hong Ma Oct. 1, 2007 Structure of MSP430 Program 1. Declarations 2. main() 1. Watch-dog timer servicing 2.

More information

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book BUILDING BLOCKS OF A BASIC MICROPROCESSOR Part PowerPoint Format of Lecture 3 of Book Decoder Tri-state device Full adder, full subtractor Arithmetic Logic Unit (ALU) Memories Example showing how to write

More information

Roa Logic. APB4 Multiplexer. Datasheet. October, c Roa Logic B.V.

Roa Logic. APB4 Multiplexer. Datasheet.   October, c Roa Logic B.V. Roa Logic Silicon Proven IP for FPGA and ASIC www.roalogic.com APB4 Multiplexer Datasheet http://roalogic.github.io/plic October, 2017 c Roa Logic B.V. Contents 1 Introduction 1 1.1 Features......................................

More information