Limited wires. We have only one data line. Use for for bi-directional communication. Need to send: requests for data rumble pack on/off Need to receive controller status Some slides from Aaron Ridenour, Ryan Wooster and Alex Jaeckel. http://www.eecs.umich.edu/courses/eecs373/Lec/F13Student/N64.pptx See http://www.eecs.umich.edu/courses/eecs373/Lec/StudentW14/N64%20Controller.pdf for other details.
Bi-directional Open Collector Pull-up resistor keeps the line high while idle. To send 0, the output line is pulled low and connected to ground. To send 1, nothing should be sent. Never drive the line high. Both sides do this, so bidirectional. If no data to send, wire stays (floats) high.
Controller Encoding Each bit is sent in ~4 𝜇𝑠 Logical 0: Low for 3 𝜇𝑠, followed by high for 1 𝜇𝑠 Logical 1: Low for 1 𝜇𝑠, followed by high for 3 𝜇𝑠
Controller Encoding http://inst.eecs.berkeley.edu/~cs150/sp01/Labs/lablecckpt1.ppt
Joystick x-coordinate Joystick y-coordinate start bit A B Z St reset L R |----Command (console) 0x01-----| |----Data1 (controller) 0x00------| |-------Data2 (controller) 0x00----| stop bit Joystick x-coordinate Joystick y-coordinate |--------Data3 (controller) 0x00----------| |---------Data4 (controller) 0x01-----------| Images taken from: http://afermiano.com/index.php/n64-controller-protocol
Clock Synchronization Once a FF goes metastable (due to a setup time violation, say) we can’t say when it will assume a valid logic level or what level it might eventually assume. The only thing we know is that the probability of a FF coming out of a metastable state increases exponentially with time. This and next slide from http://web.stanford.edu/class/ee183/handouts/synchronization_pres.pdf. If you have an interest in this topic, that’s a nice slide set. https://web.archive.org/web/20070203054100/http://www.caip.rutgers.edu/~bushnell/dsdwebsite/dsdlecture18.ppt has yet more details.
Traditional synchronizer SIG is asynchronous, and META might go metastable from time to time However, as long as META resolves before the next clock period SIG1 should have valid logic levels Place FFs close together to allow maximum time for META to resolve. Under reasonable assumptions, MTBF=9x1010 years. More than the age of the Earth. Could add a third.