Change "shift" to "I2c" commends for stamp code of MMA7455L accelerometer
cheol
Posts: 6
Hi,
I got the example BASIC stamp code for MMA7455L 3 axis acceleromer sensor from Parallax store, which uses "Shift" commend to read and write into the sensor. Can anyone advise and comment (or modify) how I can change the code using "I2C" instead of "Shift"? I have Mobo board having BS2pe, which allow to use "I2C" commend, and I have experienced that "I2C" seems more simpler and straightforward. I am attaching the original codes and data sheet.
Thanks,
CalebMMA7455L 3-Axis Accelerometer Demo (PBasic) v1.0 DEMO#2.bs2FreescaleMMA7455LDeviceDocumentation.pdf
I got the example BASIC stamp code for MMA7455L 3 axis acceleromer sensor from Parallax store, which uses "Shift" commend to read and write into the sensor. Can anyone advise and comment (or modify) how I can change the code using "I2C" instead of "Shift"? I have Mobo board having BS2pe, which allow to use "I2C" commend, and I have experienced that "I2C" seems more simpler and straightforward. I am attaching the original codes and data sheet.
Thanks,
CalebMMA7455L 3-Axis Accelerometer Demo (PBasic) v1.0 DEMO#2.bs2FreescaleMMA7455LDeviceDocumentation.pdf
Comments
Thanks so much for the comment and code. it works! Somehow I couldn't make it work with shift...but it works with I2C.
Regards,
C
1) Parallax's demo programs are usually well tested. There have been occasional bugs, but they're rare. Double check your wiring.
2) It always helps to provide more information when posting a question or complaint on the forums. Include listings of your actual code and drawings of your wiring as attachments.
I just bought the new compass chip (HMC5883L) to use with my plain old BS2. I tried loading the [EMAIL="29133-CompassBS@Demo"]29133-CompassBS2Demo[/EMAIL] from the product page.
I get errors from the I2C commands.
Do I understand correctly that I have to change the I2C commands to shift commands for this to work with the BS2?
Can you give me an example?
This is just the opposite of the problem that cheol is having!!
Thanks,
MD