Difference between revisions of "CSC270 Final Exam 2011"

From dftwiki3
Jump to: navigation, search
Line 38: Line 38:
 
==Problem #1: No 7442 chips (0.7 points)==
 
==Problem #1: No 7442 chips (0.7 points)==
  
This problem does not need wiring.  Only a paper answer is required.
+
This problem does not need wiring.  Only a written answer is required.
  
Fictitious 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, as demonstrating the operation of your 3-bit output port is a required part of the assignment.  Explain your solution to circumvent this unfortunate turn of events.  Use logic diagrams in your explanations.   
+
''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 (0.7 points)==
 
==Problem #2: 1/2 second delay (0.7 points)==
  
This problem does not need wiring.  Only a paper answer is required.
+
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.
 
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 modify 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.
+
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 (0.7 points)==
  
==Problem #3: Input AND Output port (0.7 points)==
+
This problem does not need wiring. Only a written answer is required.
 +
<br />
  
 
<center>[[Image:BidirectionalPort.png|400px]]</center>
 
<center>[[Image:BidirectionalPort.png|400px]]</center>
  
 
<br />
 
<br />
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 an input or an output.  The same wire going into the connector can be used as an output wire or an input wire.
+
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 part is to figure out what hides under the big question mark in the diagram above.
+
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 software to make this bi-directional port works.
+
Below is an explanation of how the software interacts with the hardware to make this bi-directional port works.
  
 
===An output port===
 
===An output port===
Line 70: Line 77:
 
* 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:
 
* 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 output port in output mode
+
  LDAA #01 ; set D0 of Acca to 1
 
  STAA 8000 ; set port as an output port
 
  STAA 8000 ; set port as an output port
  
* Then, we we want to the output signal high, we execute this code:
+
* Then, if we want to output a high signal, we execute this code:
  
  LDAA #01 ; set the output signal high
+
  LDAA #01 ; set D0 of Acca to 1
  STAA 9000
+
  STAA 9000 ; send Acca to output port
  
 
* When we want to set the output signal low, we execute this code:
 
* When we want to set the output signal low, we execute this code:
  
  LDAA #00 ; set the output signal low
+
  LDAA #00 ; set D0 of Acca to 0
  STAA 9000
+
  STAA 9000 ; send Acca to output port
  
 
===An input port===
 
===An input port===
Line 89: Line 96:
 
* Our program would need to initialize the port as an input port first:
 
* Our program would need to initialize the port as an input port first:
  
  LDAA #00 ; set output port in input mode
+
  LDAA #00 ; set D0 of Acca to 0
 
  STAA 8000 ; set port as an input port
 
  STAA 8000 ; set port as an input port
  
Line 95: Line 102:
  
 
  LDAA 9000 ; get data from port
 
  LDAA 9000 ; get data from port
  ANDA #01 ; clear all bits except LSB
+
  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.
+
:Now the bit that is coming from the peripheral is in the Least-Significant Bit of Acca.
  
 
===Your assignment===
 
===Your assignment===
Line 107: Line 114:
 
==Problem #4: Analysis, Design, Wiring, Testing, Operation (2.5 points)==
 
==Problem #4: Analysis, Design, Wiring, Testing, Operation (2.5 points)==
  
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).
+
This problem requires wiring and demonstration of correct operation.
  
When you circuit is wired up and working, you will demonstrate it to your instructor who will ask you 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 should see that 41 was sent through.   You are free to decide how to demonstrate this.
+
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===
 
===Assistance===
  
You cannot ask anybody to help you debug the wiring.  No debugging help from the instructor either.  The goal of this exam is for you to show that you can go from the formulation of a problem to a working hardware solution '''on your own'''.
+
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===
 
===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 sufficient.
+
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.5 points for demonstrating the error-free exchange of a nybble.
 +
* 1 point for demonstrating the error-free exchange of a bit.
  
 
<!-- ========================================================== -->
 
<!-- ========================================================== -->
 
==Recommendations==
 
==Recommendations==
  
* Avoid approximate answers.  Quantify if you can.  Do not "guestimate" but instead explain that you are taking a sample, of a given size, and based on that size, you observe X and infer Y, or that you are identifying specific cases, which are ''C1'', ''C2'', ...''Cn'', and that based on these cases you can infer Z.  You get the point.
+
<!--* Avoid approximate answers.  Quantify if you can.  Do not "guestimate" but instead explain that you are taking a sample, of a given size, and based on that size, you observe X and infer Y, or that you are identifying specific cases, which are ''C1'', ''C2'', ...''Cn'', and that based on these cases you can infer Z.  You get the point. -->
 +
 
 
* 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.
 
* 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.
  
Line 130: Line 143:
 
==Submission==
 
==Submission==
  
Please submit a pdf with all your answers and email it to thiebaut@cs.smith.edu before the deadline.  In case the Smith server is down, email it to your instructor's gmail address.
+
Please submit a '''pdf''' with all your answers and email it to thiebaut@cs.smith.edu before the deadline.  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. 
  
 
</onlydft>
 
</onlydft>

Revision as of 11:32, 26 April 2011

--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.



...