SoCKit User Manual
77
www.terasic.com
December 1, 2015
LED Control
Figure 6-4
shows the HPS users LED pin assignment for the SoCKit board. The LED0, LED1,
LED2, and LED3 are connected to HPS_GPIO53, HPS_GPIO54, HPS_GPIO55, and HPS_GPIO56,
which are controlled by the GPIO1 controller, which also controls HPS_GPIO29 ~ HPS_GPIO57.
Figure 6-4 LED Pin Assignment
Figure 6-5
shows the
gpio_swporta_ddr
register of the GPIO1 controller. The bit-0 controls the
pin direction of HPS_GPIO29. The bit-24 controls the pin direction of HPS_GPIO53, which
connects to the HPS_LED0, the bits-25 controls the pin direction of HPS_GPIO54 which connects
to the HPS_LED1, and so on. In summary, the pin direction of HPS_LED0, HPS_LED1,
HPS_LED2, and HPS_LED3 are controlled by the bit-24, bit-25, bit-26, and bit-27 in the
gpio_swporta_ddr
register of the GPIO1 controller, respectively. Similarly, the output status of
HPS_LED0, HPS_LED1, HPS_LED2, and HPS_LED3 are controlled by the bit-24, bit-25, bit-26,
and bit-27 in the
gpio_swporta_dr
register of the GPIO1 controller, respectively.
Figure 6-5 gpio_swpport_ddr Register in the GPIO1