XK-1A Development Board Tutorial
int m a i n () {
led <: 0 b 0 0 0 1 ;
w h i l e (1)
;
r e t u r n 0;
}
Copy and paste the code into your project, and then choose
File
·
Save
() to save
your changes to file.
2.3
Examine the code
Take a look at the code in the editor. The declaration
out port led = XS1_PORT_4F;
declares an output port named
led
, which refers to the 4-bit port 4F. On the XK-1A,
the I/O pins of port 4F are connected to the LEDs labeled LED0, LED1, LED2 and
LED3.
Show image of port map..
XS1_PORT_4F[1]
LED0 LED1
LED2 LED3
BUT1
BUT2
XS1_PORT_4F[0]
XS1_PORT_4F[2]
XS1_PORT_1L
XS1_PORT_1K
XS1_PORT_4F[3]
XS1-L1
X7366A