How to use the pins on ATmega32U4

First of all, I'm new on this forum, so I hope to have chosen the right section. Maybe I should've lurked some more... Sorry about that.

I'm working on making a derivative of the Leonardo board, but I've never worked with microcontroller chips directly and I'm afraid to end up having to remake the PCBs because of a silly mistake.

I looked into Leonardo's Eagle file and read some parts of the ATmega32U4's Datasheet and there a couple of things that strike me unusual: The IC has several seemingly redundant pins for grounding and VCC. I understand that «UGND» is for the grounding of USB port's chassi, but the other grounds pins(15, 23, 35 and 43) seem to make no difference from each other. In the Leonardo they are all electrically connected except 43. My question is: is it important to physically connect them all together and to the board's ground? Or can I use one of them and leave the others floating? Why is 43 left unconnected on Leonardo?

The VCC pins are more concerning because some of them are labeled «AVCC» (44, 24), others «UVCC» (2) and the expectable «VCC» (34, 14). I guess that «UVCC» is USB power input and it seems that Leonardo connects it directly to «VCC», but what's with «AVCC» shouldn't it be also connected to the others? In either case, the same question with Grounds arises: Can I choose to use one of the pins and float the others?

Welcome to the forum.

My thoughts:
I recommend connecting all of the VCC's to your supply voltage and not leave any disconnected, and use decoupling caps near the processor for each supply pin.
I recommend connecting all the grounds to ground. 43 is connected to ground on Leonardo. The Eagle file is difficult to follow, and I don't know the exact logic they used for calling the traces leading to ground R2 and R3, but you can actually see the traces leading to ground on my Leo. There is some discussion of that here: http://forum.arduino.cc/index.php?topic=212619.0
You can get an SMD breakout board for the processor and attach pins to it so you can prototype your circuit on a breadboard, to be better assured of success when designing the PCB.
Refer to the ATmega32U4 datasheet often during your designing/prototyping activities.
You will notice you don't need the zener diodes on the USB lines like they have on the Leonardo because there is an internal regulator for the USB buffers.
Study other derivatives, such as Pro Micro and DF Robot Beetle.
Silly mistakes are common, don't let that discourage you. Good luck with the project.

The connections inside the processor chip are necessarily very thin. They provide multiple ground points to avoid a voltage drop from one side of the chip to another, were there to be only one external ground.

You defeat this concept if you don't ground all of the ground pins. So yes, connect them all to ground (which itself should be as wide as practical).

Vcc and AVcc should also be connected to Vcc on the board. Again, it would be to avoid voltage drops over internal traces. It also lets you put decoupling capacitors on both sides.

I'll move this to Microcontrollers section.

Thanks for clarifying that, Nick.

dmjlambert:
The Eagle file is difficult to follow, and I don't know the exact logic they used for calling the traces leading to ground R2 and R3, but you can actually see the traces leading to ground on my Leo. There is some discussion of that here: resistor value on Leonardos - General Electronics - Arduino Forum

You mean the "RN3B" and "RN3C" on the Leonardo's schematic? Those under "NOT USED"?

dmjlambert:
You will notice you don't need the zener diodes on the USB lines like they have on the Leonardo because there is an internal regulator for the USB buffers.

On the schematic it refers to "ESD Protectors". If they are zeners, I didn't know that. It's weird they aren't represented accordingly with zener symbols on the schematic.

Dig_Gil:
"ESD Protectors". If they are zeners, I didn't know that. It's weird they aren't represented accordingly with zener symbols on the schematic.

My mistake, sorry about that. That is interesting. I was confused and need to retract/refine my statement. There are in the place you would normally see a 3.6V zener to shift 5V logic level for something like a Digispark or USBasp. Perhaps they are good to have for ESD. I see they are on the Beetle but not on Pro Micro. The Leonardo has Bourns ChipGuard varistors and Beetle has Littlefuse PULSE-GUARD ESD Suppressors.

Dig_Gil:
You mean the "RN3B" and "RN3C" on the Leonardo's schematic? Those under "NOT USED"?

No I mean R2 and R3 on the schematic, which are actually just traces on the board. They are not resistors and they are marked NM on the schematic and they appear to be traces which connect the grounds together.

dmjlambert:
No I mean R2 and R3 on the schematic, which are actually just traces on the board. They are not resistors and they are marked NM on the schematic and they appear to be traces which connect the grounds together.

Gotcha.