App notes

USB CDC Class as Virtual Serial Port - Extended on sliceKIT

USB CDC Class as Virtual Serial Port – Extended on sliceKIT

This application note shows how to create a USB device compliant to
the standard USB Communications Device Class (CDC) on an XMOS multicore microcontroller.

The code associated with this application note provides an example of
using the XMOS USB Device Library (XUD) and associated USB class descriptors
to provide a framework for the creation of a USB CDC device that implements
Abstract Control Model (ACM).

This example USB CDC ACM implementation provides a Virtual Serial port
running over high speed USB. The Virtual Serial port supports the
standard requests associated with ACM model of the class.

A serial terminal program from host PC connects to virtual serial port and
interacts with the application. The application provides a menu to toggle
on-board LEDs, read an I2C device, monitor buttons and loopback characters.
This application demo code demonstrates a simple way in which USB CDC class
devices can easily be deployed using an xCORE-USB device.

Note: This application note provides a standard USB CDC class device and as a
result does not require external drivers to run on Windows, Mac or Linux.

This application note extends AN00124 to provide a virtual serial port
application that interfaces to hardware demostrating how to build a system
which allows a USB host to connect to custom hardware using an XMOS device.

Required tools and libraries

  • xTIMEcomposer Tools – Version 14.0.0
  • XMOS USB library – Version 3.1.0
  • XMOS I2C library – Version 2.0.0

Required hardware

This application note is designed to run on an XMOS xCORE-USB series device.

The example code provided with the application has been implemented and tested
on the xCORE-USB sliceKIT (XK-SK-U16-ST) but there is no dependancy on this board
and it can be modified to run on any development board which uses an xCORE-USB series device.

The application also requires a GPIO sliceCARD (XA-SK-GPIO) as the hardware it contains
is interfaced to from the virtual serial port application.

Prerequisites

  • This document assumes familiarity with the XMOS xCORE architecture, the Universal Serial Bus 2.0 Specification and related specifications, the XMOS tool chain and the xC language. Documentation related to these aspects which are not specific to this application note are linked to in the references appendix.
  • For descriptions of XMOS related terms found in this document please see the XMOS Glossary [1]
    .
  • For the full API listing of the XMOS USB Device (XUD) Library please see the document XMOS USB Device (XUD) Library [2]
    .
  • For information on designing USB devices using the XUD library please see the XMOS USB Device Design Guide for reference [3]
    .
  • For information on the USB CDC class using the XMOS USB library see AN00124
[1]

http://1m2n3b4v.xmos.com/published/glossary

[2]

http://1m2n3b4v.xmos.com/published/xuddg

[3]

http://1m2n3b4v.xmos.com/published/xmos-usb-device-design-guide

USB CDC Class as Virtual Serial Port – Extended on sliceKIT Read More »

A startKIT ADC demo

A startKIT ADC demo

This applications provides a very simple example of using the ADC
module. It uses the on-chip ADC in one shot mode (a trigger is called every
200ms from a timer) and then reads the 4 values after conversion
complete notification received. It also shows an example of a select
(wait on multiple events) because it also listens to the button, and
lights additional LEDs when that is pressed.

Required tools and libraries

  • xTIMEcomposer Tools – Version 14.0
  • startKIT support library (lib_startkit_support) – Version 1.0.0

Required hardware

This application note is designed to run on the XMOS startKIT.

Prerequisites

  • This document assumes familiarity with the XMOS xCORE architecture, the XMOS GPIO library,
    the XMOS tool chain and the xC language. Documentation related to these aspects which are
    not specific to this application note are linked to in the references appendix.
  • For descriptions of XMOS related terms found in this document please see the XMOS Glossary [1]
    .
[1]

http://1m2n3b4v.xmos.com/published/glossary

A startKIT ADC demo Read More »

A startKIT glowing LED demo

A startKIT glowing LED demo

This application demonstrates I/O on the startKIT by showing a glowing
LED pattern on the LEDs. It uses the startKIT support library to
access the I/O on the device.

