028- // contents of the master are loaded into the slave on the rising
029- // edge of the clock.
030- MASTER.CLK = !KB_CLK;
031- MASTER := [KB_DATA,SLAVE9..SLAVE1];
032- SLAVE.CLK = KB_CLK;
033- SLAVE := MASTER;
034-
035- // Show the bit string for the scan code. Ignore the upper two
036- // bits because these are the parity bit and the stop bit.
037- D_ = ![SLAVE7..SLAVE0];
038-
039- // If one of the '0'-'9' keys is pressed, display the digit on the
040- // right LED display of the XStend Board.
041- TRUTH_TABLE ([SLAVE7..SLAVE0]
-> [RS_6..RS_0])
042-
^H16
->
^B1101101;
043-
^H1E
->
^B0100010;
044-
^H26
->
^B0100100;
045-
^H25
->
^B1000101;
046-
^H2E
->
^B0010100;
047-
^H36
->
^B0010000;
048-
^H3D
->
^B0101101;
049-
^H3E
->
^B0000000;
050-
^H46
->
^B0000100;
051-
^H45
->
^B0001000;
052-
053- END EXP3
Listing 20:
UCF file for PS/2 XStend example with XS40.
001- # MICROCONTROLLER PINS
002- NET RST
LOC=P36; # ACTIVE-HIGH RESET
003- #
004- # XS40 BOARD RAM CONTROL PINS
005- NET OE_
LOC=P61; # ACTIVE-LOW OUTPUT ENABLE
006- #
007- #
008- # XSTEND BOARD CONNECTIONS
009- #
010- # PS/2 KEYBOARD CONNECTIONS
011- NET KB_DATA
LOC=P69;
012- NET KB_CLK
LOC=P68;
013- #
014- # RIGHT LED DIGIT SEGMENT CONNECTIONS (ACTIVE-LOW)
015- NET RS_0
LOC=P59;
016- NET RS_1
LOC=P57;
017- NET RS_2
LOC=P51;
018- NET RS_3
LOC=P56;
019- NET RS_4
LOC=P50;
020- NET RS_5
LOC=P58;
021- NET RS_6
LOC=P60;
022- #
023- # INDIVIDUAL LED CONNECTIONS (ACTIVE-LOW)
024- NET D_1
LOC=P41;
025- NET D_2
LOC=P40;
026- NET D_3
LOC=P39;
027- NET D_4
LOC=P38;
028- NET D_5
LOC=P35;
029- NET D_6
LOC=P81;
Содержание XStend
Страница 29: ...XStend Bus Connections...
Страница 30: ...XStend RAMs...
Страница 31: ...XStend Analog I O...
Страница 32: ...XStend Stereo Codec...
Страница 33: ...XStend Switches LEDs VGA Interface and PS 2 Interface...
Страница 34: ...XStend Board Layout...