Microchip Technology MM7150 User Manual

TM
MM7150 Motion Module PICtail
Plus Evaluation Board (#AC243007)
with Explorer 16 Development Board
User’s Guide
2014 - 2016 Microchip Technology Inc. DS50002322E
Note the following details of the code protection feature on Microchip devices:
YSTEM
CERTIFIEDBYDNV
== ISO/TS16949==
Microchip products meet the specification contained in their particular Microchip Data Sheet.
Microchip believes that its family of products is one of the most secure families of its kind on the market today, when used in the intended manner and under normal conditions.
There are dishonest and possibly illegal methods used to breach the code protection feature. All of these methods, to our knowledge, require using the Microchip products in a manner outside the operating specifications contained in Microchip’s Data Sheets. Most likely, the person doing so is engaged in theft of intellectual property.
Microchip is willing to work with the customer who is concerned about the integrity of their code.
Neither Microchip nor any other semiconductor manufacturer can guarantee the security of their code. Code protection does not mean that we are guaranteeing the product as “unbreakable.”
Code protection is constantly evolving. We at Microchip are committed to continuously improving the code protection features of our products. Attempts to break Microchip’s code protection feature may be a violation of the Digital Millennium Copyright Act. If such acts allow unauthorized access to your software or other copyrighted work, you may have a right to sue for relief under that Act.
Information contained in this publication regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Micro­chip devices in life support and/or safety applications is entirely at the buyer’s risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights unless otherwise stated.
Trademarks
The Microchip name and logo, the Microchip logo, AnyRate, AVR, AVR logo, AVR Freaks, BeaconThings, BitCloud, CryptoMemory, CryptoRF, dsPIC, FlashFlex, flexPWR, Heldo, JukeBlox, KEELOQ, KEELOQ logo, Kleer, LANCheck, LINK MD, maXStylus, maXTouch, MediaLB, megaAVR, MOST, MOST logo, MPLAB, OptoLyzer, PIC, picoPower, PICSTART, PIC32 logo, Prochip Designer, QTouch, RightTouch, SAM-BA, SpyNIC, SST, SST Logo, SuperFlash, tinyAVR, UNI/O, and XMEGA are registered trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
ClockWorks, The Embedded Control Solutions Company, EtherSynch, Hyper Speed Control, HyperLight Load, IntelliMOS, mTouch, Precision Edge, and Quiet-Wire are registered trademarks of Microchip Technology Incorporated in the U.S.A.
Adjacent Key Suppression, AKS, Analog-for-the-Digital Age, Any Capacitor, AnyIn, AnyOut, BodyCom, chipKIT, chipKIT logo, CodeGuard, CryptoAuthentication, CryptoCompanion, CryptoController, dsPICDEM, dsPICDEM.net, Dynamic Average Matching, DAM, ECAN, EtherGREEN, In-Circuit Serial Programming, ICSP, Inter-Chip Connectivity, JitterBlocker, KleerNet, KleerNet logo, Mindi, MiWi, motorBench, MPASM, MPF, MPLAB Certified logo, MPLIB, MPLINK, MultiTRAK, NetDetach, Omniscient Code Generation, PICDEM, PICDEM.net, PICkit, PICtail, PureSilicon, QMatrix, RightTouch logo, REAL ICE, Ripple Blocker, SAM-ICE, Serial Quad I/O, SMART-I.S., SQI, SuperSwitcher, SuperSwitcher II, Total Endurance, TSHARC, USBCheck, VariSense, ViewSpan, WiperLock, Wireless DNA, and ZENA are trademarks of Microchip Technology Incorporated in the U.S.A. and other countries.
SQTP is a service mark of Microchip Technology Incorporated in the U.S.A.
Silicon Storage Technology is a registered trademark of Microchip Technology Inc. in other countries.
GestIC is a registered trademark of Microchip Technology Germany II GmbH & Co. KG, a subsidiary of Microchip Technology Inc., in other countries.
All other trademarks mentioned herein are property of their respective companies.
© 2014 - 2016, Microchip Technology Incorporated, All Rights Reserved.
ISBN: 9781522410980
QUALITYMANAGEME NTS
DS50002322E-page 2  2014 - 2016 Microchip Technology Inc.
Microchip received ISO/TS-16949:2009 certification for its worldwide headquarters, design and wafer fabrication facilities in Chandler and Tempe, Arizona; Gresham, Oregon and design centers in California and India. The Company’s quality system processes and procedures are for its PIC devices, Serial EEPROMs, microperipherals, nonvolatile memory and analog products. In addition, Microchip’s quality system for the design and manufacture of development systems is ISO 9001:2000 certified.
®
MCUs and dsPIC® DSCs, KEELOQ
®
code hopping
Object of Declaration: MM7150 Motion Module PICtailTM Plus Evaluation Board (#AC243007) with Explorer 16 Development Board
2014 - 2016 Microchip Technology Inc. DS50002322E-page 3
MM7150 MOTION MODULE PICTAILTM PLUS
EVALUATION BOARD (#AC243007)
WITH EXPLORER 16 DEVELOPMENT BOARD
USER’S GUIDE
Table of Contents
Preface ........................................................................................................................... 6
Introduction............................................................................................................ 6
Document Layout .................................................................................................. 6
Audience ............................................................................................................... 7
Reference Documents........................................................................................... 7
Glossary ................................................................................................................ 7
The Microchip Web Site ........................................................................................ 7
Development Systems Customer Change Notification Service ............................ 8
Customer Support ................................................................................................. 8
Document Revision History ................................................................................... 9
Chapter 1. Hardware Setup
1.1 Hardware Requirements .............................................................................. 10
1.2 Preparing the Explorer 16 Development Board ............................................ 10
1.3 Hardware Connections for MM7150-PICtail to Explorer 16 Board ............... 10
1.3.1 Direct Plug-In ............................................................................................. 10
1.3.2 Using Extension Cable .............................................................................. 11
Chapter 2. Software/Firmware Setup
2.1 Software/Firmware requirements ................................................................. 12
2.2 MPLABX Project: .......................................................................................... 12
Chapter 3. Demo Setup
3.1 Running the Motion demo ............................................................................ 15
3.2 Calibrating Sensors ..................................................................................... 16
3.2.1 Calibration Mode ....................................................................................... 16
3.2.2 One-time Calibration Mode ....................................................................... 17
3.3 Sensor Data Display ..................................................................................... 19
3.4 Sleep/Wake .................................................................................................. 19
3.5 Flash Update ................................................................................................ 20
3.5.1 Flash Update command ............................................................................ 20
3.5.2 Flash Configuration Update Command ..................................................... 22
3.5.3 Flash Corruption Recovery ........................................................................ 28
3.6 FREEFALL Mode ......................................................................................... 29
Chapter 4. Troubleshooting
4.1 Failure to Display Welcome Screen ............................................................. 32
4.2 Error Handling .............................................................................................. 33
4.2.1 General Error Handling for VREG Functions ............................................. 33
2
4.2.2 I
4.2.3 Error Definitions (from source/headers/err.h) ............................................ 35
C Error Handling .................................................................................... 34
2014 - 2016 Microchip Technology Inc. DS50002322E-page 4
Appendix A. Code Structure
A.1 Directory structure ........................................................................................ 36
A.2 Program Flow ............................................................................................... 38
A.2.1 Main.c ....................................................................................................... 38
A.2.2 Configuring and Initializing MM7150 Motion Module ................................ 38
A.2.3 Enabling Sensors and Reading data ........................................................ 39
Appendix B. Reference Schematic & Bill of Materials
B.1 MM7150 Motion Module PICtail TM Plus Evaluation Board .......................... 40
B.1.1 Bill of Materials .......................................................................................... 40
B.1.2 Reference Schematic ................................................................................ 40
Appendix C. Extension Cable for Explorer 16
C.1 Signals Connection ...................................................................................... 42
Worldwide Sales and Service .................................................................................... 43
2014 - 2016 Microchip Technology Inc. DS50002322E-page 5
MM7150 MOTION MODULE PICTAILTM PLUS
EVALUATION BOARD (#AC243007)
WITH EXPLORER 16 DEVELOPMENT BOARD
USER’S GUIDE

Preface

NOTICE TO CUSTOMERS
All documentation becomes dated, and this manual is no exception. Microchip tools and documentation are constantly evolving to meet customer needs, so some actual dialogs and/or tool descriptions may differ from those in this document. Please refer to our web site (www.microchip.com) to obtain the latest documentation available.
Documents are identified with a “DS” number. This number is located on the bottom of each page, in front of the page number. The numbering convention for the DS number is “DSXXXXXA”, where “XXXXX” is the document number and “A” is the revision level of the document.
For the most up-to-date information on development tools, see the MPLAB Select the Help menu, and then Topics to open a list of available online help files.
®
IDE online help.

INTRODUCTION

This chapter contains general information that will be useful to know before using the MM7150 Motion Module PICtail Explorer 16 development board (#DM240001) to run the demo and sample code. Items discussed in this chapter include:
Document Layout
Audience
Reference Documents
Glossary
The Microchip Web Site
Development Systems Customer Change Notification Service
Customer Support
Document Revision History

DOCUMENT LAYOUT

This document describes how to use the MM7150-PICtail with Explorer 16 Development Board to perform the demo and modify sample code. The manual layout is as follows:
Chapter 1. “Hardware Setup” – Provides hardware setting information.
Chapter 2. “Software/Firmware Setup” – Provides software and firmware set-
ting and build information.
Chapter 3. “Demo Setup” – Includes demonstration procedures.
Chapter 4. “Troubleshooting” – Provides troubleshooting information.
Appendix A. “Code Structure” – Provides sample code structure information.
TM
Plus Evaluation Board (#AC243007) with the
2014 - 2016 Microchip Technology Inc. DS50002322E-page 6
Appendix B. “Reference Schematic & Bill of Materials” – Provides
MM7150-PICtail adapter reference schematic & bill of materials information.
Appendix C. “Extension Cable for Explorer 16” – Provides signals connection
information for building a custom extension cable to use with MM7150-PICtail.

AUDIENCE

This document is written for developers who are familiar with 9-axis motion sensor applications. The purpose of this document is to describe the functions and use of the MM7150-PICtail with Explorer 16 Development Board to perform the demos and mod­ify sample code functions as described in the Host API Design for MM7150 Application Note.

REFERENCE DOCUMENTS

• DS00001885A - SSC7150 Motion Coprocessor Data Sheet
• DS00001888A - MM7150 Motion Module Data Sheet
• DS00001873A - Host API Design for MM7150 Motion Module Application Note
Note: Please contact your Microchip representative for the above documents and
availability.
Preface

GLOSSARY

This section describes glossary terms and acronyms used in this document.
TERM DEFINITION
EVB Evaluation Board
HID Human Interface Device
2
I
C Inter-Integrated Circuit
USB Universal Serial Bus
EC Embedded Controller
SF Sensor Fusion

THE MICROCHIP WEB SITE

Microchip provides online support via our web site at www.microchip.com. This web site is used as a means to make files and information easily available to customers. Accessible by using your favorite Internet browser, the web site contains the following information:
Product Support – Data sheets and errata, application notes and sample
programs, design resources, user’s guides and hardware support documents, latest software releases and archived software
General Technical Support – Frequently Asked Questions (FAQs), technical
support requests, online discussion groups, Microchip consultant program member listing
Business of Microchip – Product selector and ordering guides, latest Microchip
press releases, listing of seminars and events, listings of Microchip sales offices, distributors and factory representatives
2014 - 2016 Microchip Technology Inc. DS50002322E-page 7
MM7150 Motion Module PICtailTM Plus Evaluation Board (#AC243007) with Explorer 16 Development Board User’s Guide

DEVELOPMENT SYSTEMS CUSTOMER CHANGE NOTIFICATION SERVICE

Microchip’s customer notification service helps keep customers current on Microchip products. Subscribers will receive e-mail notification whenever there are changes, updates, revisions or errata related to a specified product family or development tool of interest.
To register, access the Microchip web site at www.microchip.com, click on Customer Change Notification and follow the registration instructions.
The Development Systems product group categories are:
Compilers – The latest information on Microchip C compilers, assemblers, linkers
and other language tools. These include all MPLAB C compilers; all MPLAB assemblers (including MPASM assembler); all MPLAB linkers (including MPLINK object linker); and all MPLAB librarians (including MPLIB object librarian).
Emulators – The latest information on Microchip in-circuit emulators.This
includes the MPLAB REAL ICE and MPLAB ICE 2000 in-circuit emulators.
In-Circuit Debuggers – The latest information on the Microchip in-circuit
debuggers. This includes MPLAB ICD 3 in-circuit debuggers and PICkit 3 debug express.
MPLAB IDE – The latest information on Microchip MPLAB IDE, the Windows
Integrated Development Environment for development systems tools. This list is focused on the MPLAB IDE, MPLAB IDE Project Manager, MPLAB Editor and MPLAB SIM simulator, as well as general editing and debugging features.
Programmers – The latest information on Microchip programmers. These include
production programmers such as MPLAB REAL ICE in-circuit emulator, MPLAB ICD 3 in-circuit debugger and MPLAB PM3 device programmers. Also included are nonproduction development programmers such as PICSTART Plus and PIC-kit 2 and 3.

CUSTOMER SUPPORT

Users of Microchip products can receive assistance through several channels:
• Distributor or Representative
• Local Sales Office
• Field Application Engineer (FAE)
• Technical Support
Customers should contact their distributor, representative or field application engineer (FAE) for support. Local sales offices are also available to help customers. A listing of sales offices and locations is included in the back of this document.
Technical support is available through the web site at:
http://www.microchip.com/support
DS50002322E-page 8  2014 - 2016 Microchip Technology Inc.

DOCUMENT REVISION HISTORY

Revision Correction
DS500002322E (11-18-16)
DS500002322D (08-18-15)
DS500002322C (07-02-15)
DS50002322B (02-18-15)
DS50002322A (11-07-14) Initial Release
• Updated information for sample code version 1.4.0
• Removed PIC24 Legacy PLib and replace with MCC
• Added section 3.5.3 for Flash Corruption Recovery
• Added Acc Range 4G/8G/16G configuration in section 3.5.2
• Updated information for sample code version 1.3.4
• Added section 3.6 “Free Fall Mode”
• Updated section 4.2.3 error code
• Added section 3.2 “Calibrating Sensors”
• Added section 3.5.2 “Flash Configuration Update” feature
• Added Appendix C “Extension Cable” info
• Updated all pictures with latest production MM7150-PICtail
• Updated all figures for sample code v1.3.3
• Added section 3.4 for Sleep/Wake feature
• Added section 3.5 for Flash Update feature, update corresponding sections
• Changed UART baud rate from custom 125000 to standard 19200
• Updated all the figures to show the v1.3.2 sample code
• Updated the correct Document Numbers in the Reference Section
• Added section 1.1 for hardware requirements
• Added section 2.1 for software/firmware requirements
• Section 3.2 “Calibrating Sensors” removed
Preface
2014 - 2016 Microchip Technology Inc. DS50002322E-page 9
MM7150 MOTION MODULE PICTAILTM PLUS
EVALUATION BOARD (#AC243007)
WITH EXPLORER 16 DEVELOPMENT BOARD

Chapter 1. Hardware Setup

1.1 HARDWARE REQUIREMENTS

• Microchip Explorer 16 Development Board
• Microchip MM7150-PICtail Motion Module PICtail Board
• Microchip PICKit3 or ICD3 or RealICE debugger
• Null-Modem Serial Cable
• USB-to-Serial Adapter

1.2 PREPARING THE EXPLORER 16 DEVELOPMENT BOARD

• Insert PIM PIC24FJ128GA010 at Explorer 16 U1A socket
• Insert strap J7 for PIC24
• S2 switch selected for PIM
• Connect MPLAB ICD3 (or REAL ICE) In-Circuit Debugger module from HOST PC to JP1
• Connect USB-to-Serial Adapter capable of 19200 baud rate from HOST USB Port to Explorer 16 P1
- USB-to-Serial Adapter such as Microchip MCP2200 USB to RS232 Demo
Board (Microchip part#: MCP2200EV-VCP)
USER’S GUIDE
Note: Configure Terminal Emulation Software (ex. Tera Term) for 19200 baud, 8
bits, No Parity, 1 Stop Bit, No Flow Control.
• Power Supply (+9V) at J12

1.3 HARDWARE CONNECTIONS FOR MM7150-PICTAIL TO EXPLORER 16 BOARD

Note: Before attempting to connect the MM7150-PICtail with PICtail™ Plus Edge
connector module to the Explorer 16 board, it is crucial that the power sup­ply to the Explorer 16 be disconnected. Failure to do so may damage the MM7150 Motion Module.

1.3.1 Direct Plug-In

The MM7150-PICtail can be installed directly into the Explorer 16 Board. Insert the MM7150-PICtail into the PICtail™ header J5 with pin 1 of the module lining up with pin 1 of the header, as seen in Figure 1-1.
2014 - 2016 Microchip Technology Inc. DS50002322E-page 10
Hardware Setup
FIGURE 1-1: DIRECT CONNECTION OF MM7150-PICTAIL TO THE EXPLORER 16 PICTAIL™
HEADER.

1.3.2 Using Extension Cable

The MM7150-PICtail motion module can be connected to the Explorer 16 development board via a custom extension cable. Using an extension cable will allow freedom of movement compared with directly inserting the MM7150-PICtail board into the PICtail header on the Explorer 16 board.
Please see Appendix C. “Extension Cable for Explorer 16” for more information.
2014 - 2016 Microchip Technology Inc. DS50002322E-page 11
MM7150 MOTION MODULE PICTAILTM PLUS
WITH EXPLORER 16 DEVELOPMENT BOARD

Chapter 2. Software/Firmware Setup

2.1 SOFTWARE/FIRMWARE REQUIREMENTS

• Microchip MPLABX IDE v3.26 or later
• Microchip XC16 Compiler v1.26 or later
• Microchip MPLAB Code Configurator Plugin v3.16 or later
• MM7150_Exp16_Sample_Code_v1.4.0
Note: The latest sample code is available at www.microchip.com/motion or
please contact your Microchip representative for more information.
• SSC7150 Motion Coprocessor Firmware Binary
- The firmware can be updated using the flash update feature as described in
Section 3.5.1 “Flash Update command”.
- The firmware binary object code is encrypted and the update process is secured.
EVALUATION BOARD (#AC243007)
USER’S GUIDE
Note: The latest firmware binary file is available at www.microchip.com/motion or
please contact your Microchip representative for more information.
• MM7150 Module Configuration Firmware Binary
- The configuration data can be updated using the update feature as described in Section 3.5.2 “Flash Configuration Update Command”.

2.2 MPLABX PROJECT:

• Start MPLABX IDE as shown in Figure 2-1.
FIGURE 2-1: MPLABX IDE STARTUP SCREEN
2014 - 2016 Microchip Technology Inc. DS50002322E-page 12
Software/Firmware Setup
• File->Open Project Navigate to project directory and select Open Project as shown in Figure 2-2.

FIGURE 2-2: OPEN PROJECT

• Motion Demo Project Loaded as shown in Figure 2-3:

FIGURE 2-3: PROJECT IS OPENED

2014 - 2016 Microchip Technology Inc. DS50002322E-page 13
MM7150 Motion Module PICtailTM Plus Evaluation Board (#AC243007) with Explorer 16 Development Board User’s Guide
• With Explorer 16 power applied, make the project and download to Explorer 16 flash as shown in Figure 2-4:

FIGURE 2-4: SELECT DOWNLOAD OPTION

• Output screen during build process as shown in Figure 2-5:

FIGURE 2-5: BUILD PROCESS OUTPUT

DS50002322E-page 14  2014 - 2016 Microchip Technology Inc.
Loading...
+ 30 hidden pages