Interfacing ADXL213 accelerometer with PIC16F84A

Discussion in 'Embedded Systems and Microcontrollers' started by ANN1, Feb 15, 2010.

  1. ANN1

    Thread Starter New Member

    Feb 15, 2010
    1
    0
    Hello all,

    I need to interface PWM digital output of dual axis ADXL213 accelerometer to a PIC16F84A and calculate the acceleration. Can some1 kindly help me?

    Thanks
     
  2. beenthere

    Retired Moderator

    Apr 20, 2004
    15,815
    282
    Welcome to the forums.

    Your post really had nothing to do with the thread you placed it in, so you have your own now.

    What specific problem are you having?
     
  3. symqwerty

    Member

    Feb 22, 2010
    31
    0
    You need to use CCP module. I doubt that PIC16f84A have CCP module. You can check it out.

    What you need to do is to capture the value of free running timer when rising or falling edge detected. This is the basic idea. Before that, you need to have a basic knowledge of CCP module in PIC.

    hope this will help...!
     
  4. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234
    So why would you suggest the op use the CCP module if the Pic16F84A does not have one? Did you see his question?? :confused:



    ANN1:
    go here and check out the application notes, it shows how to connect to an 8 bit uc with limited computational power (such as the Pic16F84A).

    http://www.analog.com/en/sensors/inertial-sensors/adxl213/products/product.html
     
  5. symqwerty

    Member

    Feb 22, 2010
    31
    0
    becoz i never use PIC16f84a before and feel lazy to check the datasheet :)
     
  6. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    It is so many different PIC MCUs and options. It is not easy to keep track of them all.
     
  7. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    I'd recommend using the interrupt on change pins for the 2 inputs from the accelerometer. If you also have a timer0 interrupt which increments another file then you essentially have a 16 bit timer. You will probably need this for any decent sensitivity.
    Have a look at AN526 on the microchip site for 16bit maths examples.
     
  8. BMorse

    Senior Member

    Sep 26, 2009
    2,675
    234

    Well don't make suggestions based on assumptions, we are here to guide people in the right direction, not to confuse them more than what they already are.....:rolleyes:
     
  9. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    But the orginal poster should perhaps look at newer Microchip MCUs like the 16f628. If this is possible that is.
     
  10. Markd77

    Senior Member

    Sep 7, 2009
    2,803
    594
    The 628 is a far better chip but not really necessary.
    Although an antique and usually expensive the 16f84a is pretty good for getting the first few projects under the belt. It's lack of features is probably an advantage when learning (no ADC or comparitors to turn off, etc). When the OP requires more advanced features, memory etc then most of the experience is transferable.
    This project would require 2 CCP modules which most PICs don't have and it should be a good beginner project to do it manually.
     
Loading...