View previous topic :: View next topic |
Author |
Message |
saha8532
Joined: 18 Jul 2010 Posts: 4
|
input Analog |
Posted: Wed Jul 21, 2010 2:41 am |
|
|
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
|
|
Posted: Wed Jul 21, 2010 12:05 pm |
|
|
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
|
|
Posted: Thu Jul 22, 2010 3:15 am |
|
|
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
|
|
Posted: Thu Jul 22, 2010 3:15 am |
|
|
[img]http://www.4shared.com/photo/z5yWuOca/_2__SCH.html[/img] |
|
|
saha8532
Joined: 18 Jul 2010 Posts: 4
|
|
Posted: Thu Jul 22, 2010 3:30 am |
|
|
really see this part of my code (maybe it was necessary) :
setup_adc(ADC_CLOCK_DIV_8); |
|
|
mkuang
Joined: 14 Dec 2007 Posts: 257
|
|
Posted: Thu Jul 22, 2010 6:35 am |
|
|
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
|
|
Posted: Thu Jul 22, 2010 2:23 pm |
|
|
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 ? |
|
|
|