Comments on: LIS302DL. A 3 Axis Accelerometer https://blog.nearfuturelaboratory.com/2009/07/17/lis302dl-a-3-axis-accelerometer/ Clarify Today, Design Tomorrow Fri, 18 Aug 2017 18:01:34 +0000 hourly 1 https://wordpress.org/?v=5.5.1 By: julian https://blog.nearfuturelaboratory.com/2009/07/17/lis302dl-a-3-axis-accelerometer/#comment-512 Wed, 23 Mar 2011 16:26:48 +0000 http://www.nearfuturelaboratory.com/?p=3625#comment-512 In reply to safian.

Sorry, I can’t. Don’t have it. You should be able to translate it from the Arduino code, or code it using the Arduino and compile it and pick up the AVR code in one of the output directories that the Arduino SDK uses. The Arduino ultimately produces code that will run on an Atmega, so it should go into the standard AVR kits.

]]>
By: safian https://blog.nearfuturelaboratory.com/2009/07/17/lis302dl-a-3-axis-accelerometer/#comment-511 Sun, 20 Mar 2011 20:26:47 +0000 http://www.nearfuturelaboratory.com/?p=3625#comment-511 can u send me the sample code in cvavr of adxl320…..and also tell me the formula of calculating the acceleration of x-axis and y axis

]]>
By: Julian https://blog.nearfuturelaboratory.com/2009/07/17/lis302dl-a-3-axis-accelerometer/#comment-508 Sat, 07 Nov 2009 03:05:35 +0000 http://www.nearfuturelaboratory.com/?p=3625#comment-508 In reply to Amer Obeidah.

You may need to retreat into the specification sheet for the LIS302DL and level-up a bit on the technology. Many of these devices handle a number of communications protocols — I2C/TWI, SPI, Three-Wire. You choose which one you want to use — I generally go for TWI, aka Two-Wire/I2C, because it only uses two wires, and the Arduino and other ATMega’s can handle it out-of-the-box. The confusion can come in because the accelerometer (and other devices) use the same pin, but the spec sheets refer to it by a different name.

If you look at the LIS302DL specification sheet (http://www.st.com/stonline/products/literature/ds/12726.pdf) on the pin description table, you can see that pins 12, 13 and 14 are the ones you need to consider. For TWI, pin 13 is for the serial data (SDA, as its referred to) and pin 14 is for the serial clock (SCL). The way the protocol works is to first send the register address, bitwise as serial data, across SDA using SCL to clock it in, and then send the actual data to be written over SDA, again clocking using SCL. Conversely, if you’re reading data, you send the register address, then listen for the data that represents the data of that register as it clocks out over SDA.

SDA and SCL are the main communications lines for the TWI (Two-Wire Interface, aka I2C). SDA handles the addressing to the device in a serial fashion, and also the data sent or received. SCL is for clocking the data either way. The protocol is straightforward once you unpack how it works, which isn’t too hard. But, you’ll need to poke around in the specification sheet (for both the LIS302DL _and_ the ATMega328 to understand the protocol and how to get the accelerometer properly connected to the microcontroller.)

Here are some posts I did that may help:

http://www.nearfuturelaboratory.com/2008/05/29/logical-analysis/
http://www.nearfuturelaboratory.com/2007/01/11/arduino-and-twi/
http://www.nearfuturelaboratory.com/2008/06/21/logicport-overview/

]]>
By: Amer Obeidah https://blog.nearfuturelaboratory.com/2009/07/17/lis302dl-a-3-axis-accelerometer/#comment-507 Thu, 05 Nov 2009 03:35:44 +0000 http://www.nearfuturelaboratory.com/?p=3625#comment-507 hi every one,

I am really new to all of this and i am have so hard time figuring out how to do the wiring. i.e how to connect the LIS302DL to my Arduino ATMEGA328. On my LIS302DL I have Vcc, GND, MISI, MISO, CS, I2, and I2. Don’t laugh at me but I really do not know the meanings of all f the except for Vcc and GND. Looking around, many people mention SDA, SDO which I cannot see on the LIS302DL and I am doing a project for a class and I really need your help guys. I really appreciate if you tell how to do that step by step. Programming wise I have absolutely no problems since I am really good at it but connecting stuff.. that’s I am learning now.

Thanks so much in advance

]]>
By: Julian https://blog.nearfuturelaboratory.com/2009/07/17/lis302dl-a-3-axis-accelerometer/#comment-506 Tue, 28 Jul 2009 14:21:39 +0000 http://www.nearfuturelaboratory.com/?p=3625#comment-506 In reply to adyt.

I’m not sure what you mean? You want a sample of data? What data precisely? The I2C data stream?

]]>
By: adyt https://blog.nearfuturelaboratory.com/2009/07/17/lis302dl-a-3-axis-accelerometer/#comment-505 Tue, 28 Jul 2009 07:47:28 +0000 http://www.nearfuturelaboratory.com/?p=3625#comment-505 can you sent me, example data accelerometer if sensor moved, please….?

]]>
By: Julian Bleecker https://blog.nearfuturelaboratory.com/2009/07/17/lis302dl-a-3-axis-accelerometer/#comment-510 Sun, 19 Jul 2009 14:43:00 +0000 http://www.nearfuturelaboratory.com/?p=3625#comment-510 At some point…it proves useful….

]]>
By: Julian https://blog.nearfuturelaboratory.com/2009/07/17/lis302dl-a-3-axis-accelerometer/#comment-504 Sat, 18 Jul 2009 08:31:06 +0000 http://www.nearfuturelaboratory.com/?p=3625#comment-504 In reply to Alex J. Avriette.

What’s a piccolo.h file? What’s piccolo, anyway??

]]>
By: Alex J. Avriette https://blog.nearfuturelaboratory.com/2009/07/17/lis302dl-a-3-axis-accelerometer/#comment-503 Sat, 18 Jul 2009 07:23:06 +0000 http://www.nearfuturelaboratory.com/?p=3625#comment-503 A simple piccolo.h header file would have been nice rather than a file that talks via wire. I started writing one but got sidetracked when the vehicle I was using for telemetry suffered a catastrophic accident.

]]>
By: David Thompson https://blog.nearfuturelaboratory.com/2009/07/17/lis302dl-a-3-axis-accelerometer/#comment-509 Fri, 17 Jul 2009 15:29:00 +0000 http://www.nearfuturelaboratory.com/?p=3625#comment-509 I see you haven't forgotten our high school days…

]]>