Interfacing ADXL213 accelerometer with PIC16F84A

Thread Starter

ANN1

Joined Feb 15, 2010
1
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
 

beenthere

Joined Apr 20, 2004
15,819
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?
 

symqwerty

Joined Feb 22, 2010
31
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...!
 

BMorse

Joined Sep 26, 2009
2,675
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...!
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
 

symqwerty

Joined Feb 22, 2010
31

Markd77

Joined Sep 7, 2009
2,806
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.
 

Markd77

Joined Sep 7, 2009
2,806
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.
 
Top