P
Pm
mo
od
dG
GY
YR
RO
O
R
R
e
e
f
f
e
e
r
r
e
e
n
n
c
c
e
e
M
M
a
a
n
n
u
u
a
a
l
l
Revision: August 3, 2011
Note: This document applies to Rev. A of the board. 1300 NE Henley Court, Suite 3
Pullman, WA 99163
(509) 334 6306 Voice | (509) 334 6300 Fax
Doc: 502-215 page 1 of 2
Copyright Digilent, Inc. All rights reserved. Other product and company names mentioned may be trademarks of their respective owners.
Overview
The PmodGYRO is a peripheral module
featuring the STMicroelectronics® L3G4200D
MEMS motion sensor. The L3G4200D
provides a three-axis digital output gyroscope
with built in temperature sensor.
Features include:
Standard SPI and I
2
C™ interface
250/500/2000dps Selectable
Resolutions
Two customizable interrupt pins
Power-down and Sleep Mode
User configurable signal filtering
Functional Description
The PmodGYRO uses a standard 12-pin
connection and communicates via SPI or I
2
C,
defaulting to I
2
C communication. A pull-up
resistor on the CS line keeps the device in I
2
C
mode unless the CS line is driven low by the
master device
Interface
When communicating with the device the
master must provide a register address and a
flag specifying whether the subsequent action
is a read or write. The actual transfer of data
follows this command. Through this method,
the user can either configure the device by
writing to specific control registers within the
device, or read back data from separate read-
only registers.
Two interrupts directly map to pins available to
the user on connector J1 of the PmodGYRO.
The configuration of INT1, present on pin 7 of
J1, is entirely user customizable. The main use
of INT1 stems from high and low events on the
three axes about which the gyroscope
measures angular speed. By default, the INT1
is disabled. The second interrupt, INT2, is
primarily used for data ready and FIFO
interrupts and maps to pin 8 on J1.
For more information about the control
registers, data collection, and interrupt settings
available for user configuration, see the data
sheet for the L3G4200D on the
STMicroelectronics® website.
SPI Communication
The SPI interface uses three or four signal
lines for communication depending on the
current configuration of the device. These are
Chip Select (CS), Serial Data In (SDI) or
simply Serial Data (SDA) in 3-wire SPI mode,
Serial Data Out (SDO), and Serial Clock
(SCL). The PmodGYRO defaults to the 4-wire
operating mode. In order to use the 3-wire
mode, a control register must be written to. For
more detailed SPI communication, refer to the
device data sheet.
PmodGYRO™ Reference Manual
®
www.digilentinc.com
www.digilentinc.com Copyright Digilent, Inc. page 2 of 2
I
2
C Communication
The I
2
C standard uses two signal lines, I
2
C
data (SDA) and serial clock (SCL). The
device supports both standard, 100 kHz, and
fast, 400 kHz, serial clocks. In accordance
with I
2
C protocol, the L3G4200D has a device
specific 7-bit address used by the serial
master to communicate with multiple devices
on a data bus. The device uses the address
110100xb, where pin 3 on J1 (SDO/SA0)
defines the least-significant-bit (LSB). By
default, the LSB of the address while be ‘1’
due to a pull-up resistor on JP1 as shown by
the schematic available on the Digilent
website. While the default value is ‘1’, by
simply connecting pin 3 on J1 to the ground
rail the user can change the LSB to a ‘0’. This
user selectable bit enables two PmodGYROs
to be used on the same I
2
C bus. The data
sheet for the L3G4200D contains further
device specific I
2
C information.
SPI Commun
ications
Pin
Signal
Description
1 CS Chip Select
2 SDA/SDI/
SDO
Serial Data In
3 SDO/SA0
Serial Data
Out/LSB of I
2
C
Device
Address
4 SCL/SPC Serial Clock
5 GND Power Supply
Ground
6 VCC Power Supply
(3.3V)
7 INT1 Programmable
Interrupt
8 INT2 Data
Ready/FIFO
Interrupt
9 NC Not
Connected
10 NC Not
Connected
11 GND Power Supply
Ground
12 VCC Power Supply
(3.3V)
I
2
C Communication
Pin
Signal
Description
1 & 2 SCL/SPC Serial Clock
3 & 4 SDA/SDI/
SDO
Serial Data
5 & 6 GND Power
Supply
Ground
7 & 8 VCC Power
Supply
(3.3V)