Q1  /10 Q2  /10 Q3  /10 Q4  /10 Q5  /10

(All five questions weighted equally.)

University of Toronto Faculty of Applied Science and Engineering Department of Electrical and Computer Engineering Faculty of Arts and Science ECE385F - Microprocessor Systems Final Exam OPEN BOOK EXAM TYPE X (SELF-CONTAINTED COMPUTATIOAN AIDS PERMITTED)

Family Name: First Name: Student Number: Signature: Duration: 2 Hours Answer all questions on this test paper.

Q1: Design a shaft rotational encoding wheel comprising means for producing real and imaginary signals. Label these “Re”, “Im”, in a clearly drawn diagram. Make your design such that the speed and direction of rotation of the shaft can be determined from an analysis of the signals. Explain your analysis of the signals, how you would build a signal analyzer, etc., with clearly drawn diagrams, text, or equations, as appropriate.

Q1c: Suppose we come across a dumpster full of hundreds of small fragments of magnetic material that can each be used as a magnet, as well as hundreds of magnetic sensors (surplus magnetic recording and playback tape heads like the ones you used in the card readers), as well as hundreds of logic circuits, that can each convert the output of one of the magnetic sensors into a short pulse, i.e. a “blip” as shown in the diagram below (or next page):

Here we have stuck two magnets to a shaft encoder as shown in the diagram, and then used two of the magnetic sensors, as shown, each connected to a logic circuit (denoted SIG. PROC.).

Explain the circumstances under which this configuration can be used to determine the direction of rotation of the shaft.

Suggest an alternative arrangement that can do so, more reliably, and write a device driver for this alternative arrangement. State any assumptions you might make.

Q1d: Assume you come across another dumpster that has a wide assortment of 7400 series logic gates, i.e. anything with part number 74*. Design a circuit that enables the system of Q1c to plug into the ISA slot of a personal computer. Explain the merits of using only one interrupt (IRQ), and design a system that uses just one interrupt for this purpose. Write a device driver for this device.

.

.

.

. . . . . .

Q2: An anthrax spill has caused 100 people to be exposed to an unknown substance. To minimize risk, they must all have the substance washed off quickly. They form four lines, in front of four shower nozzles, as shown below:

with 25 people in each of LINE 1, LINE 2, LINE 3, and LINE 4. Each person requires a 30 second soaking, a 30 second soaping, and then a 60 second rinse. There are four shower nozzles, and each can be programmed by way of the ISA port. Water input is denoted “W”. Soap input is denoted “S”. Initially all eight inputs (four “W” and four “S”) are zero. Four people move forward, for a 30 second soaking, while the number 0x55 is written out to the port. Then the number 0xAA is sent out the port to change the controllers to “Soap”. It takes 15 seconds to change from Water to Soap. The four people are then soaped for 30 seconds. Then the number 0x55 is written out to the parallel port, whereupon it takes 60 seconds for the system to change from Soap to Water. After the changeover, a one minute rinse is performed. After this, the next four people move forward, and the process repeats. (Assume that the next four people can move forward without any delay.) Calculate the total length of time it takes for each of the four people, and thus, calculate the total, time taken to decontaminate the 100 people.

Can the system be improved without adding any new equipment?

If so, how? Explain in detail, using diagrams, equations, text, or whatever other means you can devise. (Ignore gender separation issues, i.e. for simplicity, you may assume that the threat of the exposure outweighs any privacy concerns that might otherwise arise.) Suggest at least two other re-arrangements of the same apparatus, and explain, in detail, the time savings attained.

.

Q3: Q3a: Explain how a DRAM system works. Explain why DRAM tends to be made in arrays that are square are close to square. Explain how an individual DRAM cell works. Explain this in detail, with diagrams, text, etc., as appropriate.

Q3b: Explain the different kinds of cache eviction strategies, and outline the merits and disadvantages of each, with clear indication of implementation issues.

.

Q4: You are to make a prototype pentambic keyer that plugs into a parallel port. The keyer must use interrupts for each keypress and key release. Design a circuit for the keyer, and a device driver, so that each time any key is either pressed or released, an interrupt is generated, and a keypress is decoded and read.

. .

ECE385F Final Exam  11  /15

Q5: You are to design a hot water heater system, to be interfaced to a microprocessor, and to program the system. Assume that you have a hot water heater, as follows,

where a temperature sensor (denoted TEMP. SENS.) is connected to an 8 bit analog to digital converter (denoted AtoD). Assume the temperature is returned as a number, from 0 to 255, in units of degrees Fahrenheit It is desired to regulate the hot water at a chosen temperature, which the user can set by pressing a button down, and holding the button. Design the system so that the button be pressed once to go up, and twice to go back down, and to cruise or down slowly up as the button is held, after being either pressed just once, or pressed twice.

Devise a control circuit, interface, etc., to connect this hot water heater to the parallel port of a computer that runs GNU Linux, and show the steps you would take to extend the operating system, and other actions necessary to facilitate the control of the temperature, as well as ignition signal for the igniter (denoted IGNITER), and valve to turn on the gas, denoted GAS VALVE. When temperature falls more than Δt degrees below set point, You are required to sequence operations as follows:

• turn on gas;

• wait 500 milliseconds (justify your choice of timing method);

• ignite gas (this requires a TTL voltage level pulse of duration 20 milliseconds);

• wait 500 milliseconds;

• check for presence of flame. To do this, you may use the Rectifire (TM) flame sensor, denoted on the drawing as RECTIFIRE (TM). The Rectifire (TM) uses the property of rectification of the flame, namely that electric current travels more easily in one direction than in another. The Rectifire (TM) works in much the same way as a vacuum tube rectifier, except that there is no filament: the flame takes on the role of filament or heater. Thus you are provided with an input and an output, and you must test to see if rectification is taking place, in which case you know that there is a flame present.

• if a flame is not present, turn off the gas and sound an alarm. Assume you have an alarm input that accepts a TTL voltage level signal that sounds the alarm when it goes high or when it goes low. Choose active high or low and explain the reason for your choice;

• if a flame is present, keep it burning until the water temperature goes one degree above the set point.

Devise a way to set the Δt also by only pressing just the one button, in some way.

.

.