|
|||||
for 6.111 Introduction to Digital Systems |
|||||
6.111 home → Labkit home → Test Programs → General I/O Ports Test I/O Test 2: General I/O Portsby Nathan IckesIntroductionThe
iotest program tests these ports as inputs and outputs, but requires the use of special loopback fixtures.
Test Setup
LEDs, Switches, and PushbuttonsThe eight user-controlled LEDs, nine pushbuttons, and eight slide-switches (all located near the lower edge of the board) should behave as follows.
The clock used to blink each LED when the corresponding pushbutton is pressed is derived from the labkit's built-in 27MHz oscillator (Y4). Alphanumeric DisplaysThe alphanumeric display is used to display status information from several of the system tests. When the FPGA is first configured, the display should show something like this: Alphanumeric display on startup If the display is blank, or shows mangled characters, something is wrong. OscillatorsThe labkit's built-in 27MHz oscillator is used by the alphanumeric display driver. If the display is functioning, it is safe to assume the built-in oscillator is functioning properly. The status of the clock signals from the two oscillator sockets in the upper-left corner of the PCB is indicated by the third item on the alphanumeric display ("C:??"). The first character after the colon indicates the state of the Clock 1 oscillator (Y2), and the next character indicates the status of the Clock 2 oscillator (Y3). An upwards pointing arrow indicates the respective clock signal is stuck high; a downwards pointing arrow indicates the respective clock signal is stuck low; and an arrow pointing both upwards and downwards indicates that the respective clock signal is properly toggling. Obviously, in order to test the oscillator sockets, it is necessary to install an actual oscillator in each socket. Any 3.3V oscillator, with a frequency between 1MHz and 10MHz can be used. PS/2 PortsTesting the PS/2 ports requires a PS/2 compatible keyboard. The keyboard should first be plugged into the keyboard port on the labkit (J9). Note that PS/2 is not designed to be a hot-pluggable interface. It's best to plug in the keyboard with the labkit powered off. The keyboard controlled may not reset properly if the keyboard is plugged in while the labkit is on. Typing any of the keys A through F should cause the first few characters of the alphanumeric display to read "K:X", where X is the character that was typed. The PS/2 test interface only recognizes the key codes A-F. All other key codes are translated as "?"--this includes repeat and release codes. The mouse port (J8) is tested using a keyboard, in the same manner as the keyboard port. The second field on the alphanumeric display ("M:X") indicates the last key code received over the mouse port. RS-232 PortA trivial loopback test is implemented, which includes flow control. Connect the labkit's RS-232 connector (J7) to a PC, using a null-modem cable. Then launch a terminal program (such as HyperTerm) on the PC. Any baud rate, parity, and stop bit settings can be used. Hardware flow control should be turned on, in order to test the labkit's CTS and RTS lines. Local echo should be turned off. Characters typed into the terminal on the PC should be echoed by the labkit. User I/O, Daughtercard, and Logic Analyzer ConnectorsSource Code |
|||||
MIT 6.111 Introduction to Digital Systems, Updated April 05, 2005 |