How to connect XMOS with BLE112?

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
Post Reply
SamAtNewcastle
Junior Member
Posts: 4
Joined: Thu Feb 04, 2016 4:47 pm

How to connect XMOS with BLE112?

Post by SamAtNewcastle »

Hello,

Dose any one know how to connect XMOS starter board (or XMOS microcontroller) to BLE112 (Bluetooth Low Energy)?
XMOS&BLE112.jpg
(139.34 KiB) Not downloaded yet
XMOS&BLE112.jpg
(139.34 KiB) Not downloaded yet


User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi Sam. The BLE112 module appears to support assorted methods of interfacing. Likewise, so does the XMOS processor and your StartKit. The XMOS devices are bit-banging ultra fast machines that can mimic many proven industry standards including I2C, SPI, parallel, UART interfaces.

Review this webpage for your module:

https://eewiki.net/display/Wireless/Get ... rgy+module

Apply the UART interface if that is suitable for your project. Then review the examples using the StartKit with the UART code. Here is the URL for the latest UART library which is applicable for your StartKit:

http://www.xmos.com/support/libraries

http://www.xmos.com/published/lib_uart- ... ion=latest

http://www.xmos.com/published/lib_uart- ... ion=latest

You will need to pick any 2 pins on the Startkit to map to the respective TX & RX functions. The library will handle the rest to use those user defined pins to send and receive messages to the outside world (your BLE112 module). However, do review the proper parameters needed to communicate with the BLE112 module. For example, you are obligated to match the serial port parameters with the BLE112 module when the module is in UART mode (ie. 115200 or 57600 or 19200 baud, etc.). The XMOS controller is wicked and can support all the PC standard baud rates and with some code tweaks, even non-standard values are possible.

Start with using your kit + UART library + any 2 single bit ports -> do not connect the BLE112 module (yet) and then wire the 2 pins together. The purpose is to SEND a message through the UART and the other pin will RECEIVE the message. Next send out some characters through the UART and print to the screen -> do you see what you TRANSMIT ? This is a quick way to confirm most of the UART's operation. Confirm the baud rate against the BLE112 module spec.

Then connect the BLE112 module and send some simple commands and see if the results are matching the datasheet.

After you have confirmed the communication is operational with your BLE module, you can then focus on how to use the BLE112 module for your project. The Startkit is excellent and allows for simple printing to the host PC during the code development phase but do keep in mind that some methods of such printing will slow down or even block your XMOS working speed. There are assorted posts on this subject and how to prevent these issues.

On an earlier comment about power savings, our 2 bits - while we do not believe that XMOS is the ultra low power solution there are some benefits in using this core in that, the CPU can perform the same task as other competing devices on the market but can do so with a much higher efficiency in a shorter period of time so this may allow for your power reduction. Sleep till needed -> perform the work quickly -> go back to sleep.

Do use the Startkit to get wet with this technology and then consider to move to the more advanced XCORE-200 series of processors (if required). If you wish to consider use of Ethernet / USB, etc. then the new line will be a cost savings to your project as these ports are available onboard.

Post back if you have any issues and will try to assist.
SamAtNewcastle
Junior Member
Posts: 4
Joined: Thu Feb 04, 2016 4:47 pm

Post by SamAtNewcastle »

Thank you mon2, well done for the detailed explanation.
I will go throw it step by step, I will let you know If I face any difficulties.

Thanks

Regards
Sam
Post Reply