•
Download the EXP3.BIT file into the XS40/XStend combination with the command:
XSLOAD EXP3.BIT
.
•
Press keys on the keyboard and observe the results on the LED displays.
The steps for compiling and testing the design using an XS95 combined with an XStend Board
are as follows:
•
Synthesize the ABEL code in the EXP3.ABL for an XC95108 CPLD.
•
Compile the synthesized netlist using the EXP3_95.UCF constraint file.
•
Generate an SVF file for the design.
•
Mount an XS95 Board in the XStend Board and attach the downloading cable from the
XS95 to the PC parallel port. Apply 9VDC though jack J9 of the XS95. Place shunts on
jumpers J4, J7, and J8 to enable the LEDs. Place a shunt on jumper J11 to keep the XStend
codec disabled. Attach a keyboard to the PS/2 connector of the XStend Board.
•
Download the EXP3.SVF file into the XS95/XStend combination with the command:
XSLOAD EXP3.SVF
.
•
Press keys on the keyboard and observe the results on the LED displays.
Listing 19:
ABEL code for testing the XStend PS/2 example.
001- MODULE EXP3
002- TITLE 'EXP3'
003-
004- DECLARATIONS
005-
006- RST PIN;
// uC reset control
007- OE_ PIN;
// RAM output enable
008- KB_DATA PIN;
// serial data from PS/2 keyboard
009- KB_CLK PIN;
// clock from PS/2 keyboard
010- D_8..D_1 PIN;
// LED string on XStend Board
011- D_ = [D_8..D_1];
012- RS_6..RS_0 PIN ISTYPE 'COM';
// right LED display on XStend Board
013- RS_ = [RS_6..RS_0];
014- [MASTER9..MASTER0] NODE ISTYPE 'REG';
// master register for
015- MASTER = [MASTER9..MASTER0];
// storing keyboard data
016- [SLAVE9..SLAVE0] NODE ISTYPE 'REG';
// slave register for
017- SLAVE = [SLAVE9..SLAVE0];
// storing keyboard data
018-
019- EQUATIONS
020-
021- RST = 1;
// disable uC
022- OE_ = 1;
// disable RAM outputs
023-
024- // Scan codes from the keyboard arrive LSB-first on the falling
025- // edge of the clock. Each bit is shifted into the MSB of the
026- // master register. The lower bits of the master are filled with
027- // slave contents shifted right by one bit. Then the updated
Содержание 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...