Required tools and libraries

  • xTIMEcomposer Tools – Version 14.0
  • startKIT support library (lib_startkit_support) – Version 1.0.0

Required hardware

This application note is designed to run on the XMOS startKIT.

Prerequisites

  • This document assumes familiarity with the XMOS xCORE architecture, the XMOS GPIO library,
    the XMOS tool chain and the xC language. Documentation related to these aspects which are
    not specific to this application note are linked to in the references appendix.
  • For descriptions of XMOS related terms found in this document please see the XMOS Glossary [1]
    .
[1]

http://1m2n3b4v.xmos.com/published/glossary

A startKIT glowing LED demo Read More »

USB HID Class - Extended on xCORE-200 Explorer

USB HID Class – Extended on xCORE-200 Explorer

This application note shows how to create a USB device compliant to
the standard USB Human Interface Device (HID) class on an XMOS multicore
microcontroller.

The code associated with this application note provides an enhancement
to AN00129 for extending the USB HID device to interface with hardware
which can provide input for a USB mouse.

This example uses the ADC on the XMOS xCORE-USB device to interface to
a mixed signal sliceCARD and provide a joystick interface which allows
the USB HID to be controlled.

The application operates as a simple mouse which when running moves the mouse
pointer on the host machine. This demonstrates the simple way in which PC
peripheral devices can easily be deployed using an xCORE device.

Note: This application note provides a standard USB HID class device and as a
result does not require drivers to run on Windows, Mac or Linux.

This application note describes extending XMOS application note AN00129
for the xCORE-200 explorerKIT platform. The demo application is extended
using the functionality described in AN00181 for accesing the accelerometer
on the xCORE-200 explorerKIT.

Required tools and libraries

  • xTIMEcomposer Tools – Version 14.0.0
  • XMOS USB library – Version 3.1.0
  • XMOS I2C library – Version 2.0.0

Required hardware

This application note is designed to run on an XMOS xCORE-200 series device.

The example code provided with the application has been implemented and tested
on the xCORE-200 explorerKIT but there is no dependancy on this board
and it can be modified to run on any development board which uses an xCORE-200
series device.

Prerequisites

  • This document assumes familiarity with the XMOS xCORE architecture, the
    Universal Serial Bus 2.0 Specification (and related specifications, the
    XMOS tool chain and the xC language. Documentation related to these aspects
    which are not specific to this application note are linked to in the references
    in the appendix.
  • For descriptions of XMOS related terms found in this document please see
    the XMOS Glossary [1]
    .
  • Application notes AN00129 (USB HID) and AN00181 (Accelerometer)
  • For the full API listing of the XMOS USB Device (XUD) Library please see
    thedocument XMOS USB Device (XUD) Library [2]
    .
  • For information on designing USB devices using the XUD library please
    see the XMOS USB Device Design Guide for reference [3]
    .
[1]

http://1m2n3b4v.xmos.com/published/glossary

[2]

http://1m2n3b4v.xmos.com/published/xuddg

[3]

http://1m2n3b4v.xmos.com/published/xmos-usb-device-design-guide

USB HID Class – Extended on xCORE-200 Explorer Read More »

A startKIT tic-tac-toe demo

A startKIT tic-tac-toe demo

This application demonstrates several aspects of I/O on the startKIT
and programming XMOS devices by allowing the user to play a game of
tic-tac-toe on the startKIT.

The LED grid is used as the game board and the buttons and capacitive
sensors are used for input.

Required tools and libraries

  • xTIMEcomposer Tools – Version 14.0
  • startKIT support library (lib_startkit_support) – Version 1.0.0

Required hardware

This application note is designed to run on the XMOS startKIT.

Prerequisites

  • This document assumes familiarity with the XMOS xCORE architecture, the XMOS GPIO library,
    the XMOS tool chain and the xC language. Documentation related to these aspects which are
    not specific to this application note are linked to in the references appendix.
  • For descriptions of XMOS related terms found in this document please see the XMOS Glossary [1]
    .
[1]

http://1m2n3b4v.xmos.com/published/glossary

A startKIT tic-tac-toe demo Read More »

Scroll to Top