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
      • Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Vietnam
      • 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
Freedom development platform
  • Products
  • Dev Tools
  • Freedom development platform
  • More
  • Cancel
Freedom development platform
Blog [FRDM-K64F +KDS3.0 + Processor Expert(PE)] Tutorial: working with Xtrinsic Sensor Board with switch interface and displaying data on hyper terminal
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Freedom development platform to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: bheemarao
  • Date Created: 23 Jun 2015 10:48 AM Date Created
  • Views 713 views
  • Likes 3 likes
  • Comments 3 comments
  • frdm-k64f
  • kds3.0
  • xtrinsic_sensor
  • k64f
Related
Recommended

[FRDM-K64F +KDS3.0 + Processor Expert(PE)] Tutorial: working with Xtrinsic Sensor Board with switch interface and displaying data on hyper terminal

bheemarao
bheemarao
23 Jun 2015

Brief Introduction:

This project introduces on interfacing e14 xtrinsic sensor board to Kinetis freedom board K64F. As we know xtrinsic sensor board is having pin compatible of arduino interface and K64F is also having arduino compatible interface so both the board are one-to-one pluggable. The interface looks like the picture shown below. This project polls data from accelerometer and displays in ‘g’s, polls data from magnetometer in ‘uT ‘, Getting pressure and temperature data in kPa and degrees Celsius.

 

Before we begin make sure below requirements are there as setup


Required Hardware and Software:

  • Kinetis Design Studio 3.0

(download link: KDS 3.0)

 

  • Kinetis Software Development Kit (KSDK-v1.2.0)

(Download Link Kinetis SDK 1.2 Mainline )


  • FRDM-K64F Board configured with JLink Debugger

(The firmware can be downloaded here: Firmware download)

Or loaded with PE micro openSDA driver


This project operates in 4 modes or state machines Standby mode, Accelerometer mode , Magnetometer mode, Pressure/Temp mode. All these modes can be transited through successive button press (SW3). You can see a LED_Red is on in Accelerator mode and Green Led is switched on while in Magnetometer mode and Blue LED is switched on in Pressure mode. The sensor data’s are been sent to UART port and can be seen on HyperTerminal.


Little bit on Xtrinsic sensor board:

  The sensor board comes equipped with three of Freescale's new-generation XTRINSIC MEMS sensors. The MPL3115 (U1) is designed for accurate measurement of temperature and pressure, the MAG3110 (U2) for detection of magnetic fields, and the MMA8491 (U3) for measurement of physical positions.

 

image

MPL3115

The MPL3115 is a high-precision sensor used to provide accurate pressure and altitude data. It features an adjustable sampling rate, ultra-low power consumption and intelligent functions, suitable for applications such as mobile, medical and security devices. MPL3115 is able to provide digitized output, two separated wake-up interrupts, minimum/maximum threshold mechanism, and autonomous data acquisition. The self data processing ability of the MPL3115 reduces the need for communication with MCUs, which reduces overall system power consumption.

 

MAG3110

The MAG3110 is a small, low-power, digital 3-axis magnetometer featuring a wide measurement range. It can measure magnetic fields (the overlapped fields consisting of the geomagnetic field and the fields created by components on PCB) on each of the 3 axes in the position where it is placed. The MAG3110 features an I2C serial interface, and is capable of measuring magnetic fields of up to 10 Gauss with an output data rate up to 80Hz. The output data rate can vary depending on the sampling intervals and may be adjusted from 12ms to several seconds.

 

MMA8491Q

The MMA8491Q is a low voltage, 3-axis low-g accelerometer housed in a 3 mm by 3 mm QFN package. The device can accommodate two accelerometer configurations, acting as either an easy to implement 45° Tilt Sensor or a digital (I2C) output accelerometer. In the 45° Tilt Sensor mode, it offers extremely easy board implementation by using a single line of output per axis. In the digital output mode, 14-bit ±8g raw data can be read from the device with high 1 mg/LSB sensitivity. The extreme low power capabilities of the MMA8491Q reduce the low data rate current consumption to less than 400 nA per Hz.

 

As per our stated requirement the modules that are been created in this project are:

 

  • Console IO: for UART communication
  • I2C_LDD: required for I2C communication
  • ExtInt_LDD: external interrupt signal required for MAG3110 sensor
  • ExtInt_LDD: external interrupt signal required for MPL3115 sensor
  • TimerInt_LDD: Timer interrupt for every 1 ms generated
  • TimerUnit_LDD: This is an referenced component required for timer interrupt generation
  • BitIO_LDD: Bit i/o signal required for enable pin of Accelerometer
  • ExtInt_LDD: external interrupt signal interfaced to switch SW3 for user interface
  • LEDbit:  This component is for Red LED
  • LEDbit:  This component is for Green LED
  • LEDbit:  This component is for Blue LED


image

The hardware connections are as shown below:

 

  • ConsoleIO is connected to

UART0->TX = PTB17

UART0->RX = PTB16

 

  • I2C_LDD is connected to

I2C0- SDA->PTE24

I2C0-SCL->PTE25

 

  • MAG3110 interrupt pin is connected to PTD1
  • MPL3115 interrupt pin is connected to PTD7
  • Accelerometer enable pin is connected to PTA0

 

Executing the program:


Import the attached project to your workspace from here

image


image


Select the project location and open it.

Build the project as shown below:

image

Our project builds with no error as shown below

image

Next we will proceed for debugging the application code:

click on Debug configuration and select our project:

image

My board is loaded with P&E micro opensda driver and i will be selecting related option as shown:

image

Open the hyperterminal window of your choice:

I have putty in my system, provide the configuration for the serial terminal as shown:

image

Now execute the project by pressing the “resume” button

image


image

You can open the hyperterminal window

It will ask you to press “switch-3” present on board.

image


By pressing first time it displays the accelerometer data and red led is switched “on”

image

press the switch again to display magnetometer data and Green LED is switched ‘on’

image


press the switch again to display the pressure and temperature data, Blue led is switched ‘on’

image

You can see the snap shot of the hyperterminal output:

image

Happy executing the Xtrinsic sensor interfacing to K64F freedom board:


I have enclosed the binaries and project folder for quick reference and evaluation.


Attachments:
K64-Xtrinsic with led-bin.rar
K64-Xtrinsic.rar
  • Sign in to reply
  • bheemarao
    bheemarao over 10 years ago in reply to balearicdynamics

    Thank you for the compliments,

    its my pleasure. image

     

    Bheema Rao

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • balearicdynamics
    balearicdynamics over 10 years ago

    Thank you for this post, bheemarao!

     

    In order, 1) Liked 2) Followed 3) Bookmarket 4) Saved the post in PDF image I am not yet sure if it is the case to use this board with my PI for the project I am working on so your post is just saving me at least one day of search and test.

     

    Enrico

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 10 years ago

    Nice post.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • 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 © 2026 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