PDA

View Full Version : Need a hand with the BS2 Stamp + MMA7453 Accelerometer Module



bmthomsen
11-02-2009, 05:52 PM
Hi, I apologize in advance for a noobish question....I'm trying to get this sensor to work with the BS2 Stamp kit for a class project, ·and I'm having trouble getting it to do anything. I have it wired up per the instructions in the demo PBASIC program (link below), and the X, Y, and Z values show up in the debug window as -1, and don't change. Checking with a logic probe shows correct voltage levels at Vin and Ground, and signals at the CLK, DATA, and CS pins. This is what the debug window shows:

·· MMA7455 3-Axis Accelerometer BS2 DEMO #1
···················· 8-Bit 2g Mode ; 64 LSB/g
···················· X=-1
···················· Y=-1
···················· Z=-1

I'm not sure what else to check. Anyone have any ideas?

Thx, Brian


(http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/Accelerometer/List/0/SortField/4/ProductID/585/Default.aspx)

Beau Schwabe
11-03-2009, 01:19 AM
bmthomsen,

Double check your wiring to the MMA7455 Accelerometer refering to the documentation found here...
www.parallax.com/Portals/0/Downloads/docs/prod/sens/28526-MMA7455-3axisAccel-v1.1.pdf (http://www.parallax.com/Portals/0/Downloads/docs/prod/sens/28526-MMA7455-3axisAccel-v1.1.pdf)

If you run the BS2 program without an Accelerometer connected at all and pull the Data line LOW, then X,Y, and Z will all read "-1".

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.

bmthomsen
11-03-2009, 02:01 PM
I double checked my wiring and found where I was confused...

The intro to the demo program gives the following instruction:

' o Connect P0, P1, AND P2 ON the Stamp directly TO the CS, DATA, AND CLK
'·· ·pins ON the Digital 3-Axis Accelerometer module.

The pins are defined as:

CLKPin··· ·PIN 0···· ' Clock Pin
DATAPin·· PIN 1···· ' Data Pin
CSPin····· ·PIN 2···· ' Chip Select Pin



So I had them wired backwards. I corrected this and am now getting data out of the sensor. Thanks for pointing me in the right direction.



-Brian

Beau Schwabe
11-03-2009, 04:48 PM
bmthomsen,

You bet! Glad you got it working.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe (mailto:bschwabe@parallax.com)

IC Layout Engineer
Parallax, Inc.