Please, I'm supposed to work with 10 accelerometers MMA7455L in standard I2C mode as a slave to a master PIC 18f2221. This accelerometer is a new one and it requires some configurations. Since it is not a PIC MCU, I don't know how to go about it. Though I have studied the data sheet, I still need to understand practically how to configure the accelerometer. I really need help!
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Wed Sep 01, 2010 4:27 pm
This code looks like it will work, based on a quick reading of the
MMA7455L data sheet:
http://www.ccsinfo.com/forum/viewtopic.php?t=38728
This code sets it up to be in "2g" sensitivity mode, and it only looks at
the Z-axis, so presumably you would test it by moving the MMA7455L
chip up and down rapidly.
Also, he uses a 'goto' statement and a 'loop' label. I would have used
a while(1) loop instead. Let's get into C programming and not revert
to ASM style.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum