Need a hand with the BS2 Stamp + MMA7453 Accelerometer Module
bmthomsen
Posts: 4
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)
·· 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)
Comments
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
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
IC Layout Engineer
Parallax, Inc.
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
You bet! Glad you got it working.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.