Jump to content
  • 0

PmodSWT connection to Spartan 3e


James6

Question

I am totally new to the Pmods so please bear with me.  I have a Spartan 3e-1600 development board and I wrote a very simple Half Adder program.  I used the slide switches on the board as inputs and the board's LEDs as outputs.  Everything worked fine.  I changed the User Constraint File to have the input go to the J2 Expansion connector and plugged in a PmodSWT but it doesn't read my inputs now.  I have included the Verilog file and the User Constraints file.  What am I missing?

Half_Adder.v

Half_Adder_Constraints.ucf

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

Hi @james,

Here is the resource page for the Spartan 3E-1600. Looking on page 165 of the users guide here.  It shows the constrains for J2 that are independent of the fx2 connector to be as follows:

# ==== 6-pin header J2 ==== #

These are independent of the FX2 connector

#NET "J2<0> " LOC = "P12" | IOSTANDARD = LVTTL | SLEW = SLOW | DRIVE = 6 ;

#NET "J2<1>" LOC = "N12" | IOSTANDARD = LVTTL | SLEW = SLOW | DRIVE = 6 ;

#NET "J2<2>" LOC = "V6" | IOSTANDARD = LVTTL | SLEW = SLOW | DRIVE = 6 ;

#NET "J2<3>" LOC = "V5" | IOSTANDARD = LVTTL | SLEW = SLOW | DRIVE = 6 ;

I would try these constraints as well.

cheers,

 

Jon

Link to comment
Share on other sites

@James6,

Why not plug this into one of the PMod ports on the board?  The PModSWT requires VCC and GND inputs, as shown by the schematic, so it doesn't make sense to have the I/O wires connected without power.  Check out the PModSWT schematic.  There you'll see that all the switch does is to connect the corresponding PMod output pin to either the power or the ground wire depending on how your throw the switch.

Dan

Link to comment
Share on other sites

Thank you for the quick reply Dan. I plugged the PmodSWT into the J2 expansion port which is what I think you are referring to as "one of the Pmod ports". I then tried J1 but neither one worked. I hope those are the ports you are referring to. 

I did look at the schematic and understand t g e need for both Vcc and Gnd but I just don't see where in the Spartan 3e I route that to port J1 or J2. I have the jumper for the expansion port set for 3.3 volts. 

Thank you again for your help.

James

Link to comment
Share on other sites

@James6,

The PMod standard includes pins for power and ground.  You shouldn't need to "route" them, but should only need to plug in the device.  You can also use a volt-meter to make certain that the power and ground pins are connected to your J1 or J2 expansion ports.  If you don't have power and ground there, then ... that would be an indication of the board actually being broken and you might wish to visually look for other problems as well.

A real easy test, after the volt-meter test, is to use your logic .bit file to wire the pins from the switches straight to the LED controls, one per switch.  While your code should be simple enough, this test is *just* a touch simpler.  You should then be able to turn on four LED's based upon the switch positions. 

Dan

P.S.  Can I point you to two fun beginner projects?  blinky and Knight Rider!

Link to comment
Share on other sites

Thank you to both Dan and jpeyron.  I was using a shared connection with the Hirose FX2 connector.  Once I used the J2 connection that was independent from the FX2 connection, everything worked as it should.  Great people in a great forum.  Thanks for taking the time to help a newbie.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...