I'm doing that. Ground is sampled immediately before the ADC input, so I would hope the sampling cap is discharged.
That would still be a glitch, but it should be a negative glitch since the cap is discharged, and at least it won't depend on whatever other input was last sampled.
But.... That's not what I see.
I've tried moving the scope ground around, that doesn't affect anything. The grounding around the CPU is "aggressive" with two layers of solid ground, and maximum ground fill on three other layers, the last being VCC fill.
Bypassing of the CPU is "aggressive" including X2Y caps directly at the power pins with six ground vias each.
The source impedance to the PCB is low, and I have tried adding an opamp to drive the ADC pin.
It's not possible for the ADC pin to be driven out of the GND-VCC range.
-----Original Message-----
From: piclist-***@mit.edu [mailto:piclist-***@mit.edu] On Behalf Of Jason White
Sent: Thursday, August 24, 2017 3:52 AM
To: Microcontroller discussion list - Public.
Subject: Re: [EE] Pic24FJ128 "Hair" on ADC pin
I think you may find that if you make the ADC regularly and sample Vss that your glitch will reduce (if not disapper). Setting the ADC channel to the negative reference for a complete conversion cycle (ideally between real every sample taken) will ensure that (1) the sampling capacitor is completely discharged (2) if there is feedthrough between channels on the internal analog switch it will be made consistently to ground rather than to the last channel sampled.
I encountered this same issue when I had 10 volts from an opamp applied to an ADC pin though a 100k resistor. The analog switch started leaking between channels. I found that the above technique greatly reduced charge injection to the other ADC pins, but I also found that ADC accuracy and linearity was compromised under those conditions -- because the switch was still leaking, just to ground rather than the other channels .
Ultimately, I resolved the issue by setting ADC inputs to outputs when they went out of range. This resolved both the linearity and injection issues without having to alter the PCB.
Post by RussellMcOn 24 August 2017 at 07:53, Van Horn, David <
Post by Van Horn, DavidHmm. That sounds like a "nothing you can do about it" kind of problem.
Charge injection in the sampling switch, maybe.
If you see a"physical" spike at the physical pin it suggests that
current is being supplied by the IC.
As speff says "charge injection" (more or less by definition) but,
from where.
Thoughts only
Check that ALL
other pins are within operating voltage spec and (to be safe) drive
spec as well.
Ensure no short glitches anywhere else.
Is there an external physical signal associated with the sampling
that may be being coupled to the pin.
Is the spike AT the pin only. ie is it to some degree at other pins.
Is it on the IC ground lead too?
Where is the scope probe ground?
Where in the sampling cycle does it occur?
How long/high?
How is the pin "grounded"? - Is the scope ground at the ground point
for the pin?
Russell
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
Jason White
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailma