Maker Pro
Maker Pro

Charge injection on PIC10F220

M

MooseFET

Jan 1, 1970
0
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.
 
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.
 
D

Donald

Jan 1, 1970
0
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
 
M

MooseFET

Jan 1, 1970
0
[... Charge injection on PIC pins ....]
My guess would be that every run of chips would be different.

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.

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

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.
 
D

Donald

Jan 1, 1970
0
MooseFET said:
[... Charge injection on PIC pins ....]
My guess would be that every run of chips would be different.


Yes but how different. I often use devices like the 74HC4053 in

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
 
J

joseph2k

Jan 1, 1970
0
MooseFET said:
[... Charge injection on PIC pins ....]
My guess would be that every run of chips would be different.

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.

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

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.
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.
 
J

John Larkin

Jan 1, 1970
0
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.

Perfectly reasonable.
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.

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
 
M

MooseFET

Jan 1, 1970
0
[... Charge injection on PIC pins ....]
My guess would be that every run of chips would be different.
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.
[....]
You may get it to work on the chips in your junk drawer today, but going
into any kind of production would fail.
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.

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.

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
 
M

MooseFET

Jan 1, 1970
0
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?

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.
 
W

Winfield

Jan 1, 1970
0
MooseFET said:
I'm scaling the resistors and capacitors to keep the time constants
involved nearly constant. I have one at 1000p x 10K = 10uS

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.
 
M

MooseFET

Jan 1, 1970
0
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.
 
W

Winfield

Jan 1, 1970
0
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.
 
S

Spehro Pefhany

Jan 1, 1970
0
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
 
M

MooseFET

Jan 1, 1970
0
[.....]
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.

So did the right or wrong team win?
 
M

Michael A. Terrell

Jan 1, 1970
0
MooseFET said:
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
 
J

John Larkin

Jan 1, 1970
0
[.....]
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.

So did the right or wrong team win?

It's only a game.

John
 
M

Marra

Jan 1, 1970
0
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.

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 !
 
J

John Larkin

Jan 1, 1970
0
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
 
M

MooseFET

Jan 1, 1970
0
Charge is charge. A series resistor won't change it.

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.
 
Top