XESS XStend Manual page 14

Board
Table of Contents

Advertisement

029- OE_ = 1;
030-
031- // the state of the pushbuttons will select which LED display will
032- // show the settings of the DIP switches.
033- // to a DIP switch which is set to '1'.
034-
035- // When both pushbuttons are pressed, the DIP switch settings are
036- // shown on the LED display of the XS Board.
037- WHEN ((PUSH_SPARE_==0) & (PUSH_RESET_==0)) THEN {
038-
S = [DIPSW7..DIPSW1];
039-
[LDP_,RS_6..RS_0] = ^B11111111;
040-
[RDP_,LS_6..LS_0] = ^B11111111;
041-
D_ = ^B11111111;
042-
}
043- // When only the RESET pushbutton is pressed, the DIP switch settings
044- // are shown on the left LED display on the XStend Board.
045- ELSE WHEN ((PUSH_SPARE_==1) & (PUSH_RESET_==0)) THEN {
046-
S = ^B0000000;
047-
[LDP_,LS_6..LS_0] = !(DIPSW);
048-
[RDP_,RS_6..RS_0] = ^B11111111;
049-
D_ = ^B11111111;
050-
}
051- // When only the SPARE pushbutton is pressed, the DIP switch settings
052- // are shown on the right LED display on the XStend Board.
053- ELSE WHEN ((PUSH_SPARE_==0) & (PUSH_RESET_==1)) THEN {
054-
S = ^B0000000;
055-
[LDP_,LS_6..LS_0] = ^B11111111;
056-
[RDP_,RS_6..RS_0] = !(DIPSW);
057-
D_ = ^B11111111;
058-
}
059- // When neither pushbuttons is pressed, the DIP switch settings are
060- // shown on the string of LEDs of the XStend Board.
061- ELSE WHEN ((PUSH_SPARE_==1) & (PUSH_RESET_==1)) THEN {
062-
S = ^B0000000;
063-
[LDP_,LS_6..LS_0] = ^B11111111;
064-
[RDP_,RS_6..RS_0] = ^B11111111;
065-
D_ = !(DIPSW);
066-
}
067-
068- END EXP1
Listing 14: UCF file for LED/switch XStend example with XS40.
001- # XS40 BOARD LED CONNECTIONS (ACTIVE_HIGH)
002- NET S0
003- NET S1
004- NET S2
005- NET S3
006- NET S4
007- NET S5
008- NET S6
009- #
010- # MICROCONTROLLER PINS
011- NET RST
012- #
013- # XS40 BOARD RAM CONTROL PINS
014- NET OE_
015- #
016- #
// disable the outputs from all the RAMs
LOC=P25;
LOC=P26;
LOC=P24;
LOC=P20;
LOC=P23;
LOC=P18;
LOC=P19;
LOC=P36; # ACTIVE-HIGH RESET
LOC=P61; # ACTIVE-LOW OUTPUT ENABLE
A bright LED corresponds

Advertisement

Table of Contents
loading

Related Products for XESS XStend

Table of Contents