> Hi
>
> Something that I have been coming back to a number of times:
>
> When placing capacitors for decoupling of a microcontroller datasheets
> often suggest a 1nF/100nF and maybe a number of them
>
> But it needs to be aligned to what is actually the load.
>
> Say I have a microcontroller running at 100MHz. Assumption (and that
> could be wrong), is that for the given technology the switching of the
> transistors are 10 times as fast, so 1ns
Processor designer talk about "gate delay". For fast processors
typical rules would have 12-20 gate dalays per clock. which means
that during clock cycle signal has time to pass for say 20 gates.
For slower ones (like your 100MHz case) more likely 20-50 (allowing
pass trough more gates means that number of gates can be minimized,
giving slower but smaller core). Also, effective delays are
largely due to parasitice capacitance. So, transistors are likely
to be much faster. They switch with limited speed because they
are driven by slowed-down signal, but still I would expect closer
to 0.3ns.
> If the micro runs at 100mA during active state (all peripherals and core
> running), and it then runs a SLEEP instruction, it immediately reduces
> the current from 100mA to 0 in 1ns, right?
No, for various reasons:
1) normal SLEEP does not stop clocks and keeps peripherials
running. Only core is stopped. Various "deep sleep"
variants are multi-clock.
2) during cycle transitions goes trough several layers of gates
and signals need to propagate trough transmisson lines.
So "stopping" need to propagate and it takes time.
3) Significant power (say 1/3 ot total core power) goes into
clock lines. For sleep new clock transition is stopped, but
at time when new transition should happen clock line is
quiet (this is related to point 2).
4) There is a lot of internal parasitic decoupling.
At that frequency inductance of leads and traces is quite significant.
So it matters where you want your transient. AFAICS insided chip it
is really to chip designer, all you can do is to get capacitor as close
to chip as possible. OTOH I would expect transiton to be slowed down
by internal filtering.
> I would allow for a 100mV voltage transient during that load shift, so
> it seems this single 2.2uF cap would be enough
Single cap per pair of power pins, otherwise inductance of traces
plays role. Since transitions are much slower than you assume
you may get away with single cap in purely digital circuit
(but you probably will exceed 100mV limit on transients).
Well, it depends how much low frequency filtering is needed. Classic 0.1uF
is enough for high frequencies. Due to inductance you want capacitor
per power pins pair and it makes sense to use capacitors of the
same value. OTOH 2.2uF after 2.2uS with current 100mA will drop by
100mV. So you probably want more low freqency filtering. Also,
it makes sense to add electrolytic (or RC) to dump resonances.
--
Waldek Hebisch