Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

Altera DE2 Cyclone 2 Expansion Headers Configuration

Good afternoon everyone!

I have a question regarding the configuration of the DE2's expansion headers. I have already searched online for tutorials in configuring them but so far have had no luck. In short, I have an external module that I would like to use with the board, an accelrometer/temperature probe. For this case, is it just a matter of setting the appropriate pins on the expansion headers as inputs/ouputs, or am I overly simplifying things.

In an attempt to try and understand how to use the headers, I tried an experiment. Using VHDL I made a simple code which allows one of the switches (SW17) to turn on one of the onboard LEDs (LEDR17), which worked. However when I tried to reuse the code to trigger an LED that was on a breadboard using two of the pins of the expansion headers (one of the 36 programmable, the other the GND pin), the LED stayed on regardless of the switch position. As a matter of fact, all of the 36 programmable pins allowed the LED to stay on, regardless if they were pin-set or not. What am I doing wrong?

Any help or advice would be appreciated and feel free to yell at me :)

Thank You!

PS - This is not my first time using the board, however it is my first time trying to use the expansion headers.

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    is it just a matter of setting the appropriate pins on the expansion headers as inputs/ouputs, or am I overly simplifying things.

    --- Quote End ---

    That is pretty much all you have to do.

    Of course you do have to get the pin assignments right, and you do have to avoid violating the voltage specifications of the pins.

    There are several DE2 varieties. The DE2 has a Cyclone II device and a couple of 100-mil expansion headers. The DE2-70 Cyclone III also has these headers. The DE2-115 has a Cyclone IV, and it has one header and an HSMC connector.

    You need to look at the schematic for your board, and generate the pin assignments from that. Take care that the schematic is for the exact revision of hardware you have.

    Cheers,

    Dave
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    A basic point is unclear in your post: How did you connect the switches, are you actually changing the input level? The DE-2 on-board switches are double-throw switches, switching the inputs between GND and VCC33.

    You can also use single-throw switches connecting to GND, but then you need to enable weak pull-up resistors for the inputs or connect external pull-ups.