Download MOD-MMA7260Q User Manual

Transcript
MOD-MMA7260Q development board
Users Manual
All boards produced by Olimex are ROHS compliant
Document revision B, October 2012
Copyright(C) 2011, OLIMEX Ltd, All rights reserved
Page 1
INTRODUCTION
MOD-MMA7260Q is 3-axes accelerometer and measure the accelerations in
X Y and Z axis with range +-1.5 g to 6 g.(software selectable sensitivity). Adding the
ARM7 with USB interface and the serial flash memory open up possibilities to implement a lot of interesting projects with this small board. The original idea for this
board was inspired by the movie Minority Report where Tom Cruise instead of
mouse used his hands to interface with the computers from the future. Searching
the net for more info on this subject we found similar project here. It looks not bad
but the accelerometers used are 2 axis and the whole project was done too complex.
Our goal was to make so small PCB which to be able to attach to your finger and
with mini USB connector to be able to connect to any PC running Windows and to
use it as 3d mouse i.e. moving your finger left - right-up-down to move your mouse
cursor and if you move your finger toward the screen to make the mouse "click" action.
This of course doesn't limit the applications of this board other cool application to
be made is for instance car performance logger: as we have the acceleration and
have microcontroller which can measure the time we can easily compute the velocity V = A * t, then the distance S = V * t and as the accelerometer is 3-axis we can
calculate at what distance in 3D space the object moves. If we know your car mass
we can calculate the force applied F = m * A and from this we can calculate your
real car power P = V * A, so having this little board inside your car and knowing
your car mass you can have calculated in real time your car characteristics: Acceleration (0-100 kmh / 0-60mph), Braking distance, Horsepower, etc etc and remember
these are the actual measurements on your car not catalog data. Yet another application is to measure the vibrations and shock on objects, for instance put one such
device with battery power supply inside your parcel before send it by FedEx and
then the recipient dump the info logged - what time it took, what velocity parcel
had, did they drop it on the floor (i.e. at what max shock it was exposed), what time
it was actually moved and with what speed, how many time it stayed rest i.e. it
didn't moved and you can evaluate the different couriers efficiency this way?
BOARD FEATURES
•
MMA7260Q 3-axis accelerometer from Freescale Semiconductor Inc.
measure +-1.5 g - 6 g
•
AT91SAM7S64 ARM7 microcontroller
•
AT45DB011 1Mbit serial flash for data logging
•
mini USB connector
•
PCB: FR-4, 1.5 mm (0,062"), soldermask, white silkscreen component
print
•
Dimensions: 40x20 mm (1.57 x 0.78")
Page 2
ELECTROSTATIC WARNING
The MOD-MMA7260Q board is shipped in protective anti-static packaging. The
board must not be subject to high electrostatic potentials. General practice for
working with static sensitive devices should be applied when working with this
board.
BOARD USE REQUIREMENTS
Cables: USB-Mini cable is need as this board used power supply from the USB.
PROCESSOR FEATURES
MOD-MMA7260Q board use ARM7TDMI® ARM® Thumb® Processor
AT91SAM7S64 from Atmel Corporation with these features:
–
Incorporates the ARM7TDMI® ARM® Thumb® Processor
- High-performance 32-bit RISC Architecture
- High-density 16-bit Instruction Set
- Leader in MIPS/Watt
- Embedded ICE In-circuit Emulation, Debug Communication Channel
Support
–
64 Kbytes of Internal High-speed Flash, Organized in 512 Pages of 128 Bytes
- Single Cycle Access at Up to 30 MHz in Worst Case Conditions, Prefetch
Buffer Optimizing Thumb Instruction Execution at Maximum Speed
- Page Programming Time: 4 ms, Including Page Auto-erase, Full Erase Time:
10 ms
- 10,000 Write Cycles, 10-year Data Retention Capability, Sector Lock
Capabilities, Flash Security Bit
- Fast Flash Programming Interface for High Volume Production
–
16 Kbytes of Internal High-speed SRAM, Single-cycle Access at Maximum
Speed
–
Memory Controller (MC)
- Embedded Flash Controller, Abort Status and Misalignment Detection
–
Reset Controller (RSTC)
- Based on Power-on Reset and Low-power Factory-calibrated Brownout
Detector
- Provides External Reset Signal Shaping and Reset Source Status
–
Clock Generator (CKGR)
- Low-power RC Oscillator, 3 to 20 MHz On-chip Oscillator and one PLL
–
Power Management Controller (PMC)
Page 3
- Software Power Optimization Capabilities, Including Slow Clock Mode
(Down to 500 Hz) and Idle Mode
- Three Programmable External Clock Signals
–
Advanced Interrupt Controller (AIC)
- Individually Maskable, Eight-level Priority, Vectored Interrupt Sources
- Two External Interrupt Sources and One Fast Interrupt Source, Spurious
Interrupt Protected
–
Debug Unit (DBGU)
- 2-wire UART and Support for Debug Communication Channel interrupt,
Programmable ICE Access Prevention
–
Periodic Interval Timer (PIT)
- 20-bit Programmable Counter plus 12-bit Interval Counter
–
Windowed Watchdog (WDT)
- 12-bit key-protected Programmable Counter
- Provides Reset or Interrupt Signals to the System
- Counter May Be Stopped While the Processor is in Debug State or in Idle
Mode
–
Real-time Timer (RTT)
- 32-bit Free-running Counter with Alarm
- Runs Off the Internal RC Oscillator
–
One Parallel Input/Output Controller (PIOA)
- Thirty-two Programmable I/O Lines Multiplexed with up to Two Peripheral
I/Os
- Input Change Interrupt Capability on Each I/O Line
- Individually Programmable Open-drain, Pull-up resistor and Synchronous
Output
–
Eleven Peripheral DMA Controller (PDC) Channels
–
One USB 2.0 Full Speed (12 Mbits per second) Device Port
- On-chip Transceiver, 328-byte Configurable Integrated FIFOs
–
One Synchronous Serial Controller (SSC)
- Independent Clock and Frame Sync Signals for Each Receiver and
Transmitter
- I²S Analog Interface Support, Time Division Multiplex Support
- High-speed Continuous Data Stream Capabilities with 32-bit Data Transfer
–
Two Universal Synchronous/Asynchronous Receiver Transmitters
(USART)
- Individual Baud Rate Generator, IrDA Infrared Modulation/Demodulation
- Support for ISO7816 T0/T1 Smart Card, Hardware Handshaking, RS485
Support
- Full Modem Line Support on USART1
Page 4
–
One Master/Slave Serial Peripheral Interface (SPI)
- 8- to 16-bit Programmable Data Length, Four External Peripheral Chip
Selects
–
One Three-channel 16-bit Timer/Counter (TC)
- Three External Clock Inputs, Two Multi-purpose I/O Pins per Channel
- Double PWM Generation, Capture/Waveform Mode, Up/Down Capability
–
One Four-channel 16-bit PWM Controller (PWMC)
–
One Two-wire Interface (TWI)
- Master Mode Support Only, All Two-wire Atmel EEPROMs Supported
–
One 8-channel 10-bit Analog-to-Digital Converter, Four Channels
Multiplexed with Digital I/Os
–
IEEE 1149.1 JTAG Boundary Scan on All Digital Pins
–
5V-tolerant I/Os, including Four High-current Drive I/O lines, Up to 16mA
Each
–
Power Supplies
- Embedded 1.8V Regulator, Drawing up to 100 mA for the Core and External
Components
- 3.3V VDDIO I/O Lines Power Supply, Independent 3.3V VDDFLASH Flash
Power Supply
- 1.8V VDDCORE Core Power Supply with Brownout Detector
–
Fully Static Operation: Up to 55 MHz at 1.65V and 85°C Worst Case
Conditions
Page 5
BLOCK DIAGRAM
Page 6
INTERNAL MEMORY MAP
Step by step programming instruction for OLIMEX MOD-MMA7260
board:
1) Install latest SAM-BA which can be downloaded from Atmel's web-site
2) Solder TEST jumper
3) Connected the module to mini USB cable
4) Wait 10 seconds
5) Disconnect the module from the mini USB cable
6) Unsolder TEST jumper
7) Connect the module to the mini USB cable again
8) When asked for drivers point to the driver folder in SAM-BA installation directories
9) Start SAM-BA
10) Choose the correct settings - COM port from device manager and at91sam7s64 controller
11) Click connect
12) Load MOD_MMA.bin from already downloaded ZIP and program the board
There is good help file on how to install the the drivers located in the SAM-BA folder. More
specifically it is located in the /doc subfolder.
If you need hex to bin converter software there are a lot of free tools available in the web. Choose the
one that best suits your needs (depending on operating system, architecture, etc.)
Page 7
Page 8
USB
USB
33p
C3
R5
R4
27
27
C2
15p
1nF
10nF
C29
R9
1.5K
+
C26
15p
C1
C30
2.2uF
1n
R8
10K
R7
560
3.3V
100n
C9
C21
100n
C10
100n
3.3V
RST
PWR
C23
C22
100n
C15
100n
C25
2.2uF
C24
100n
GND
RESET 1
3
VBUS
DD+
GND
R15
1.5K
3.3V
http://www.olimex.com/dev
2 VCC
U5
MCP130T
47uF/6.3V
C13
VCC
100n
C6
100n
C7
C28
10p
C27
10p
3.3V
100n
C4
2
17
46
60
12
24
54
64
8
18
45
58
59
7
62
63
56
57
50
53
33
49
51
40
39
55
Q1 61
18.432MHz
RST
1
COPYRIGHT(C) 2006, OLIMEX Ltd.
Rev. B
R21
390/1%
R20
240/1%
3.3V
TEST
100n
10uF/16V
C11
OUT
ADJ/GND
IN
VR1(3.3V)
LM1117
2
C12
+
MOD-MMA7260Q
VIN
AT91SAM7S64
GND1
GND2
GND3
GND4
VDDCORE1
VDDCORE2
VDDCORE3
VDDPLL
VDDOUT
VDDIO1
VDDIO2
VDDIO3
VDDFLASH
VDDIN
XOUT
XIN
PLLRC
DDM
DDP
JTAGSE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_OUT
Z_OUT
100n
R2
1k
R1
1k
3.3V
5
6
7
8
9
10 C8
11 100n
16
15
14
13
MISO
3.3V
SCHEMATIC
+
BOARD LAYOUT
POWER SUPPLY CIRCUIT
MOD-MMA7260Q is power supplied +5V (VIN) from USB.
RESET CIRCUIT
MOD-MMA7260Q reset circuit includes U5 (MCP130T), R8(10k) and
AT91SAM7S64 pin 39 (NRST).
Page 9
CLOCK CIRCUIT
Quartz crystal 18.432 MHz is connected to AT91SAM7S64 pin 61 (XOUT) and pin
62 (XIN).
JUMPER DESCRIPTION
TEST
This jumper, when closed, connects AT91SAM7S64 pin 40 (TST) to 3.3V.
Default state is opened.
LM/TL
When LM is shorted, AT91SAM7S64 pin 1 (ADVREF (MMA_VCC)) is connected to
3.3V.
When TL is shorted, AT91SAM7S64 pin 1 (ADVREF (MMA_VCC)) is connected to
VIN.
Default state is LM shorted.
INPUT/OUTPUT
Status Led (green) connected to AT91SAM7S64 pin 52 (PA31/NPCS1/PCK2).
Power-on LED (red) – this LED shows that +3.3V is applied to the board.
User button with name BUT connected to AT91SAM7S64 pin 16
(PA20/RF/IRQ0/AD3).
EXTERNAL CONNECTORS DESCRIPTION
USB connector
Pin #
Signal Name
1
VIN
2
DDM
3
DDP
4
NC
5
GND
Page 10
AVAILABLE DEMO SOFTWARE
–
3D mouse example
Page 11
ORDER CODE
MOD-MMA7260 - assembled and tested board
How to order?
You can pruchase directly from our web site or by any of our distributors.
Check our web www.olimex.com/dev for more info.
Revision history
Board - Revision B, October 2006
User manual - Revision A, February 2011 - Step by step programming instruction
for OLIMEX MOD-MMA7260 board – modified
User manual - Revision B, October 2012 - Step by step programming instructions for
OLIMEX MOD-MMA7260 board – modified; couple of links updated
Page 12
© 2012 Olimex Ltd. Olimex®, logo and combinations thereof, are registered trademarks of Olimex Ltd.
Other product names may be trademarks of others and the rights belong to their respective owners.
The information in this document is provided in connection with Olimex products. No license,
express or implied or otherwise, to any intellectual property right is granted by this document or in
connection with the sale of Olimex products.
It is possible that the pictures in this manual differ from the latest revision of the board.
The product described in this document is subject to continuous development and improvements. All
particulars of the product and its use contained in this document are given by OLIMEX in good faith.
However all warranties implied or expressed including but not limited to implied warranties of
merchantability or fitness for purpose are excluded. This document is intended only to assist the
reader in the use of the product. OLIMEX Ltd. shall not be liable for any loss or damage arising from
the use of any information in this document or any error or omission in such information or any
incorrect use of the product.
This evaluation board/kit is intended for use for engineering development, demonstration, or
evaluation purposes only and is not considered by OLIMEX to be a finished end-product fit for
general consumer use. Persons handling the product must have electronics training and observe good
engineering practice standards. As such, the goods being provided are not intended to be complete in
terms of required design-, marketing-, and/or manufacturing-related protective considerations,
including product safety and environmental measures typically found in end products that
incorporate such semiconductor components or circuit boards.
Olimex currently deals with a variety of customers for products, and therefore our arrangement with
the user is not exclusive. Olimex assumes no liability for applications assistance, customer product
design, software performance, or infringement of patents or services described herein.
THERE IS NO WARRANTY FOR THE DESIGN MATERIALS AND THE COMPONENTS USED
TO CREATE MOD-MMA7260. THEY ARE CONSIDERED SUITABLE ONLY FOR MODMMA7260.
Page 13