Trouble interfacing ADXL345/375 accelerometer


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Trouble interfacing ADXL345/375 accelerometer

    Try to set define OSC 8. The OSC needs to be in caps.

  2. #2
    Join Date
    Jan 2009
    Location
    Huntsville, AL
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: Trouble interfacing ADXL345/375 accelerometer

    It was communicating with the terminal program at 9600 baud without a problem... wouldn't it have spouted gibberish if it didn't use 8Mhz? I'll use uppercase to be safe.

    But I think I figured out the problem... I was communicating with the clock pin idling low... it should have been idling high. Therefore the pic was not shifting the right data or the right register address to the ADXL375, and so it never got into measurement mode. After I changed it to idle high, I started getting values that looked meaningful (but very noisy!), although I think that's just because I don't have any filtering on the power supply or at the IC pins (just wanted to get it working). I'll try that next.

    Dave

  3. #3
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Trouble interfacing ADXL345/375 accelerometer

    Are you using internal oscillator?

  4. #4
    Join Date
    Jan 2009
    Location
    Huntsville, AL
    Posts
    41


    Did you find this post helpful? Yes | No

    Default Re: Trouble interfacing ADXL345/375 accelerometer

    It's using an external crystal with the "HS" oscillator setting.

    After adding some caps, the output is much better and it's clearly exporting acceleration data correctly. Flipping it around on all axes show the expected +/-1g change. The offsets are rather large (+3g in some axis), but that can be adjusted/calibrated.

Similar Threads

  1. ADXL345 Accelerometer using I2C
    By Terry in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th August 2015, 19:23
  2. Replies: 1
    Last Post: - 12th November 2011, 20:05
  3. accelerometer question
    By griffin in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 27th February 2009, 22:00
  4. ST micro LIS3LV02DL accelerometer interfacing
    By devil6600 in forum Serial
    Replies: 8
    Last Post: - 17th May 2008, 16:29
  5. Adxl213ae Accelerometer
    By DougB in forum mel PIC BASIC
    Replies: 0
    Last Post: - 25th July 2005, 22:32

Members who have read this thread : 1

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