View previous topic :: View next topic |
Author |
Message |
syahrul.s
Joined: 09 Nov 2007 Posts: 6
|
ADXL 202JQE and PIC16F877A |
Posted: Tue Nov 13, 2007 2:47 am |
|
|
Hi
Just want to get a confirmation; is it correct to connect Pin10 (Xout) of ADL202JQE to pin16 and pin17 (wired together) of PIC16F877A? I'm trying to get the acceleration (in terms of g's) which is calculated using the pulse width from CCP1 (pin16) and CCP2(pin17) of the PIC.
Another thing is, I already used the pins 16 and 17 in the programming to calculate speed. Can I still use those pins again for the accelerometer ADXL202JQE?
Thanks |
|
![](templates/subSilver/images/spacer.gif) |
rberek
Joined: 10 Jan 2005 Posts: 207 Location: Ottawa, Canada
|
|
Posted: Tue Nov 13, 2007 6:48 am |
|
|
Why are you hooking the X output of this sensor to 2 CCP inputs? You only need one CCP module to calculate acceleration from this sensor.
And by saying you are already using these CCP inputs to calculate speed, are you implying there is another sensor hooked to these pins?
r.b. |
|
![](templates/subSilver/images/spacer.gif) |
syahruls Guest
|
|
Posted: Tue Nov 13, 2007 9:00 pm |
|
|
Why are you hooking the X output of this sensor to 2 CCP inputs? You only need one CCP module to calculate acceleration from this sensor.
And by saying you are already using these CCP inputs to calculate speed, are you implying there is another sensor hooked to these pins?
yes..I already used those CCP inputs for another sensor. So this means I can't use those pins anymore. Is it?
Btw, those CCP inputs are wired together for the use of the 1st sensor. |
|
![](templates/subSilver/images/spacer.gif) |
syahrul.s
Joined: 09 Nov 2007 Posts: 6
|
|
Posted: Tue Nov 13, 2007 9:03 pm |
|
|
Since the CCP pins are already used, do I need another microcontroller for the accelerometer? |
|
![](templates/subSilver/images/spacer.gif) |
rberek
Joined: 10 Jan 2005 Posts: 207 Location: Ottawa, Canada
|
|
Posted: Tue Nov 13, 2007 9:14 pm |
|
|
You can't just wire the outputs of two sensors together and feed them into one pin. Besides the serious electrical issues that would occur when the outputs of different chips are wired together, the combined signal would be garbage.
You are going to have to use a device with more CCP modules, or multiplex the two sensor signals, or look at accelerometers which have analog, rather than PWM outputs. |
|
![](templates/subSilver/images/spacer.gif) |
|