Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions app_sk_gpio_com_demo/doc_quickstart/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ GPIO Com Port Demo Quickstart Guide
sw_gpio_examples COM Port demo : Quick Start Guide
--------------------------------------------------

We use the XA-SK-GPIO Slice Card together with the xSOFTip UART to create a UART , and send data to and from a PC COM port.
Also xSOFTip I2C software component to communicate with on board ADC.
This application showcases some of the key software features and serves as an example on how to use APIs of UART and I2C.
This demo features UART data loop back, receives commands from comport, and perform according to the command input.
In this example, we use the XA-SK-GPIO Slice Card together with the xSOFTip UART to create a UART , and send data to and from a PC COM port.
We also use xSOFTip I2C software component to communicate with on board ADC.
This application showcases some of the key software features and serves as an example of how to use APIs of UART and I2C components.
This demo features UART data loop back, receives commands from a comport, and performs according to the command input.

Install Demonstration Tools on the Host PC
++++++++++++++++++++++++++++++++++++++++++
Expand All @@ -25,7 +25,7 @@ The following tools should be installed on the host system in order to run this
Hardware Setup
++++++++++++++

The XP-SKC-L2 Slicekit Core board has four slots with edge conectors: ``SQUARE``, ``CIRCLE``,``TRIANGLE`` and ``STAR``.
The XP-SKC-L2 Slicekit Core board has four slots with edge conectors: ``SQUARE``, ``CIRCLE``, ``TRIANGLE`` and ``STAR``.

To setup up the system refer to the figure and instructions below

Expand All @@ -34,8 +34,8 @@ To setup up the system refer to the figure and instructions below
#. Connect the XTAG-2 to host PC. Note that a USB cable is not provided with the Slicekit starter kit.
#. Switch on the power supply to the Slicekit Core board.
#. Connect a null serial cable to DB-9 connector on XA-SK-GPIO Slice Card. The cable will need a cross over between the UART RX and TX pins at each end.
#. Connect other end of cable to Host DB-9 connector slot. If the Host does not have an DB-9 Connector slot then use USB-UART cable for the demo. We used the BF-810 USB to Uart adapter (See http://www.bafo.com/products_bf-810_S.asp (Part number : BF-810). Any other usb to uart bridge should do just as well.
#. Identify the serial (COM) port number provided by the Host or the USB to UART adapter and open a suitable terminal software for the selected serial port (refer to the Hercules or SecureCRT documentation above).
#. Connect the other end of the cable to the Host DB-9 connector slot. If the Host does not have an DB-9 Connector slot then use the USB-UART cable for the demo. We used the BF-810 USB to Uart adapter (See http://www.bafo.com/products_bf-810_S.asp (Part number : BF-810), any other usb to uart bridge should do just as well.
#. Identify the serial (COM) port number provided by the Host or the USB to UART adapter and open suitable terminal software for the selected serial port (refer to the Hercules or SecureCRT documentation above).
#. Configure the host terminal console program as follows: 115200 baud, 8 bit character length, even parity, 1 stop bit, no hardware flow control. The Transmit End-of-Line character should be set to `CR` (other options presented will probably be `LF` and `CR\LF`).
#. Connect XA-SK-GPIO Slice Card to the XP-SKC-L2 Slicekit Core board.
#. Connect the XTAG Adapter to Slicekit Core board, XA-SK-XTAG2 connector(xtag slice) and connect XTAG-2 to the adapter.
Expand Down Expand Up @@ -64,7 +64,7 @@ Note that the Developer Column in the xTIMEcomposer on the right hand side of yo
Running the Demo
++++++++++++++++

#. Click on the ``Run`` icon (the white arrow in the green circle). A dialog will appear asking which device to cvonnect to. Select ``XMOS XTAG2``.
#. Click on the ``Run`` icon (the white arrow in the green circle). A dialog will appear asking which device to connect to. Select ``XMOS XTAG2``.
#. Look at the configured terminal client application console on the Host.
#. If the terminal is configured correctly, it should display the following message: ``WELCOME TO GPIO DEMO (**ECHO DATA MODE ACTIVATED**)``. In this mode any character typed in from the key board is echoed back. Verify this by typing characters in the terminal console on the host. The typed characters should be echoed back.
#. When ready, enter command mode by typing ``>cmd`` (note, be sure to also type the '>' character). The Console will then show **COMMAND MODE ACTIVATED**.
Expand All @@ -79,7 +79,7 @@ Running the Demo
#. Type ``clearall`` to switch OFF all the LEDs.
#. Type ``setled N`` for switching ON a particular LED. 'N' ranges from 1 to 4.
#. Type ``clearled N`` for switching OFF a particular LED. 'N' ranges from 1 to 4.
#. Type in ``chkbuttons`` to return the status of buttons since last 'chkbuttons' command. The console should display ``COMMAND EXECUTED NO BUTONS ARE PRESSED``.
#. Type in ``chkbuttons`` to return the status of buttons since last 'chkbuttons' command. The console should display ``COMMAND EXECUTED NO BUTTONS ARE PRESSED``.
#. Press a button on the Slice Card. The console should display ``COMMAND EXECUTED BUTTON 1 PRESSED`` or ``COMMAND EXECUTED BUTTON 2 PRESSED``
#. Type in ``chkbuttons`` again. The console should display ``COMMAND EXECUTED BUTTON 1 PRESSED``.
#. Type in ``readadc`` for readig ADC value and displaying current temperature. The console should display ``CURRENT TEMPERATURE VALUE IS : <temperature> C``.
Expand Down
20 changes: 10 additions & 10 deletions app_sk_gpio_simple_demo/doc_quickstart/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ GPIO Simple Demo Quickstart Guide
sw_gpio_examples simple demo : Quick Start Guide
------------------------------------------------

