Im trying to design a broad purpose microcontroller board (developement board?) to send off to a fab house to then use in future projects. The micro being used is an ATtiny861A.
Indicates I should wire the AVCC pin to VCC through a low pass filter. Using an RLC filter with R=10R, L=10uH, C=0.1uF gives a cutoff freq of ~159kHz. Its hard to know what frequencies to expect as this is a general purpose board however the clock will always be 1-16MHz
- Are there any other frequencies I need to take into account for AVCC?
- If not, the bode plot gives a gain of roughly -30dB at 1MHz, is this considered decent reduction or should I aim for better? I feel like the answer to this question will be "it depends on you application" and if this is the case, what kind of applications would this setup limit me to?
The resistor is also rated to 3W so in the absolute worst case where every pin on Port A sources/sinks its max of 40mA (not that i would deliberately drive a pin anywhere near its max!) The resistor should be able to handle it; $$ P_r=I^2R = (8*0.04)^2(10) = 1.024W $$
After reading many posts regarding decoupling capacitors my current understanding is this:
- Place a ceramic capacitor as close to the the GND and VCC pins of the micro as possible. Use wide traces/planes (and avoid vias if possible?) to connect the cap to the micro and supply. this capacitor should be placed between the supply and micro and is to deal with high frequency noise, value of 100nF. Is it worth including another capacitor near the micro of a value other than 100nF and 10uF?
- Place a 22uF tantalum cap across VCC and GND, does not need to be close to the micro because it is used to deal with lower frequencies which are not effected by the inductance of the traces. The voltage regulator states using at least a 10uF tantalum between OUTPUT and GND (larger values will improve stability further) so only one will be included for both regulator and micro and be placed near the regulator.
- The regulator datasheet also suggests a 10uF tantalum cap between INPUT and GND, "suitable for almost all applications". I've read about tantalum capacitors being very vulnerable to even brief voltage spikes above their rated max. The input voltage will be either 4xAA batteries giving ~6V or the external ISP programmer giving 5V, what are likely sources of voltage spikes? initial powerup? The 10uF tantalum caps are rated to 16V, is this likely to be enough of a buffer?
- Included on the board are 2x dual n-channel mosfets driving 4 LEDs, the mosfets are there just to serve as a high impedance buffer (i think thats the correct term) incase any of the 4 I/O pins are also used to transmit data. Reading this post: Does my circuit need decoupling caps? The suggestion was made to also decouple the transistor and LED. Can and should the same principle be applied to a mosfet? The LED's are fairly low current, being driven at 2mA each so would a 22nF over the LED, series Resistor and mosfet D-S be sufficient?
This will be my second time using a fab house and first time with something more complex than an NE555 so I would be happy for any feedback that goes along with my many questions! Thanks