Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

ADXL 345 SPI

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AR7212
View previous topic :: View next topic  
Author Message
olive2222

Bascom Member



Joined: 31 May 2006
Posts: 88

belgium.gif
PostPosted: Sun Feb 06, 2011 6:30 pm    Post subject: ADXL 345 SPI Reply with quote

dears,

following Ben Advice (thank you Ben!) I post here under the link to my ADXL 345 issue posted on the AVR forum.

http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=9400

thanks,
Olivier
Back to top
View user's profile
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Sun Feb 06, 2011 7:40 pm    Post subject: SPI... Reply with quote

Perhaps also have a look at the Arduino forum.

And this I found about ADXL345 connected through SPI.

perhaps you can translate the SPI commands to Bascom-AVR.

http://carvingcode.blogspot.com/2010/07/balancebot-2.html

Have fun
Ben Zijlstra
Back to top
View user's profile Visit poster's website
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Sun Feb 06, 2011 7:49 pm    Post subject: I2c or SPI... Reply with quote

Checked the ADXL345 and are the I2c lines not the same as the SPI lines.
You could consider working with I2c instead of SPI.

And on this page you have some info how to detect it on your I2c-bus

http://members.home.nl/bzijlstra/software/examples/9DOF.htm

Hope you get it working
Ben Zijlstra
Back to top
View user's profile Visit poster's website
olive2222

Bascom Member



Joined: 31 May 2006
Posts: 88

belgium.gif
PostPosted: Sun Feb 06, 2011 8:36 pm    Post subject: Reply with quote

Thank you Ben,

I will have a look on Arduino code to find how the handle the ADXL.
Unfortunately I must keep it on the SPI bus, shared with a Flash memory.

Thanks again,
Olivier
Back to top
View user's profile
bzijlstra

Bascom Ambassador



Joined: 30 Dec 2004
Posts: 1179
Location: Tilburg - Netherlands

netherlands.gif
PostPosted: Mon Feb 07, 2011 8:25 am    Post subject: Fixed Reply with quote

From your first post in the Bascom-AVR part of this forum I understand that you got it fixed. Laughing

Have fun
Ben Zijlstra
Back to top
View user's profile Visit poster's website
olive2222

Bascom Member



Joined: 31 May 2006
Posts: 88

belgium.gif
PostPosted: Mon Feb 07, 2011 11:56 am    Post subject: Reply with quote

Yes, indeed Ben! it's working now!

Thanks!
Very Happy
Olivier
Back to top
View user's profile
gatetec

Bascom Member



Joined: 30 Jan 2012
Posts: 3

PostPosted: Sun Apr 08, 2012 8:15 pm    Post subject: Share your code Reply with quote

I have also problem with this.
Can you please share your code for ADXL 345?

BR
Jörgen
Back to top
View user's profile
olive2222

Bascom Member



Joined: 31 May 2006
Posts: 88

belgium.gif
PostPosted: Thu Apr 12, 2012 9:52 am    Post subject: Reply with quote

Hi Jörgen,

Sorry for my late answer. The original code is available (when logged) here under:

http://www.mcselec.com/index2.php?option=com_forum&Itemid=59&page=viewtopic&t=9400&highlight=adxl345

regards,

Olivier
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> AR7212 All times are GMT + 1 Hour
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
You cannot attach files in this forum
You cannot download files in this forum