Go Gators! Relax! May the Schwartz be with you!

Similar documents
University of Florida EEL 4744 Spring 2011 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 31 March Apr-11 1:29 PM

University of Florida EEL 3744 Spring 2017 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 22 February Mar-17 1:44 PM

University of Florida EEL 4744 Spring 2012 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 22 February Jun-12 4:55 PM

University of Florida EEL 4744 Summer 2014 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 1 July Oct-14 6:41 PM

May the Schwartz be with you!

University of Florida EEL 4744 Fall 1998 Dr. Eric M. Schwartz

University of Florida EEL 4744 Spring 2013 Dr. Eric M. Schwartz Department of Electrical & Computer Engineering 28 March Jun-13 6:18 PM

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 3744 Spring 2018 Dr. Eric M. Schwartz. Good luck!

Good Evening! Welcome!

Ryerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 2003

MC68HC12 Parallel I/O

EE319 K Lecture 3. Introduction to the 9S12 Lab 1 Discussion Using the TExaS simulator. University of Texas ECE

Mark II Aiken Relay Calculator

538 Lecture Notes Week 5

CMPEN 472 Sample EXAM II

Total: EEL 3701 Digital Logic & Computer Systems Final Exam Fall Semester 2007 COVER SHEET: Re-Grade Information: 1 (10) 2 (10) 3 (10) 4 (14) 5 (14)

538 Lecture Notes Week 5

ECE 3610 MICROPROCESSING SYSTEMS AN ENCRYPTED ASCII CODE DECODER

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING. Principles of Computer Operation

UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING

AN Kbyte Addressing with the M68HC11. Overview

Programming the Motorola MC68HC11 Microcontroller

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

Y = (A + C) (A + B) (B + C)

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

C SC 230 Computer Architecture and Assembly Language April 2000 Exam Sample Solutions

Programming Book for 6809 Microprocessor Kit

1. Memory Mapped Systems 2. Adding Unsigned Numbers

CS/ECE 5780/6780: Embedded System Design

ME 4447 / ME 6405: Introduction to Mechatronics

Using the stack and the stack pointer

CHALMERS Lindholmen 1. Compare (a) a sand hour glass, (b) a pocket mechanical watch (c) a wrist quartz watch and (d) the Big

ECE/CS 3720: Embedded System Design (ECE 6960/2 and CS 6968)

Module 2.F. Buffered, Interrupt-Driven Printer Design Example. Tim Rogers 2017

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

ECE 367 -Experiment #1 Fall 2012

Introduction to Microcontrollers

AN-HK-32. In-Circuit Programming of FLASH Memory in the MC68HC908GP32. nc... Freescale Semiconductor, I. PART 1 Introduction

Introduction to Mechatronics. Fall Instructor: Professor Charles Ume. Interrupts and Resets

ECE/CE 3720: Embedded System Design

Exam 2 E2-1 Fall Name: Exam 2

2.0 Installation & Quick Testing The following two sections will help you boot up your UF 6812 Development Board.

EE 3170 Microcontroller Applications

EE 3170 Microcontroller Applications

AN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction

Microcontrollers and the Freescale/Motorola HC11

68HC12 Training Lab Student Exercise Book

Freescale Semiconductor, Inc.

The 9S12 in Expanded Mode - How to get into expanded mode Huang Chapter 14

EE 308 Spring Lecture 28 March 30, 2012 Review for Exam 2. Introduction to the MC9S12 Expanded Mode

Lab 8: Debugging Embedded Devices and Software

CodeWarrior. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

Digital Input and Output

Microprocessor Architecture. mywbut.com 1

EE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1. Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University

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

SWTPC 6800/CT-1024/AC-30 Cassette Tape

ECE/CE 3720: Embedded System Design

Prototype Control Board for an Automated Bar (Robotic Bar Monkey)

Input and Output Ports. How do you get data into a computer from the outside?

Coe538 Final Study Guide 2016 (Questions & Answers)

EB193. Motorola Semiconductor Engineering Bulletin. Replacing 68HC11A Series MCUs with 68HC11E Series MCUs. Freescale Semiconductor, I.

Module 1-G. Marcos and Structured Programming

Menu. Polling Example

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

Exam 2 E2-1 Fall Name: Exam 2

; export symbols ; export 'Entry' symbol. ; include derivative specific macros PORTA EQU $0000 PORTB EQU $0001 DDRA EQU $0002 DDRB EQU $0003

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

CHAPTER TWELVE - Memory Devices

AN1239. HC05 MCU Keypad Decoding Techniques Using the MC68HC705J1A. Introduction

YOU WILL NOT BE ALLOWED INTO YOUR LAB SECTION WITHOUT THE REQUIRED PRE-LAB.

