CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

accelerometer MMA7455L in I2c mode

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
olowo



Joined: 01 Sep 2010
Posts: 1
Location: Nigeria

View user's profile Send private message Yahoo Messenger

accelerometer MMA7455L in I2c mode
PostPosted: Wed Sep 01, 2010 4:05 pm     Reply with quote

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! Rolling Eyes
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Sep 01, 2010 4:27 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group