21
Remove the shunt on jumper J17 to keep the XStend codec serial output from
interfering with the DIP switch logic levels.
n
Download the SWTCH95.SVF file into the XS95/XStend combination with the
command:
XSLOAD SWTCH95.SVF
.
n
Set the DIP switches and press the SPARE and RESET pushbuttons. Observe the
results on the LEDs.
•
Listing 13:
VHDL code for using the XStend LEDs and switches.
001- LIBRARY IEEE;
002- USE IEEE.STD_LOGIC_1164.ALL;
003-
004- ENTITY switches IS
005- PORT
006- (
007- dipsw: IN STD_LOGIC_VECTOR(8 DOWNTO 1); -- DIP switches
008- spareb: IN STD_LOGIC; -- SPARE pushbutton
009- resetb: IN STD_LOGIC; -- RESET pushbutton
010-
011- s: OUT STD_LOGIC_VECTOR(6 DOWNTO 0);
-- XS Board LED digit
012- lsb: OUT STD_LOGIC_VECTOR(7 DOWNTO 0
);
-- XStend left LED digit
013- rsb: OUT STD_LOGIC_VECTOR(7 DOWNTO 0);
-- XStend right LED digit
014- db: OUT STD_LOGIC_VECTOR(8 DOWNTO 1);
-- XStend bargraph LED
015-
016- oeb: OUT STD_LOGIC;
-- output enable for all RAMs
017- rst: OUT STD_LOGIC
-- microcontroller reset
018- );
019- END switches;
020-
021- ARCHITECTURE switches_arch OF switches IS
022- BEGIN
023- -- this prevents accidental activation of the RAMs or uC
024- oeb <= '1'; -- disable all the RAM output drivers
025- rst <= '1'; -- disable the microcontroller
026-
027- -- light the XS Board LED digit with the pattern from the
028- -- DIP switches if both pushbuttons are pressed.
029- -- these LED segments are active-high.
030- s <= dipsw(7 DOWNTO 1) WHEN (spareb='0' AND resetb='0') ELSE
031-
"0000000";
-- otherwise keep LED digit dark
032-
033- -- light the XStend left LED digit with the pattern from the
034- -- DIP switches if the RESET pushbutton is pressed.
035- -- these LED segments are active low.
036- lsb <= NOT(dipsw) WHEN (spareb='1' AND resetb='0') ELSE
037-
"11111111"; -- otherwise keep the LED digit dark
038-
039- -- light the XStend right LED digit with the pattern from the
040- -- DIP switches if the SPARE pushbutton is pressed.
041- -- these LED segments are active low.
042- rsb <= NOT(dipsw) WHEN (spareb='0' AND resetb='1') ELSE
043-
"11111111"; -- otherwise keep the LED digit dark
044-
045- -- light the XStend bargraph LED with the pattern from the
Summary of Contents for XStend XS40
Page 17: ...16 Figure 5 Programmer s model of the XS40 XStend Board combination...
Page 18: ...17...
Page 20: ......
Page 31: ......
Page 33: ......
Page 41: ......
Page 58: ...Appendix A XStend Schematics...
Page 59: ...XStend V1 3 XS Board Connectors...
Page 60: ...XStend V1 3 RAM...
Page 61: ......
Page 62: ...XStend V1 3 Stereo Codec...
Page 63: ......