ECE372 CodeWarrior Simulator Andreou/Michaelides

2. List the five interrupt pins available in INTR, TRAP, RST 7.5, RST 6.5, RST 5.5.

ME 6405 Introduction to Mechatronics

CS 151 Quiz 4. Instructions: Student ID. (Last Name) (First Name) Signature

Roberto Muscedere Images and Text Portions 2003 Prentice Hall 1

Chapter 4: Advanced Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh

E3940 Microprocessor Systems Laboratory. Introduction to the Z80

Chapter Operation Pinout Operation 35

An ability to program a microcontroller to perform various tasks

Cross Assembly and Program Development

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

Review for Exam III. Analog/Digital Converters. The MC9S12 has two 10-bit successive approximation A/D converters - can be used in 8-bit mode

Microcontrollers. Microcontroller

ASSIGNMENT 4: INTRODUCTION TO THE 68HC11. Out: Monday, Sep 29, 2003 Due Monday, Oct 6, 2003

EXPERIMENT #7 PARALLEL INTERFACING USING THE PERIPHERAL INTERFACE ADAPTER (PIA)

Interrupt and Timer ISRs. Student's name & ID: Partner's name(s) & ID(s): Your Section number & TA's name

University of Florida EEL 4744 Drs. Eric M. Schwartz, Karl Gugel & Tao Li Department of Electrical and Computer Engineering

3. The MC6802 MICROPROCESSOR

Using the MC9S12 in Expanded Mode External Ports S12CPUV2 Reference Manual Multiplexed External Bus Interface (MEBI) Module V3 Block User Guide

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

Student # (In case pages get detached) The Edward S. Rogers Sr. Department of Electrical and Computer Engineering

A 3-SPEED STEPPER MOTOR

Module 2. Embedded Processors and Memory. Version 2 EE IIT, Kharagpur 1

SEVEN SEGMENT DISPLAY LAB EXPERIMENT

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

AN-HK-33. In-Circuit Programming of FLASH Memory in the MC68HC908JL3. Roger Fan Applications Engineering Microcontroller Division Hong Kong

What Happens When You Reset the MC9S12?

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

Transcription:

Page 1/12 Exam 1 Instructions: Turn off cell phones beepers and other noise making devices. Show all work on the front of the test papers. If you need more room make a clearly indicated note on the front of the page "MORE ON BACK" and use the back. The back of the page will not be graded without an indication on the front. You may use any of your approved class textbooks or Motorola manuals. You may not use any notes (mine or yours) examples homework labs books or calculators. Put your name at the top of each test page and be sure your exam consists of 3 distinct pages. The space provided does not necessarily represent the amount of writing necessary. You must pledge and sign this page in order for a grade to be assigned. In programs the use of comments results in more partial credit. Read each question carefully and follow the instructions. The point values for problems may be changed at prof s discretion. Part of your grade on tests quizzes labs etc. is based not only on solving the problem you are presented with but the manner in which you solve it. For example there is a difference between two programs that meet the given specifications but one is an elegant extensible 20-line solution while the other is an obfuscated 100-line program that also meets the specifications but would be difficult to extend later. Just as your future employer would value the latter program less than the first so will I in grading your assignments. This exam counts for 30-32.25% of your total grade. Unless otherwise stated assume the following: Go Gators! The oscillator frequency is precisely 4Mz. Good luck! The code should run on a 6C12B32 with 64k of external RAM and without the D-Bug4744 monitor but with the internal EEPROM RAM and Registers of your 6C12 chip. You may assume all internal register equates (at $0000 $01FF) are already done e.g. PORTT equ $00AE. Also already done are all the bit equates that you may need using the standard I have used in class and on the posted web examples (e.g. BIT0 equ %00000001 BIT76 equ %11000000 INV7 equ %01111111). PEDGE: On my honor as a University of Florida student I certify that I have neither given nor received any aid on this examination nor I have seen anyone else do so. PRINT YOUR NAME SIGN YOUR NAME DATE (5 July 07) Regrade comments below. Give page # and problem # and reason for the petition. Relax! May the Schwartz be with you! Pages Available Points 2 11 3 15 4 10 5-6 12 7-10 26 11-12 26 TOTA 100

Page 2/12 Exam 1 [5%] 1. Draw a complete mixed-logic circuit diagram to implement the below equation. Include pin numbers on your diagram and use appropriate 4 min switch circuits and an ED circuit. Use switches resistors and ED s as needed. The only IC (chip) you can use is the 74 32 (shown) but draw a logic diagram not a layout. Pick and label appropriate activation levels for A B and Y. Show the switches in their true positions. A functional block diagram of a 74 32 is shown to the right. Y = /(A * /B) 1 2 4 5 9 10 32 3 6 12 13 11 [6%] 2. Answer the following questions about asynchronous serial communication. (3%) a) If a transmitter sends data out at a frequency of 2000z how long (in seconds) does it take to send out 2000 bytes of data (using the normal serial formatting that we used)? 3 min (Show all work.) (3%) b) What was the purpose of the RS-232 chip used in lab 4? 2 min

