There's only one VCC pair at the DIP version. And the two pairs in the SMD version are placed right next to each other which means a single cap for both pairs is fine. As I mentioned they just added an extra pair because the SMD pacakge has 4 extra pins so they need to use the pins for something. Having an extra pair also eases routing, since you can choose to add VCC to the AVR from either one or the other side of the GND pin depending on what's easiest.For devices with multiple pairs of power and ground pins, it is essential that every pair of pins get its own decoupling capacitor.
The main supply should also have a tantalum capacitor of some μF to stabilize it.
This design rule is more meant for larger AVRs with more pins, which actually have VCC pairs placed physically remote from each other, for example an ATmega128 like shown below. Here a single cap could cause EMC problems because you have to route some long traces from the cap to one pair of power pins if you only use one cap.
But for an ATmega88 you don't need to route long traces from the cap to any of the two neigbour piars so I wouldn't bother to use more than one cap.
AVR042 does however point out something else that I have also mentioned. Use a larger tantalum charge capacitor than suggested in the TI LDO datasheet:
For example 4.7µF like suggested here: http://avrusb.wikidot.com/hardwareThe main supply should also have a tantalum capacitor of some μF to stabilize it.
You should place the USB connector so the end sticks outside the board. This way you can still reach the connector if it's put in an enclosure.
See how the USB and power connector sticks outside the edge of the board here to allow putting the board in an enclousre.
And another example with connectors sticking through an enclousre:
In my previous post I wrote you should connect the USB sheild to GND, but I deleted this again, because actually Intel and others advise not to connect the sheild directly to GND at the target end. The sheild is connected to GND at the host (PC) end, usually through ferrites. I guess you read my post before I deleted that message again, sorry about that. I would just remove this connection again. Once connected the sheild will be connected to GND at the host end.
Your VCC and GND routing is not ideal.
Power and GND should go from the USB connector (X1) via C1 and from C1 to U1.
VCC and GND should then go from U1 to C2 and from C2 to the rest of the circuit. Not connetions from the rest of the circuit should be made before C2 as in your layout. This reduces the effect of C2. So at the traces between X1 -> C1 -> U1 -> C2, no connectiomns should be made to the rest of the circuit. Take out the VCC and GND connections to the rest of the circuit from a seperate trace right at the C2 pads. I would turn C2 90 degrees and place it close to U1.
Analog GND and digital GND should also only be connected in one place. Analog GND is only for the resistor ladder + ADC. The rest of the circuit should not be connected to analog GND after C5.
Rotate R5 180 degrees, this will make routing shorter. I would also make bigger distance from R5 to the reset trace, they are very close together. There's room enough to move the reset trace further away from R5.
I don't know how many mm the USB connector is outside the board, but it doesn't look like much. It should be at least the thickness of typical plastic enclousers to allow the cirtcuit to be put in an enclosure and still reach the USB connector from the outside.
The trace for pin 1 of the AVR does not hit at the middle of the pad, move it down a bit.
Is looks like C1 and C2 are both 0805 houses, can you get 4.7µF tantal caps that small and at what voltage?
I would add a ground plane around the high frequncy crystal to sheild it of better. There's a description about this in AVR042 and other places. Also straighten up the traces for the crystal, USB + other palces so you don't have any turns sharper than 45 degrees. It's generally a good idea to use 45 degree turns at traces. Normally you wont see many 90 degree sharp turns at professional PCBs, but only 45 degree turns. Especially high speed signals don't like 90 degree turns, 45 degree turns reduces reflection and also makes tracks shorter.
See how all the traces of this random PCB are all have 45 degree turns:
You can set up Eagle layout to use 45 degree turns, see attached image:
I'll try to reroute the vcc and gnd lines better, I believe the analog ground is only connected at one point (there is an exception with the isp header, but I figured the ADC would not be in use during programming, but i'll reroute anyway after taking your advice on C1/C2
The DRC rules I have loaded prohibit me from moving the usb connector any further off the board... I guess I'll double check why I'm getting the dimension error.. (probably something to do with the restrict box).
I'll also note that today, for whatever reason, when i used cruise control, it had the same effect as pressing the mode button (on SW2). but the effect was not always reproducible. According to the toyota docs the lines aren't connected, so maybe this is some kind of noise. Voltage and resistance measurements show no change when any button on the cruise control pad is pressed...
You could route the ISP GND over to the jumper near by.
The longer analog traces you have the more noise they will pick up, also from a trace for an unused ISP connetor. You could route the ISP GND to the bootlaoder jumper nearby instead. But you are right it's not that important in this circuit, as the resolution of the ADC is not critical for this application, so analog design is not that cirtical.
What voltage can you get 0805 tantals in? What component supplier do you use? You should change your schematic/footprint to use a polarized (tantals) for C1 and C2 instead of non polarized. This way on the silkscreen you can see what way to turn the polarized caps when you mount them.
You should use 10V tantals for the USB supply, 6.3V is too close to the max USB voltage of 5.25V, espcially with some ripple voaltage. A rule of thumb is to pick caps voltages at 2x Vmax they are exposed to in the circuit, and 10V is almost 2x 5.25V, so that should be fine. And you can just use the same capacitance and voltage for C2, then you don't have to buy two different types and you can easier get a discount by buying more of the same type.
You should add some pin description text near each pin at the bottom (blue) layer at the screw terminal. This will get etched into the PCB so you can read it even though there's no silk screen at the bottom. It's nice to be able to read what the 5 different pins are for when you connect the wires.