Assignment 11, due Nov 14
Part of
the homework for 22C:60, Fall 2008
|
Remember to write your name on what you turn in! Homework must be turned in on paper and in class!
To send data to the parallel port, the program should wait for the printer to be not busy (an input, pin 11 equal to zero) and then send out the 8 data bits (outputs, pins 2 to 9). Then, the program should send out a strobe pulse (output, pin 1, normally one, set to zero for the duration of the pulse). The strobe pulse should end when the device indicates that it is busy (pin 11 equal to one), acknowledging that it is starting to read the data, and the device will remain busy until it is ready to process another character.
a) Write a Hawk subroutine PPINIT to set up the parallel port in an appropriate idle state with the pins configured appropriately for use of the above communications protocol. (0.6 points)
b) Give a timing diagram for the relationship between the busy, strobe and data pins as two consecutive bytes are output. You need only show one data pin, where that pin is zero in the first output byte and one in the second. (0.6 points)
c) Write a Hawk subroutine PPPUT to send one byte (the low 8 bits) from R3 to the parallel port. (0.6 points)
Problem: Construct a type-D positive edged triggered flipflop from two of these circuits. For maximum credit, your solution must eliminate one of the two inverters in this circuit. (0.6 points)