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

input Analog

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



Joined: 18 Jul 2010
Posts: 4

View user's profile Send private message

input Analog
PostPosted: Wed Jul 21, 2010 2:41 am     Reply with quote

Hi , Dears
What should I do to designing the Input analogs in schematic ?
My purpose is which Capacitor(s) I should use and where of the MCU.
Thanks
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 21, 2010 12:05 pm     Reply with quote

We normally don't use capacitive coupling on the input signals to the A/D,
because it will remove the DC offset voltage from the AC signal. Then
the signal will swing above and below ground (0v). The A/D input pin
can't tolerate the signal going very much below ground. Also we can't
measure it if it goes below ground. For this reason we use DC coupling.

What type of analog signal do you want to measure with the A/D
converter ? Describe it.
saha8532



Joined: 18 Jul 2010
Posts: 4

View user's profile Send private message

PostPosted: Thu Jul 22, 2010 3:15 am     Reply with quote

Hi , PCM programmer
Thanks for your reply.
my input voltage is Dc and it swing between +5V and 0V(Ground) and my
Crystal is 4MHz .
so part of my SCH is here :

[/img]http://www.4shared.com/photo/z5yWuOca/_2__SCH.html[/img]
saha8532



Joined: 18 Jul 2010
Posts: 4

View user's profile Send private message

PostPosted: Thu Jul 22, 2010 3:15 am     Reply with quote

[img]http://www.4shared.com/photo/z5yWuOca/_2__SCH.html[/img]
saha8532



Joined: 18 Jul 2010
Posts: 4

View user's profile Send private message

PostPosted: Thu Jul 22, 2010 3:30 am     Reply with quote

really see this part of my code (maybe it was necessary) :

setup_adc(ADC_CLOCK_DIV_8);
mkuang



Joined: 14 Dec 2007
Posts: 257

View user's profile Send private message Send e-mail

PostPosted: Thu Jul 22, 2010 6:35 am     Reply with quote

saha8532 wrote:
Hi , PCM programmer
Thanks for your reply.
my input voltage is Dc and it swing between +5V and 0V(Ground).

[/img]http://www.4shared.com/photo/z5yWuOca/_2__SCH.html[/img]

Then why do you need a capacitor ???
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jul 22, 2010 2:23 pm     Reply with quote

You're not doing capacitive coupling. You're using a low-pass RC filter
on the input signal. Also you have a schottky diode to ground, to prevent
the signal from going lower than about -0.4 volts.

Do you need that circuit ? What's the source of the analog signal that
comes into connector JP2 ?
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