Charge injection on PIC10F220

Jun 02, 2007 22 Replies

Perhaps someone has already made this measurement.



I am going to be doing something a bit odd with a PIC. I will configure a pin as an output and set it low most of the time. From time to time, I will switch it into the high impedance input state, wait a little while while a capacitor gets charged and then trip the ADC to measure the voltage.



Doing this saves me an analog switch. I am a bit concerned about the charge that gets injected as the port is reconfigured. Does anyone have a number for this? Will it vary with temperature?



Wild guesses welcome.



The injection varies with rise/fall time, and that will vary with temperature.

My guess would be that every run of chips would be different.

There would be little stability across chips of the same date code.

You may get it to work on the chips in your junk drawer today, but going into any kind of production would fail.

I saw a design years ago where a 74c04 was used as a charge pump for the

-Vdd for an LCD display.

In production another manufactures 74c04 was used.

Failed each time and we had to go through each board to replace the

70c04s to the same date code chips.

When asked where the original chip come from, the engineer said "my junk drawer, all 74c04s are the same".

Using a digital chip in the analog domain is not good design practice.

donald

[... Charge injection on PIC pins ....]

Yes but how different. I often use devices like the 74HC4053 in analog circuit. I know that if I stay with the same list of makers, I get good enough repeating of the injection numbers.

[....]

That statement, I think you will agree is over broad. If the design is insensitive to the injection enough, it will work for all PICs that are ever made. The "enough" is what I'm working on defining. The PIC's input is intended to be analog when the ADC section is in use so I wouldn't expect too many surprises due to that part of the idea.

The logic output is a CMOS tristate buffer. The parameters of those devices can't vary too far and have the circuit still meet its specs. as logic.

You use an Triple 2-channel analog multiplexer/demultiplexer as an analog device.

Then you want to use a digital part as an analog device.

My experience says "don't bother".

Good luck

donald

Total available charge should be on the order of the pin capacitance times the supply voltage. The injected charge will be less to far, far less than that. If this total available charge is not a problem you should be OK.

JosephKK Gegen dummheit kampfen die Gotter Selbst, vergebens.   --Schiller

Perfectly reasonable.

Low 10's of pC likely. It shouldn't vary much with temperature. The ADC input will probably kick out/suck up more charge than the open-drain.

Many mux'd ADCs also tend to carry charge from channel N to N+1. Sometimes you have to digitize a dummy ground in-between to kill this effect.

What's the capacitance and time span you have in mind?

John

Yes I think that about sets the upper limit. In real life, the number should be less because the charge comes through the gate to drain capacitance. To make a fast device that needs to be lower than the gate to source.

I suspect that the current pulses from the ADC running will be as big. This doesn't give too high of a capacitor.

Assume 50pC Assume 8 bits Assume 5V = Vref

5V / 256 = 20mV 50pC / 20mV = 2.5nF

I'm scaling the resistors and capacitors to keep the time constants involved nearly constant. I have one at

1000p x 10K = 10uS

The other is quite short.

The pin will be high impedance for about 10uS before the convert. I will then turn on the output buffer, let an instruction time go by and switch on the thing I can't tell you about for about 1uS. There will then be a 10uS delay to the time to go tristate again. This other

10uS is to let things calm down before I measure again.

I'll not do your sums for you, but I do feel compelled to make one comment before I go downstairs and watch the Red Sox beat the Yankees. uS is microSiemens, a unit of conductance, whereas us, which you want, is microseconds, a unit of time. And etc.

The microSiemens unit isn't used any more because it had short comings.

Very funny, ha-ha, but wrong of course. Meanwhile, in baseball, the last-place NY Yankees pulled ahead on a homer by A-Rod, to win by one run against the first-place Boston Red Sox. Sigh.

"Mine!".

Best regards, Spehro Pefhany

"it\'s the network..." "The Journey is the reward" speff@interlog.com Info for manufacturers: http://www.trexon.com Embedded software/hardware/analog Info for designers: http://www.speff.com
[.....]

So did the right or wrong team win?

Yes.

-- Service to my country? Been there, Done that, and I've got my DD214 to prove it. Member of DAV #85.

Michael A. Terrell Central Florida

Simply put a low value resistor in series with the port to reduce the max current into the pin. Used this configuration loads of times !

Charge is charge. A series resistor won't change it.

John

That is not always true. The fraction of the charge that is placed on the signal line during the time that the impedance of the transistor is still low can be caused to flow to the ground by the existance of the resistance in series.

This is a way that the size of the hold step in a sample and hold circuit can be reduced at the cost of spreading out the acquire time. The amount of reduction in charge can be quite a bit if the gate must move a long way before the device starts to turn off.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required