• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » MSP430™ Microcontrollers » MSP430 Ultra-Low Power 16-bit Microcontroller Forum » eZ430-Chronos Simple Acceleration reading sequence from serial port
Share
MSP430™ Microcontrollers
  • Forum
  • Announcements
  • E2E Wiki
Options
  • Subscribe via RSS
MSP430 Resources
  • MSP430 Product Folder
  • MSP-EXP430G2 - MSP430 LaunchPad Value Line Development kit
  • MSP430 Getting Started Guide
  • MSP430 Microcontroller Projects
  • More Resources >
  • eZ430-Chronos Simple Acceleration reading sequence from serial port

    eZ430-Chronos Simple Acceleration reading sequence from serial port

    • uguryildiz
      Posted by uguryildiz
      on Jan 22 2010 03:31 AM
      Prodigy75 points

      Hi all,

      I monitored the communication between eZ430-Chronos and Control Center Software (CC) and found some information about the protocol.

      Firstly CC opens the port corresponding to "TI CC1111 Low-Power RF to USB CDC Serial Port" using the settings 115200,1,N,8. I think CC firstly search for COM ports matching some criteria and opens it.

      After that it continuously send ping requests in the background even when he reads any acc data in order to know that AP is working and not disconnected.

      When you push the button "Start Access Point" it sends a request to let AP know that. After that it begins polling the AP for valid acc data.

      While we are waiting for TI to release some documentation or source code it may be useful for impatient guys.

       

      Packet format:

      PC-to-Ap: 2 byte command + 1 byte packet length + n byte packet load

      AP-to-PC: 2 byte command + 1 byte packet length + n byte packet load

      Some commands:

      Background polling
      ----------------------------------------------------------------------
      PC to AP : ff 20 07 00 00 00 00
      Response : ff 06 07 xx xx xx xx
      xx xx xx xx: 4 byte watch address

      Start Access Point:
      ----------------------------------------------------------------------
      PC to AP :  ff 07 03
      Response: ff 06 03

      Command before each Request Acc. data (functionality not known):
      ----------------------------------------------------------------------
      PC to AP: ff 00 04 00
      Response : ff 06 04 03
      It may be returning the state of the watch or AP

      Request Acc. data:
      ----------------------------------------------------------------------
      PC to AP: ff 08 07 00 00 00 00
      Response: ff 06 07 tt xx yy zz
      tt: data type (ff: no data, 01: valid acc data)
      xx, yy, zz : acc data

      Acc Reading sequence:

      1. Open the port using the settings 115200,1,N,8.

      2. Send background ping requests (Optional)
      packet : ff 20 07 00 00 00 00

      3. Send "Start Access Point" command
      packet: ff 07 03

      4. Send the acc data request command
      packet : ff 08 07 00 00 00 00

      5. if you want to get new acc data go to step 4

       

       

      Access Point chronos Control Center ez430 protocol
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sean Brewer
      Posted by Sean Brewer
      on Jan 23 2010 19:10 PM
      Prodigy40 points

      I found another command:

      Stop Access Point
      ----------------------------------------------------------------------
      PC to AP :
      ff 09 03

       

      I found it after I wrote my code though. Oh well.

      chronos Serial Communication PC application
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sean Brewer
      Posted by Sean Brewer
      on Jan 24 2010 00:45 AM
      Prodigy40 points

      Actually, before the turn off access point can be issued, the same "command" that turns the access point on:

      ff 07 03

      must be issued.

       

      So to turn the access point off you would send:

      ff 07 03 ff 09 03

      to the access point from the PC.

      chronos Serial Communication PC application
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jesus Mora
      Posted by Jesus Mora
      on Jan 27 2010 09:16 AM
      Prodigy50 points

      Hi Guys,

      Thank you so much for the information. I'm trying to communicate with the watch following your communication protocol to read ACC data  but no result. I wrote a toy Matlab code but no way, maybe it's because the tx rate 115200 is so high..

      This is the code, any help will be very welcome..


      clear all, clc

      pingrequest_CMD = 'ff200700000000';
      startAP_CMD =  'ff0703';
      getACCdata_CMD = 'ff080700000000';
      stopAP_CMD =  'ff0703ff0903';
      n_samples = 5000;
      data =zeros(n_samples,3);

      instrfind
      s = serial('COM16','BaudRate',115200,'DataBits',8);

      fopen(s);
      fwrite(s, pingrequest_CMD);
      pause(0.2);
      fwrite(s, startAP_CMD);
      pause(0.2);
      fwrite(s, getACCdata_CMD);
         
      try
          for i=1:n_samples
              frame = fread(s,8);
             
              if frame(4) == 01
                  data(i,1)=frame(3);     %Acc_x
                  data(i,2)=frame(2);     %Acc_y   
                  data(i,3)=frame(1);     %Acc_z
              else
                  error('Parsing frame');
              end
          end
                        
      catch
          fclose(s);     
          delete(s);     
          rethrow(lasterror);
      end

      fwrite(s, stopAP_CMD);
      fclose(s);


      Thanks in advance,

      Jesus Mora

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • andy brown
      Posted by andy brown
      on Jan 27 2010 13:13 PM
      Prodigy20 points

      Hi, do you get any response from the serial port at all, for example a valid response from the 'access point' command?

      Andy

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jesus Mora
      Posted by Jesus Mora
      on Jan 27 2010 14:07 PM
      Prodigy50 points

      Hi Andy,

       

      No men, I don't receive anything, the timeout expires always before at all. For sure I'm not doing the things well....

       

      I would like TI publish  at least the communication protocol.

       Thanks in advance,

      Jesus Mora

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Sean Brewer
      Posted by Sean Brewer
      on Jan 27 2010 14:48 PM
      Prodigy40 points

      Hi Jesus,

       

      I'm not very familiar with MATLAB, but it seems like you aren't sending the data to the serial port as a bytestring. If you can somehow convert the data into a bytestring your code will (probably) work.

       

      Thanks,

       

      Sean

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ganesh41673
      Posted by Ganesh41673
      on Feb 04 2010 04:45 AM
      Prodigy150 points

      Hi uguryildiz,

      That was nice post I managed to get the data bytes for three axes. Thank you.

      But I still wonder -the data I get is byte data max FF whereas the data displayed by control center is +/-1000. Perhaps it is G*100 representation. How do I get to convert the data to G values - any ideas?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • venk kesa
      Posted by venk kesa
      on Feb 05 2010 08:34 AM
      Prodigy50 points

      Hi Ganesh,

      I was just wondering, the data you're capturing is actually the acceleration data or the tilt data? Please let me know.

      Thanks!

      Venkatesh.

      Ganesh
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ganesh41673
      Posted by Ganesh41673
      on Feb 05 2010 18:27 PM
      Prodigy150 points

      Good question - I am right now only capturing the tilt values.

      If these values are FF at max already then how to obtain acceleration data. Usually there are extrapolation methods using the calibration values which gives the G values. I wish TI gives away the codes to read the data from watch.

      Has anybody tried codes to obtain other data from the watch such as the altitude and time? The data center is still a mystery, probably the code for data center shoud've been included for practical applications.

      Regards

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • venk kesa
      Posted by venk kesa
      on Feb 06 2010 16:56 PM
      Prodigy50 points

      Ganesh,

      I have one other question...Can we connect two Chronos to the same computer and still get the Tilt data..If so please let me know.

      Thanks,

      Luke.

      Ganesh
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ganesh41673
      Posted by Ganesh41673
      on Feb 06 2010 23:24 PM
      Prodigy150 points

      Hi Venk,

      Yes, one can connect two chronos to the same computer and get the Tilt Data. Just that each chronos will need to be sync'd to the CC1111 receivers appropriately.

      Good Luck.

      Ganesh

       

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • venk kesa
      Posted by venk kesa
      on Feb 07 2010 08:26 AM
      Prodigy50 points

      Ganesh,

      Can you explain more about that Please!

      Thanks!

      Ganesh
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • venk kesa
      Posted by venk kesa
      on Feb 07 2010 12:45 PM
      Prodigy50 points

      Ganesh,

      One other thing, I believe you have a code for capturing Telt data...So, at this point, the program imports data into CSV file automatically when we start running it..Is it also possible to import that data into XML file along with CSV file at the same time? If so how can we do it?

      Also, I am just wondering how can we Sync'd  each chronos  to the CC1111 receivers..Can you please explain the process?


      Thank you so much for all your help Ganesh!
      Luke.

      Ganesh
      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ganesh41673
      Posted by Ganesh41673
      on Feb 08 2010 07:28 AM
      Prodigy150 points

      Venkatesh/Luke,

      When you are connecting more that one Chronos, you need to take care of sequence of starting which might be important especially if you are dealing with tilt.

      Let us say you have two chronos A & B are connected to convey data from Joe and Harry respectively. If you start access point on A and then Harry turns on his chronos you have Harry's data on A which is mis-match. You need to take care that way.

      Ganesh

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    1234
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use