User manual

Basys MX3™ Board Reference Manual
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 28 of 56
10 Accelerometer
Basys MX3 provides an onboard accelerometer: NXP’s MMA8652FCR1. It is a 3-axis, 12-bit digital accelerometer,
exposing an I
2
C digital interface. It is possible to use its ACL_INT2 pin for raising a programmable interrupt.
The accelerometer is located on the top of the board; you can recognize the arrows that show the directions of the
three axes.
The Fig. 10.1 shows the way Accelerometer is controlled using digital signals.
Figure 10.1. Accelerometer schematic diagram.
10.1 Connectivity
The accelerometer is connected to SCL1 and SDA1 lines of the I
2
C1 interface. A general I/O signal is connected to
INT2 pin.
Schematic Name
PIC32 pin
Description
SCL
SCL1/RG2
I2C Clock signal
SDA
SDA1/RG3
I2C Data signal
ACL_INT2
RPG0/PMD8/RG0
Programmable Interrupt
Table 10.1. Accelerometer connectivity.
10.2 Functionality
To use the accelerometer, proper I
2
C communication (read, write) must be implemented over I
2
C1. The I
2
C1
interface must be initialized, and then accessed through read and write functions. The I
2
C device address of the
accelerometer is 0x1D.
Communication over the I
2
C is implemented in the ACL library of the Basys MX3 library pack. If the user wants to
use the accelerometer without the ACL library, they must implement their own I
2
C functions.
The accelerometer has a set of registers that can be written to configure the device and read to access the data
collected by the accelerometer.
Note that you can visualize the communication with the accelerometer by attaching a logic analyzer to the 8-pin
I
2
C connector, located on the top of the board.