# How to light up LEDs 4-7 on a Nexys2 board

I can program LEDs 0 to 3 to light up, but I get an error when I try to assign LEDs 4 to 7. Why is that?

• What is a Nexsys2 board? – Leon Heller Mar 10 '11 at 23:04
• Betting it should have been Nexys2? – Kellenjb Mar 10 '11 at 23:08
• digilentinc.com/Products/Detail.cfm?Prod=NEXYS2 – Leon Heller Mar 10 '11 at 23:15
• What error do you get? – Nick T Mar 10 '11 at 23:26
• Load the self test program, it lets you switch all LEDs on and off via the corresponding slide switches. If you can switch on the LEDs that way, then nothing is wrong with your board. – freespace Mar 11 '11 at 11:59

LD4 is connected to both E16 and E17 and LD5 is connected to both P15 and P16, which is rather strange. There is a similar problem with LD6 and LD7. Perhaps you have to enable both outputs in each case. It might be best to contact Digilent support about the anomaly.

• This isn't true. The UCF at first glance appears to say this, but it doesn't: for s3e500 led4 is connected to E17, otherwise E16. This is true for led4-led7. You need to comment out definition line that doesn't match the chip you have on the board. – freespace Mar 11 '11 at 12:05
• I was going off the schematic, it should have a note against those connections about the PCB being suitable for two versions of the FPGA. – Leon Heller Mar 11 '11 at 15:09

The addresses for the LEDs are like this:

P4,E4,P16,E16,K14,K15,J15,J14

Apparently the following code can be used to test them:

(* LOC="P4,E4,P16,E16,K14,K15,J15,J14" *) output reg [7:0] LEDs=0;