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 support@ccsinfo.com

Accelerometer with Pic16f877

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
armando
Guest







Accelerometer with Pic16f877
PostPosted: Tue Jun 17, 2003 12:45 pm     Reply with quote

I am new to using PIC microcontrollers and I currently have this project to determine the angle and acceleration using an ADXL202AE. This device sends out a DCM signal which can be decoded and interpreted using a microcontroller. I know a little bit of C, however I don't know where to start on actually obtaining the signal and interpreting it. Please help.

thnx,
Armando
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515328
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

Re: Accelerometer with Pic16f877
PostPosted: Tue Jun 17, 2003 1:09 pm     Reply with quote

:=I am new to using PIC microcontrollers and I currently have this project to determine the angle and acceleration using an ADXL202AE. This device sends out a DCM signal which can be decoded and interpreted using a microcontroller. I know a little bit of C, however I don't know where to start on actually obtaining the signal and interpreting it. Please help.
:=
-----------------------------------------------------------

This chip outputs the acceleration as a PWM encoded signal.
So you need a method of measuring pulse widths. The PIC's
CCP module would be good for this. Look at the CCS example
file, EX_CCPMP.C. Do you have the CCS compiler ?
If not, that file is available online, here:
<a href="http://www.cc.puv.fi/~t0101190/projekti/source/Examples/" TARGET="_blank">http://www.cc.puv.fi/~t0101190/projekti/source/Examples/</a>

Analog Devices has a large number of appnotes on this device.
Go here, and look in the section on MEMS Technology:
<a href="http://www.analog.com/Analog_Root/sitePage/direct/applicationNotes/" TARGET="_blank">http://www.analog.com/Analog_Root/sitePage/direct/applicationNotes/</a>
Look at AN-604: Using the ADXL202 Duty Cycle Output

Also, AN-596, while not written for C, looks like it might
offer some useful tips.

Look at the CCS example file
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515330
armando
Guest







Re: Accelerometer with Pic16f877
PostPosted: Tue Jun 17, 2003 3:23 pm     Reply with quote

Thanks alot. The two sites were very helpful.
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515335
Kenny



Joined: 07 Sep 2003
Posts: 173
Location: Australia

View user's profile Send private message

Re: Accelerometer with Pic16f877
PostPosted: Tue Jun 17, 2003 6:11 pm     Reply with quote

<font face="Courier New" size=-1>:=I am new to using PIC microcontrollers and I currently have this project to determine the angle and acceleration using an ADXL202AE. This device sends out a DCM signal which can be decoded and interpreted using a microcontroller. I know a little bit of C, however I don't know where to start on actually obtaining the signal and interpreting it. Please help.
:=
:=thnx,
:=Armando

I have used a lot of these.
It is sometimes better to use the analog outputs at Xfilt and Yfilt into the PIC 10 bit A/D inputs. If low accelerations are to be measured then I use LM324 quad op-amps (one per axis) to boost the signal to suit the range of the A/D.
Spare op-amps are used to buffer an extra RC filter and restore the offset or zero adjustment.

The duty cycle modulator adds extra errors. It has a lower frequency response too but this is usually not a problem.

Another problem is separating tilt and acceleration. The acceleration response is reduced by the cosine of the angle to the axis and there will be a tilt component as well in the output if the device is not horizontal.

Good luck soldering them - the pads are under the package!
Regards
Kenny




</font>
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515339
Acid
Guest







Re: Accelerometer with Pic16f877
PostPosted: Wed Jun 18, 2003 12:57 am     Reply with quote

..Armando Do you know the chip for optical mouse..?
Bye

:=:=I am new to using PIC microcontrollers and I currently have this project to determine the angle and acceleration using an ADXL202AE. This device sends out a DCM signal which can be decoded and interpreted using a microcontroller. I know a little bit of C, however I don't know where to start on actually obtaining the signal and interpreting it. Please help.
:=:=
:=-----------------------------------------------------------
:=
:=This chip outputs the acceleration as a PWM encoded signal.
:=So you need a method of measuring pulse widths. The PIC's
:=CCP module would be good for this. Look at the CCS example
:=file, EX_CCPMP.C. Do you have the CCS compiler ?
:=If not, that file is available online, here:
:= <a href="http://www.cc.puv.fi/~t0101190/projekti/source/Examples/" TARGET="_blank"> <a href="http://www.cc.puv.fi/~t0101190/projekti/source/Examples/" TARGET="_blank">http://www.cc.puv.fi/~t0101190/projekti/source/Examples/</a></a>
:=
:=Analog Devices has a large number of appnotes on this device.
:=Go here, and look in the section on MEMS Technology:
:= <a href="http://www.analog.com/Analog_Root/sitePage/direct/applicationNotes/" TARGET="_blank"> <a href="http://www.analog.com/Analog_Root/sitePage/direct/applicationNotes/" TARGET="_blank">http://www.analog.com/Analog_Root/sitePage/direct/applicationNotes/</a></a>
:=Look at AN-604: Using the ADXL202 Duty Cycle Output
:=
:=Also, AN-596, while not written for C, looks like it might
:=offer some useful tips.
:=
:=Look at the CCS example file
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515343
Bill Turnip
Guest







Re: Accelerometer with Pic16f877
PostPosted: Thu Jun 26, 2003 7:51 pm     Reply with quote

Armando -
I just interfaced this accelerometer to the 16f877 and 16f863 (or 4?) using the analog outputs (the PWM outputs dropped across a simple low-pass filter). It was pretty easy using ADCs.

Another question:
Is it possible to measure BOTH accelerometer axes at the same time (or close to it) using PWM outputs and the timers of the PIC?

Bill
___________________________
This message was ported from CCS's old forum
Original Post ID: 144515591
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