This simple demonstration of xTimeComposer Studio functionality uses the XA-SK-GPIO Slice Card together with the xSOFTip I2C Master component to:
This simple demonstration of xTIMEcomposer Studio functionality uses the XA-SK-GPIO Slice Card together with the xSOFTip I2C Master component to:

* communicate with the ADC (and external temperature sensing circuit) on the Slice Card
* display the temperature value on the xTimeComposer debug console when a button is pressed
* display the temperature value on the xTIMEcomposer debug console when a button is pressed
* Cycle through the 4 LEDs on the Slice Card when another button is pressed

Hardware Setup
++++++++++++++

The XP-SKC-L2 Slicekit Core board has four slots with edge conectors: ``SQUARE``, ``CIRCLE``,``TRIANGLE`` and ``STAR``.
The XP-SKC-L2 Slicekit Core board has four slots with edge conectors: ``SQUARE``, ``CIRCLE``, ``TRIANGLE`` and ``STAR``.

To setup up the system:

Expand All @@ -33,13 +33,13 @@ To setup up the system:
Import and Build the Application
++++++++++++++++++++++++++++++++

#. Open xTimeComposer and open the edit perspective (Window->Open Perspective->XMOS Edit).
#. Locate the ``'Slicekit Simple GPIO Demo'`` item in the xSOFTip pane on the bottom left of the window and drag it into the Project Explorer window in the xTimeComposer. This will also cause the modules on which this application depends (in this case, module_i2c_master) to be imported as well.
#. Click on the app_sk_gpio_simple_demo item in the Explorer pane then click on the build icon (hammer) in xTimeComposer. Check the console window to verify that the application has built successfully.
#. Open xTIMEcomposer and open the edit perspective (Window->Open Perspective->XMOS Edit).
#. Locate the ``'Slicekit Simple GPIO Demo'`` item in the xSOFTip pane on the bottom left of the window and drag it into the Project Explorer window in the xTIMEcomposer. This will also cause the modules on which this application depends (in this case, module_i2c_master) to be imported as well.
#. Click on the app_sk_gpio_simple_demo item in the Explorer pane then click on the build icon (hammer) in xTIMEcomposer. Check the console window to verify that the application has built successfully.

For help in using xTimeComposer, try the xTimeComposer tutorials, which you can find by selecting Help->Tutorials from the xTimeComposer menu.
For help in using xTIMEcomposer, try the xTIMEcomposer tutorials, which you can find by selecting Help->Tutorials from the xTIMEcomposer menu.

Note that the Developer Column in the xTimeComposer on the right hand side of your screen provides information on the xSOFTip components you are using. Select the ``I2C master (Single Bit Ports)`` component in the xSOFTip Browser, and you will see its description together with links to more documentation for this component. Once you have briefly explored this component, you can return to this quickstart guide by re-selecting ``'Slicekit COM Port GPIO Demo'`` in the xSOFTip Browser and clicking once more on the Quickstart link for the ``GPIO Simple Demo Quickstart``.
Note that the Developer Column in the xTIMEcomposer on the right hand side of your screen provides information on the xSOFTip components you are using. Select the ``I2C master (Single Bit Ports)`` component in the xSOFTip Browser, and you will see its description together with links to more documentation for this component. Once you have briefly explored this component, you can return to this quickstart guide by re-selecting ``'Slicekit COM Port GPIO Demo'`` in the xSOFTip Browser and clicking once more on the Quickstart link for the ``GPIO Simple Demo Quickstart``.


Run the Application
Expand All @@ -48,7 +48,7 @@ Run the Application
Now that the application has been compiled, the next step is to run it on the Slicekit Core Board using the tools to load the application over JTAG (via the XTAG2 and Xtag Adaptor card) into the xCORE multicore microcontroller.

#. Click on the ``Run`` icon (the white arrow in the green circle). A dialog will appear asking which device to cvonnect to. Select ``XMOS XTAG2``. The debug console window in xTIMEcomposer should then display the message ``** WELCOME TO SIMPLE GPIO DEMO **`` in the Debug Console window. This has been generated from the application code via a call to the ``printstr()`` function.
#. Press Button 1 on the GPIO Slice Card. Each time the button is pressed, the application lights the next LEDs on the Slice Card and displays "Button 1 pressed" in the debug console within xTime Composer Studio. Press the button 5 or 6 times to verify the functionality.
#. Press Button 1 on the GPIO Slice Card. Each time the button is pressed, the application lights the next LEDs on the Slice Card and displays "Button 1 pressed" in the debug console within xTIMEcomposer Studio. Press the button 5 or 6 times to verify the functionality.
#. Press Button 2 on the Slice Card. This causes the current temperature value to be read from the ADC over the I2C bus and then reported on the debug console. Press the button a few times.
#. Do something to alter the temperature of the sensor (use freezer spray, or place your finger on it for a while). Press Button 2 again to verify that the changed temperature is reported.

Expand All @@ -73,5 +73,5 @@ Try the Com Port Demo

#. If you have a PC with a physical COM port, or a USB to Serial Uart cable you can run the extended version of this application (app_sk_gpio_com_demo) which adds a UART to the application and allows the SliceCard and its buttons, LEDs and ADC to be controlled and interrogated from a serial terminal console on a host PC. Follow the link to the quickstart guide for this application for further information on running this extended demo:

:ref:`Slicekit_GPIO_COM_port_Demo_Quickstart`
:ref:`Slicekit_GPIO_COM_port_Demo_Quickstart` Slicekit COM Port GPIO Demo