DOC PREVIEW
NMT EE 308 - EE 308 – Homework 12

This preview shows page 1 out of 3 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 3 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

EE 308 Spring 2009EE 308 – Homework 12Due Apr. 20, 2009For all problems below assume your are using a MCS12DP256 chip with a 24 MHz bus clock anda 8 MHz oscillator clock.1. A new startup company designs a series of peripheral chips they call the Super TerrificUniversal Peripheral Interface Device (STUPID) chips. The figure below shows two STUPIDchips connected to an HC12. One is an input chip, the other is an output chip. (The74AHC374 is a D latch – it passes the inputs through to the outputs when ENA is high,and holds the outputs when ENA is low.) For the timing problems below, assume that thepropagation delay through each of the glue logic chips is 4 ns.EPORT APORT BLSTRBD7−0D7−0D7−0tDSWSTUPID OUTPUT BUS TIMINGSTUPID 1STUPID 2A13A12A11A15A14t =DSWt =DHW40 ns Min5 ns MinData Setup Time, WriteData Hold Time, Write74AHC373MC9S12A174AHC138A0A2CSCStDHWCSY0Y1Y2Y3Y4Y5Y6Y7R/WE1E2E3(a) What range of addresses will select STUPID 1 chip? Is it an input chip or an outputchip.1EE 308 Spring 2009(b) Should D7-0 of STUPID 1 be connected to Port A or Port B? Why?(c) What range of addresses will select STUPID 2 chip? Is it an input chip or an outputchip.(d) Should D7-0 of STUPID 2 be connected to Port A or Port B? Why?(e) Is tDSWfor the output chip compatible with the MC9S12 with a 24 MHz bus clock? Whyor why not? What is the corresponding time for an MC9S12 with a 24 MHz bus clock?(f) Is tDHWfor the output chip compatible with the 68HC12? Why or why not? What is thecorresponding time for an MC9S12 with a 24 MHz bus clock2?(g) Explain in words what tDSWmeans.(h) Write some C code to write an 0x55 to the output STUPID chip.2EE 308 Spring 20092. A MC9S12 is interfaced to a XYZ chip as shown below. Note that there are two differentchip selects on the XYZ chip.R/WY0Y1Y2Y3Y4Y5Y6Y7E2E0A1E1XYZCS_ACS_BA2A0MC9S12ENAEPORT_A74AHC37374HAC138D7−0PORT_BA15A13A14A12LSTRBA11(a) For what range of addresses will XYZ be selected?(b) What is the difference between CS A and C S B? I.e., when will CS A be selected, andwhen will CS B be selected?(c) Should the data lines of XYZ be connected to Port A or Port B on the MC9S12? Why?(d) Write a C-language define which will allow you to access XYZ.# define XYX(e) Write a line of C code which will write the number 0xaa to XYZ using your define fromPart d.3. Write some C code to convert the difference between two IC capture times into speed in RPM.Assume the timer prescaler is set as you had it in Lab 4, and that there are 15 pulses perrevolution. You can use floating point numbers to do the calculation. If the two IC valuesare the same, set the motor speed to zero (since the m otor has turned less than 1/15 of arevolution in the 8 ms).4. The Lecture Notes for April 15 gave some MATLAB code which simulated the closed-loopintegral control of a motor. The motor characteristics in the Notes were different than thoseof the motor you will use in the lab. Redo the simulation using characteristics which are closerto the motor you will use. Use the results from Part 1 of Lab 4 for the slope and y-interceptof the motor for final speed vs. duty cycle. Assume the time constant of the motor is about100 ms. Use the MATLAB simulation to find a value for k which gives a “good” response —i.e., a response where the motor gets to the final speed fairly quickly, but without more thanabout 10%


View Full Document

NMT EE 308 - EE 308 – Homework 12

Documents in this Course
Load more
Download EE 308 – Homework 12
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view EE 308 – Homework 12 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view EE 308 – Homework 12 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?