element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RoadTests & Reviews
  • Products
  • More
RoadTests & Reviews
RoadTest Forum [RoadTest] "Freescale RD3803MMA7660FC Review - Serial Communication"
  • Blogs
  • RoadTest Forum
  • Documents
  • RoadTests
  • Reviews
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RoadTests & Reviews to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 17 replies
  • Subscribers 2566 subscribers
  • Views 1404 views
  • Users 0 members are here
  • rd3803mma7660fc
  • freescale
  • accelerometer
  • serial
Related

[RoadTest] "Freescale RD3803MMA7660FC Review - Serial Communication"

espanholito
espanholito over 15 years ago

Hello all,

 

First of all i would like to thank Alistair for giving me this opportunity to test this equipment.

 

I received my kit yesterday, and soon started exploring it.

 

As Xavier CHAZE said in the other discution(http://www.element-14.com/community/message/6561#6561), this kit is compose by three components: a freescale uC, a FTDI USB-serial chip, and the  accelerometer.

 

Also with the kit is some documentation and a cd to install a applications which allows to explore some of the features of the accelerometer, like tilt, shake, tap, and orientation detection.

 

As there are already some reviews on this kit, i decided not to talk about what others have already talk, and start to discover a bit of the kit. First i have installed the freescale application which didn't work on my windows 7 x64:(

I had to install it on a windows xp machine to work.

 

As the kit has a USB-Serial Converter, you can develop your computer applications to "talk" to the freescale uC in order to receive the sensor data. And this was what I have done, first I had to discover the communications parameteres:

 

Baudrate: 38400

Data Bits: 8

Stop Bits: 1

Parity: None

Handshake: None

 

Then, using a serial port monitor I spied the communication beetween the freescale application and the board.

 

In order to start receiving data from the board you have to send a couple of bytes:

 

Hexadecimal:

 

0x20; 0x48; 0x54; 0x31; 0x53; 0x31; 0x41; 0x41; 0x0D

0x20; 0x48; 0x54; 0x31; 0x53; 0x31; 0x41; 0x41; 0x0D

0x20; 0x73; 0x31; 0x41; 0x41; 0x0D

0x20; 0x62; 0x37; 0x41; 0x41; 0x0D

 

As you can see, all the messages start with 0x20 and end with 0x41; 0x41; 0x0D

 

From this point the uC will start to send the accelerometer data. Each message starts with 0x20; 0x43 and ends with 0x41; 0x41; 0x0D

 

Till this point i still haven't time to explore more of the kits commands, but hope to post them here soon.

 

Best Regards,

Marcos

  • Sign in to reply
  • Cancel
  • gandrewstone
    gandrewstone over 15 years ago
    There's a spec on the freescale site that describes the serial protocol.  That might save you some time!
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 15 years ago in reply to gandrewstone

    Where can you find more information about this?

     

    I can only see the i2c specs for the chip itself but no further serial specs for the devkit itself.

     

    Do you know which mode is initialized with what you found?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • gandrewstone
    gandrewstone over 15 years ago in reply to Former Member

    Ok ok I'll dig it up again! :-)

     

    http://cache.freescale.com/files/sensors/doc/app_note/AN3945.pdf?fsrch=1


    Or just go the the freescale site and search for:

    RD3803MMA7660FCRD3803MMA7660FC protocol

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 15 years ago in reply to gandrewstone

    Thanks a plenty image

     

    Can't believe they did not attach this document to the RD3803MMA7660FCRD3803MMA7660FC product itself on the website, other application notes can be found but not this one.

     

     

    Elias

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 15 years ago in reply to Former Member

    After a quick look it seems that

    0x20; 0x48; 0x54; 0x31; 0x53; 0x31; 0x41; 0x41; 0x0D

    is actually the handshake response which you would get if you send 0x20; 0x68; 0x0D; so that should not be required.

     

    0x20; 0x73; 0x31; 0x41; 0x41; 0x0D

    changes device mode to 1 (low power 4sps) although I'm not sure what are the two A's for

     

    0x20; 0x62; 0x37; 0x41; 0x41; 0x0D

    is start data logging with 1.2s timer interval (setting 7) , again not sure about the two A's they are not be required

     

    so if you want to start getting samples you can enter 20 73 31 0D and then 20 62 37 0D or in ASCII <space>s1<CR> and then <space>b7<CR>

     

    with 120sps I would only get samples when moving the device, low medium and scope settings work normally

     

    edit:

     

    "Command sent from S08 to PC
    Repeatedly sent when timer interval has elapsed, until stop timer command is sent.
    Byte 0-9 :-binary data from Device Register
    (0x00 – 0x07) and (0x1A – 0x1C)"

     

    this btw is not completely true as all received messages have the format of <space>CxxxxxAA<CR> where the x's are the the actual data so I'm not sure what is the complete output format

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • espanholito
    espanholito over 15 years ago

    Hello All,

     

    When I wrote the review i haven´t still visit the freescale page. From what I have read from other members review and from my personal opinion, I agree that the I2C board is a good option for develop accelerometer projects, but the uC board is a waste of mony.

     

    Even with the serial protocol freescale implemented on the uC you still have lot's of limitations if you want to develop your own computer application.

     

    Currently I have been using some microchip development boards and they are mutch better for development, because they give everithing you need. For example the pic24F development tool has a programmer on the own board which allows the user to create its own board application.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • amri_amin
    amri_amin over 15 years ago

    Hello all,

     

    You'll find in attachement, a .net projet (compiles with VS2005 or Sharpdevelop) consisting of a library(reversed from freescale software) implementing the protocol communication with eval board and a demo program that autodetects port used by the board and registers to a callback outputing register values( refer to datasheet for decoding register values).

    Next step is to interface the library with a 3D game.

    Best regards

    Attachments:
    MMA7660.zip
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 15 years ago in reply to amri_amin

    Hi Amine,

     

    I have not tried your code as I have no compiler for it but when browsing through I noticed:

     

    public string setConnection(string port, string handshakeID)
            {
                Exception exception;
                SCIPort = new SerialPort();
                try
                {
                    SCIPort.PortName = port;
                    SCIPort.BaudRate = 0x9600;
                    SCIPort.DataBits = 8;
                    SCIPort.Parity = Parity.None;
                    SCIPort.StopBits = StopBits.One;
                    SCIPort.NewLine = "AA\r";
                }

     

     

    while in the documentation the rate is 38400, do you get good values with your code?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • amri_amin
    amri_amin over 15 years ago in reply to Former Member

    Hi elias,

     

    The baud rate is written in hexadecimal fomat, so 0x9600 in hexa equals 38400 in decimal.

    to compile the code, you can use the open source sharpdevelop ide with the .net framework from microsoft.

     

    BR.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • Former Member
    Former Member over 15 years ago in reply to amri_amin

    Hi Amine,

     

    That explains it image

     

    I downloaded sharpdevelop indeed but as I have a 64bit OS I got errors.

     

    Elias

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube