3-Axis Accelerometer (LIS302DL)


Closed Thread
Results 1 to 21 of 21

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Post LIS302DL demo with bar graphics. Var so god!

    Here is an updated demo code for LIS302DL with Nokia 3310 LCD. This shows all three axis with bar graphics and numbers.

    Also small video clip, which shows how the system works (I'm rotation PIC and LIS302DL in my hand) http://kotiweb.kotiportti.fi/karl-er...C/LIS302DL.wmv.

    My test bench for accelerometer (add-on board) http://kotiweb.kotiportti.fi/karl-er...d_LIS302DL.gif.

    And here is the code.

    BR,
    -Gusse-

    EDIT: If your screen is too light or too dark then tune "Contrast" value. I have noticed that there are differences between new and old 3310 LCD displays (tested both).
    Attached Files Attached Files
    Last edited by Gusse; - 22nd January 2009 at 13:27. Reason: Guidance added

  2. #2
    Join Date
    Feb 2009
    Posts
    4


    Did you find this post helpful? Yes | No

    Default lis302dl not working

    my lis302dl is not working properly.....no matter which register i tried to read, the data is always 0xFF....shouldnt be right according to the datasheet....even the Who_AM_I register gave me 0xFF...BTW the sensor was working few days a ago. is it detected?help.....

  3. #3
    Join Date
    Feb 2009
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    I am using PIC16f877 to interface with LIS302DL. I browsed through some threads available over the net. They said we need to add pullups at the data lines and SCL. why? I dont include any pullups. i just directly connect the sensor to the PIC. anything wrong?

  4. #4
    Join Date
    Feb 2009
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    SPI is used for my case

  5. #5
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Post

    Can you share your schematic and code?

    I'm not so familiar with SPI interface, but could you change LIS302DL to I2C mode (pin7, CS tight to VCC and pin12 GND) and try to read registers then? Then pull-ups are needed (4k7 for both CLK and SDA).

    -Gusse-
    Last edited by Gusse; - 4th February 2009 at 12:09.

  6. #6
    Join Date
    Feb 2009
    Posts
    4


    Did you find this post helpful? Yes | No

    Default

    sry, i forgot to mention that the sensor was working before. I read the datasheet again. i noticed that the absolute max rating for Vin (input voltage for all control pins) is from -0.3v to VDD_IO+0.3 v. I hooked up VDD-IO to 3v. so based on the max rating, the input voltage should be no more than 3.3v. But the output high voltage from PIC is ard 4.5v. Could this be the reason that the sensor stops working?

  7. #7
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Post

    It might be that device get damaged if Vdd_IO is too much higher than Vdd (spec says Vdd + 0.1V). On the otherhand, I have used 5V (4.95V) for both Vdd and Vdd_IO without any problems or damages, PIC is also running on 5V. Absolute maximum voltage for LIS302DL is +6V (both Vdd and Vdd_IO).

    Can you measure how much current accelerometer is taking from supply?

    -Gusse-
    Last edited by Gusse; - 4th February 2009 at 15:22.

Similar Threads

  1. Replies: 4
    Last Post: - 15th April 2009, 01:54
  2. 3 HPWM channels
    By docwisdom in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 4th April 2006, 02:43
  3. having problems with Hantronix 20x4 lcd
    By Rhatidbwoy in forum mel PIC BASIC Pro
    Replies: 16
    Last Post: - 22nd December 2005, 12:22
  4. Someone help me to simplify this
    By thrix in forum General
    Replies: 4
    Last Post: - 21st February 2004, 05:01
  5. Help wanted..
    By thrix in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 17th February 2004, 23:44

Members who have read this thread : 2

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts