![XMOS XK-1A Manual Download Page 11](http://html1.mh-extra.com/html/xmos/xk-1a/xk-1a_manual_3536653011.webp)
XK-1A Development Board Tutorial
10. Click
Run
to save your configuration and run it.
The XDE loads the application binary onto your XK-1A, displaying its progress
in the
Console
. When the binary is loaded, the
Console
is cleared.
11. On your XK-1A, verify that a flashing LED is cycled between the four LEDs, and
then click the
Terminate
button () to stop your project running.
4.4
Exercise 2
To complete this part of the tutorial, perform the following tasks:
1. Add an additional case to the
select
statement that responds to Button 1 being
pressed by displaying the string “pressed” on the console, and then waits for
Button 1 to be released and displays the string “released”.
Note that Button 1 drives a 1-bit port high. Pressing the button causes it to stop
driving the port, and releasing results in it driving again. You can test for these
conditions using the input condition
pinseq(0)
and
pinseq(1)
.
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
To print a message to the console, you can include the standard C library header
stdio.h
and use the the library function
printf
.
Explain the solution in more detail..
X7366A