CSC270 Final Exam 2011

From dftwiki3
Revision as of 08:39, 28 April 2011 by Thiebaut (talk | contribs)
Jump to: navigation, search

--D. Thiebaut 10:24, 13 April 2011 (EDT)


This final exam is take-home. It is open-books, open-notes, and open-Web. It is due a week after it is made available, at 4:00 p.m. on Wed. May 4, 2011.

You cannot discuss the details of this exam with anyone except your instructor. No question will be answered in person after 2:30 a.m. on 4/29/11. Instead, if you have questions regarding the exam, you are to send them via email to thiebaut@cs.smith.edu, and the question and its answer will be broadcast back to the hole class via email.

The exam is given under the rules of the Smith College Honor Code.

Make sure you reference all work/resources you use to answer the questions below.





You will have to reserve a kit for one 4-hour time-period at a time. There is a shared Google-Doc sign-up sheet made available for this purpose: http://tinyurl.com/3jvy6qk

You cannot sign up for more than one session at a time. In other words, sign up for one session. If at the end of this session you need another session, then, and only then, do you sign up for the second session.


Finally, you will need to make an appointment with your instructor to demonstrate how your circuit works.


There are 4 problems, worth a maximum of 4 points total. 4/4 is A. However, the sum of all the points for all 4 problems is 5 points. Figure out how to best take advantage of this! Note that 5/4 is still A.


Problem #1: No 7442 chips (1 point)

This problem does not need wiring. Only a written answer is required.

Situation: You come to the lab ready to wire up your solution to a problem requiring you to implement a 3-bit output port for the 6811 and you discover that all the 7442 circuits have been taken away. You only have a limited time, and you cannot order or buy new ones. Your only solution is to use whatever is in the lab (FH143) to make your port work. Explain your solution to circumvent this unfortunate turn of events.

A logic diagram showing your solution is all that is needed to answer this question. If you cannot come up with a satisfactory solution, explain what you think could be a solution.


Problem #2: 1/2 second delay (1 point)

This problem does not need wiring. Only a written answer is required.

In a recent lab you had to design an output port and activate two LEDs in such a way that the LEDs would change state every second.

Explain how you would design a similar solution, but with a delay of 0.5 seconds. You can edit the software or modify the hardware, or both. If you want to modify the hardware, you can only use whatever can be found in FH143.

A program and/or a logic diagram showing your solution are all that is needed to answer this question. If you cannot come up with a satisfactory solution, explain what you think could be a solution.


Problem #3: Bidirectional Input AND Output port (1 point)

This problem does not need wiring. Only a written answer is required.

BidirectionalPort.png


You may have noticed that the Arduino has a very nice way to deal with digital inputs and outputs. A pin on one of the connectors can be used for input or for output. The same wire going into the connector can be used as an output wire or an input wire.

You have to figure out how to create the same kind of flexibility for the 6811 system. Your assignment is to figure out what hides under the big question mark in the diagram above.

Below is an explanation of how the software interacts with the hardware to make this bi-directional port works.

An output port

Assume we want to use the wire linking the box with the question mark and the peripheral as an output signal.

In other word we want to send a bit from the computer to the peripheral through our port.

  • The first thing that needs to be done is for the program controlling the data exchange to make our port an output port. This is done by writing a 1 at Address 8000:
	LDAA	#01	; set D0 of Acca to 1
	STAA	8000	; set port as an output port
  • Then, if we want to output a high signal, we execute this code:
	LDAA	#01	; set  D0 of Acca to 1
	STAA	9000	; send Acca to output port
  • When we want to set the output signal low, we execute this code:
	LDAA	#00	; set D0 of Acca to 0
	STAA	9000  ; send Acca to output port

An input port

Assume that we now want the signal connecting the peripheral to the question-mark box to be an input signal for the 6811.

  • Our program would need to initialize the port as an input port first:
	LDAA	#00	; set D0 of Acca to 0
	STAA	8000	; set port as an input port
  • When we want to read the value of the data bit sent by the peripheral, we can execute this:
	LDAA	9000	; get data from	port
	ANDA	#01	; clear all the bits except for the LSB
Now the bit that is coming from the peripheral is in the Least-Significant Bit of Acca.

Your assignment

Draw the schematics of the circuit in the box with a question mark. No explanations required, unless you feel you need to explain how your circuit works.


Problem #4: Analysis, Design, Wiring, Testing, Operation (2 points)

This problem requires wiring and demonstration of correct operation.

Create a digital electronic circuit that will allow the Heathkit to exchange one byte with the Arduino. You are free to pick the direction of the transfer. You are free to decide how to send the byte (serially or in parallel). You are free to create your own protocol.

When your circuit is wired up and working, you need to demonstrate its correct operation to your instructor. You will be asked to demonstrate the transfer of a particular byte. For example you may be asked "Show that 41 hex can be sent from one system to the other." You will then have to reprogram the sending system with 41, and restart it. Then, without changing anything in the receiving system, we will demonstrate that 41 has been correctly received. You are free to decide how to demonstrate this.

Assistance

You cannot ask anybody to help you debug the wiring. No debugging help from the instructor. The goal of this problem is for you to show that you can go from the formulation of a problem to a working hardware solution on your own.


Requirements

You do not need to write a report. The schematics of your circuit, nicely labeled (hand-drawings are fine), and the listing of the programs, well formatted, are necessary and sufficient.

Reduced-Point options

  • 1 point for demonstrating the error-free exchange of a nybble.
  • 0.5 points for demonstrating the error-free exchange of a bit.

Recommendations

  • State your assumptions. If you find yourself missing information and need specific conditions, then set them up for yourself. State what conditions under which you are answering the question.


Submission

Please submit a pdf with all your answers and email it to thiebaut@cs.smith.edu before the deadline. Write Final Exam in the subject line of the message. In case the Smith server is down, email it to your instructor's gmail address.

Note that the printer in the administrative offices on the 2nd floor of FH can scan a page and email it to you. Feel free to use this feature if you have hand-drawn drawings.