CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

ADXL 202JQE and PIC16F877A

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
syahrul.s



Joined: 09 Nov 2007
Posts: 6

View user's profile Send private message

ADXL 202JQE and PIC16F877A
PostPosted: Tue Nov 13, 2007 2:47 am     Reply with quote

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
rberek



Joined: 10 Jan 2005
Posts: 207
Location: Ottawa, Canada

View user's profile Send private message

PostPosted: Tue Nov 13, 2007 6:48 am     Reply with quote

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.
syahruls
Guest







PostPosted: Tue Nov 13, 2007 9:00 pm     Reply with quote

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.
syahrul.s



Joined: 09 Nov 2007
Posts: 6

View user's profile Send private message

PostPosted: Tue Nov 13, 2007 9:03 pm     Reply with quote

Since the CCP pins are already used, do I need another microcontroller for the accelerometer?
rberek



Joined: 10 Jan 2005
Posts: 207
Location: Ottawa, Canada

View user's profile Send private message

PostPosted: Tue Nov 13, 2007 9:14 pm     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group