Page 3/12 Exam 1 [2%] 3. ow many -bit ports can be added to your 6C12? Circle the best answer: 2 min 0 1 2 16 37 more than 37 Why did you circle the above answer? Explain. [4%] 4. There were two -bit 3-state transparent latches on the 6C12 development board before you added hardware in the expansion area of the board. What were their purposes? 3 min [1%] 5. Which 6C12 system works with the USB port on our 6C12 development board? 1 min [4%] 6. The UART chip we used in lab had several address lines. Describe the purpose of these address pins. 3 min [4%] 7. Why do we have pseudo-vectors on our UF-designed 6C12 boards? 3 min

Page 4/12 Exam 1 [10%]. Describe the stack on the 6C12 as it relates to a subroutine. Assume a subroutine named Sub_Ex1 is located at address $4744. Write a sample subroutine calling instruction (just min as you did many times in lab and as I did in class) at location $3701 in the box below (left). Write the stack pointer initialization instruction in the appropriate box below (right). Initialize the stack pointer at an appropriate location in internal 6C12 RAM. Address $3701 Subroutine call instruction Describe the stack... to a subroutine: Address $C000 Stack pointer initialization Draw the stack 1) after the stack is initialized 2) before the subroutine is called but after $42 is pushed on the stack 3) at the start of the subroutine execution 4) after $EF is pushed on the stack 5) after a PUA instruction and 6) after the return from the subroutine. In each case show an arrow at the location of the stack pointer. Show (valid) addresses for each of the used stack locations. Address 1-After Init 2-Before call 3-Just after call 4-After $EF push 5-After $PUA 6-After return

Page 5/12 Exam 1 15 min [12%] 9. Circle and correct the problems with the following serial port (operating at 3700 z) code? Assume Out_Char and In_Char are as used in class with data passed in register A. * Constants EOS equ 04 ESC equ 1B * Data string to be printed to the screen DATA "May the Schwartz be with you!" * Main Program outputs the above string to the * screen then waits for the user to press ESC * * INPUT: Wait for user to press ESC. * OUTPUT: String at X. * DESTROYS: A X. * REGS USED: None. * CAS: INIT_SCI OUT_STR IN_CAR. MAIN org $0F0 lds #$900 ;initialize stack pointer jmp INIT_SCI ;initialize SCI ldx DATA ;load the pointer to the string into x for OUT_STR jmp OUT_STR ;print the string to the screen jmp IN_CAR ;read in a character OOP anda ESC ;check if the character is ESC beq FINIS ;if it is ESC then finish bra OOP ;otherwise read in another character FINIS * Subroutine to output the string starting at X * * to the screen * * INPUT: X. * OUTPUT: String at X. * DESTROYS: A X * REGS USED: None * CAS: OUT_CAR OUT_STR. OUT_STR ldaa 1X ;load in a character anda EOS ;check if the character is EOS bne DONE ;if the character is EOS then finish jmp OUT_CAR ;otherwise print the character to the screen bra OUT_STR ;loop back to get the next character DONE rts * MORE ON NEXT PAGE

Page 6/12 Exam 1 [10%] 9. (Continued) * Subroutine to setup the 6C12 SCI system * * Baud Rate 3700 data bits 1 stop bit * * INPUT: None. * OUTPUT: Initializes SCI. * DESTROYS: A. * REGS USED: DDRS SC0BD SC0BD SC0CR1 * CAS: None. INIT_SCI bclr DDRS BIT1 ; Set data direction to output for bset DDRS BIT0 ; PortS bit1 (the Tx pin) ; and input for PortS bit0 (Rx) ldaa #0 ; Set baud rate to 3700 staa SC0BD ; 2Mz / 16 / 13 = 3700z ldaa #13 ; staa SC0BD ; ldaa #0 ; 1 start/stop bit data bits ; staa SC0CR1 ; no wakeup ldaa #INV32 ; Enable Tx and Rx; staa SC0CR2 ; all interrupts disabled rts

