Digilent 410-285P User Manual
Digilent Hardware
D
D
i
i
g
g
i
i
l
l
e
e
n
n
t
t
P
P
m
m
o
o
d
d
C
C
M
M
P
P
S
S
™
™
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: September 9, 2013
Note: This document applies to REV B of the board.
1300 NE Henley Court, Suite 3
Pullman, WA 99163
(509) 334 6306 Voice | (509) 334 6300 Fax
Doc: 502-285
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 Digilent PmodCMPS features the popular Honeywell HMC5883L 3-axis digital compass and can add
compass heading readings to any Digilent host board with an I
2
C interface.
Pmod CMPS Features Include:
•
I
2
C communication interface with daisy chain
connectors
•
±8 gauss field detection
•
external header for access to DRDY (data ready) pin
•
optional pull-up resistors for SCL and SDA pins
•
160 Hz maximum data output rate
Functional Description
The PmodCMPS can be configured to run in single
measurement or continuous measurement mode. Each
mode has different maximum output rates. The magnetic
field measured on each axis is represented as a signed 16-bit
word with the five most significant bits being the sign bits.
There are two eight bit registers for each axis. Once one data register is read, the other five data registers must
be read before any new data can be written to those registers.
The internal address pointer automatically increments when a register is successfully read from. Once the
address pointer is incremented past 0x09, it will roll over to 0x03, which represents the first axis output data
register.
I
2
C Interface
The PmodCMPS is an I
2
C slave device that is compatible with standard and fast modes (100 kHz and 400 kHz,
respectively). The 7-bit address of the PmodCMPS will be 0x1E. This address corresponds to 0x3C for a write
operation and 0x3D for a read operation. Details on the I
2
C operations are provided below:
Write
A write operation can be initiated with a Start condition on the I
2
C bus, followed by 0x3C. When writing to a
register, the desired registers address must be sent as the next byte after the PmodCMPS acknowledges that it
has been addressed. The bytes sent by the master to the PmodCMPS are shown below:
1.
7-bit addresss of the PmodCMPS + write bit (0)
2.
Address of internal register to write to
3.
Data