Clocks, Buttons, Switches, and Seven Segment Displays

The Cyclone II EP2C20F484C7 FPGA on the DE1 logic kit is connected to four seven segment displays, (Hex_0, Hex_1, Hex_2, and Hex_3), ten slide switches (Switch_0 through Switch_9), four push buttons (Key_0 through Key_3), ten red LEDs (Red_LED_0 through Red_LED_9), and eight green LEDs (Green_LED_0 through Green_LED_7).

The slide switches produce logic “1” when pushed away from the edge of the board, and the push buttons produce logic “0” when pressed. The segments of the seven segment displays light up when connected to logic “0,” and the LEDs light up when connected to logic “1”. The following table shows which FPGA pin numbers are connected to these devices.

The segments of a seven-segment display are normally named A–G, starting at the top, going clockwise, and ending with the center segment. The array names in the table refer to the segments using subscript values 0–6 in the same order.

To make the process of pin assignment easier, the following table is in alphabetical order, which should match the order of the pins listed by the Quartus Pin Assignment Editor, provided you name your pins and pin groups alphabetically: Clock…, Green…, Hex_0…, Hex_1…, Hex_2…, Hex_3…, Key…, Red…, and Switch… in that order.

ConnectionPin Location
Clocks
27 MHz Clock PIN_D12 and PIN_E12
50 MHz ClockPIN_L1
24 MHz ClockPIN_A12 and PIN_B12
Green LEDs
Green_LED_0PIN_U22
Green_LED_1PIN_U21
Green_LED_2PIN_V22
Green_LED_3PIN_V21
Green_LED_4PIN_W22
Green_LED_5PIN_W21
Green_LED_6PIN_Y22
Green_LED_7PIN_Y21
Seven-segment Displays
Hex_0[0]PIN_J2
Hex_0[1]PIN_J1
Hex_0[2]PIN_H2
Hex_0[3]PIN_H1
Hex_0[4]PIN_F2
Hex_0[5]PIN_F1
Hex_0[6]PIN_E2
Hex_0, Decimal PointNo Connection
Hex_1[0]PIN_E1
Hex_1[1]PIN_H6
Hex_1[2]PIN_H5
Hex_1[3]PIN_H4
Hex_1[4]PIN_G3
Hex_1[5]PIN_D2
Hex_1[6]PIN_D1
Hex_1, Decimal PointNo Connection
Hex_2[0]PIN_G5
Hex_2[1]PIN_G6
Hex_2[2]PIN_C2
Hex_2[3]PIN_C1
Hex_2[4]PIN_E3
Hex_2[5]PIN_E4
Hex_2[6]PIN_D3
Hex_2, Decimal PointNo Connection
Hex_3[0]PIN_F4
Hex_3[1]PIN_D5
Hex_3[2]PIN_D6
Hex_3[3]PIN_J4
Hex_3[4]PIN_L8
Hex_3[5]PIN_F3
Hex_3[6]PIN_D4
Hex_3, Decimal PointNo Connection
Push Buttons
Key_0PIN_R22
Key_1PIN_R21
Key_2PIN_T22
Key_3PIN_T21
Red LEDs
Red_LED_0PIN_R20
Red_LED_1PIN_R19
Red_LED_2PIN_U19
Red_LED_3PIN_Y19
Red_LED_4PIN_T18
Red_LED_5PIN_V19
Red_LED_6PIN_Y18
Red_LED_7PIN_U18
Red_LED_8PIN_R18
Red_LED_9PIN_R17
Slide Switches
Switch_0PIN_L22
Switch_1PIN_L21
Switch_2PIN_M22
Switch_3PIN_V12
Switch_4PIN_W12
Switch_5PIN_U12
Switch_6PIN_U11
Switch_7PIN_M2
Switch_8PIN_M1
Switch_9PIN_L2