Page 7/12 Exam 1 [26%] 10. In this problem you will continuously increment an (external) output port at $C37F 5 min (OutPort) at a calculated rate (after first initializing OutPort to zero). To determine the time between OutPort increments first read an (external) input port at $D123 (InPort). The value read is in time units of ms (±5%) e.g. if InPort=3 then the time between OutPort increments is 3*ms =24ms (±5%). Note that the value of InPort is guaranteed to be between 2 and 173. You do not have to read InPort any more often than the active time between increments. Write a complete program to accomplish this task. You can not use delay loops (as we did in labs 1 and 2). The program for this problem should run on your UF 6C12 board with the monitor program. The IRQ vector is located at $FFF2; the pseudo-vector is at $36. The TOF vector is located at $FFDE; the pseudo-vector is at $01. The RTI vector is at $FFF0; the pseudo-vector is at $033. (3%) a) Describe the algorithm and 6C12 system that you plan to implement to solve this 5 min problem in some detail. Describe the initializations you will need to do in the main routine. Describe the initializations you will need to do to any interrupt service routine(s) you plan to use. (13%) b) Write a main routine initializing all things necessary. This code should never stop executing i.e. repeat it continuously. This routine should do all the necessary 10 min initializations. Note that in the next part of this problem you will write any required subroutine(s) and/or interrupt service routine(s) to complete the required program. Assume all code must be placed in the internal RAM of our 6C12. Assume our Debug4744 monitor program is available on the board. (Note: Comments are helpful!)

Page /12 Exam 1 (cont.) 10. b) [Repeated part b for your convenience.] Write a main routine initializing all things necessary. This code should never stop executing i.e. repeat it continuously. This routine should do all the necessary initializations. Note that in the next part of this problem you will write any required subroutine(s) and/or interrupt service routine(s) to complete the required program. Assume all code must be placed in the internal RAM of our 6C12. Assume our Debug4744 monitor program is available on the board. (Note: Comments are helpful!) abels Instructions Comments

Page 9/12 Exam 1 (cont.) 10. b) (Note: Comments are helpful!) abels Instructions Comments clr OutPort * ldaa #0 * staa OutPort

Page 10/12 Exam 1 (10%) 10. c) Write the subroutine(s) and/or interrupt service routine(s) to complete the required min program. abels Instructions Comments

Page 11/12 Exam 1 [26%] 11. The 6C73 is a new microcontroller very much like the 6C11 and 6C12. The only 20 min differences are discussed here. The timing diagrams for reading and writing are given. ike the 611 and 612 the 673 has a timemultiplexed address/data bus. Note the two ECK-like signals on this device F1 and F2. Note also that the high part of the address bus is tri-stated during the second half of the F1-cycle. Reset (not shown) is active-high for this device. Use the circuit elements on the next page to help you with the following hardware expansion. Do not add chips other than those given unless absolutely necessary. Add a single 16kx block of RAM starting at address $3000. Add an input port (-pins labeled InPort) and an output port ( pins labeled OutPort) both addressable by any address in the range $C000-$DFFF. Add two single bit input signals [labeled INTR1() and INTR2()] that will cause a single maskable interrupt when both of these signals are simultaneously true. This is the entire system. Do not use more address decoding than absolutely necessary i.e. use partial address decoding. This µ6c73 has on-board registers at 0-$1FF internal RAM from $00-$BFF internal EEPROM from $D00-$FFF and internal ROM from $E000- $FFFF. Do not overlap added memory and I/O with internal resources or other used address ranges. In addition to the chips/gates shown you may add SSI gates (AND NOR etc) if necessary but the best solutions (i.e. those that will earn you the most points) will use the fewest and simplest additional gates. F1 F2 R/~W A7-A0 / D7-D0 A15-A F1 F2 R/~W A7-A0 / D7-D0 A15-A A7-A0 6C73 Read Cycle A15-A D7-D0 6C73 Write Cycle A7-A0 A15-A Please USE ABES instead of wires! Please USE ABES instead of wires! i-z D7-D0 i-z RAM Addr Range: $3000 - $ = % - % InPort Addr Range: $C000 - $DFFF = % - % OutPort Addr Range: $C000 - $DFFF = % - % 6C73 pin used for INTR1 and INTR2:

Page 12/12 Exam 1 11. Please USE ABES instead of wires! Addr 7-0 / D 7-0 Addr 15- XIRQ IRQ R R/~W W 6C73 F1 F2 Reset 14 16k x bit RAM A 13 -A 0 D 7 -D 0 WE OE CS PAD 7 -PAD 0 PS 7 -PS 0 PT 7 -PT 0 PP 7 -PP 0 D 7-0 -bit Flip- Q 7-0 D 7-0 -bit Flip- Q 7-0 D 7-0 G -bit atch Q 7-0 D 7-0 G -bit atch Q 7-0 -bit Tri-State In 7- Out 7- OE D 7-0 G -bit atch Q 7-0 D 7-0 G -bit atch Q 7-0 -bit Tri-State In 7- Out 7-0 OE