On the Leonardo/Micro, it seems like PD0 and PD1 don't correspond to RX and TX like on the Uno. Instead PD2 and PD3 now correspond to RX and TX.
http://www.pighixxx.com/pgdev/Temp/microb.pdf
On the Uno, the port manipulation code to set digital pins 2 -7 as output while leaving RX/TX untouched would be:
DDRD = DDRD | B11111100; // sets pins 2 through 7 as outputs while leaving RX/TX untouched
However, on the Leonardo/Micro, the equivalent port manipulation code would now be:
DDRD = DDRD | B01010011; // sets pins 2, 3, 4, and 6 as outputs while leaving RX/TX (PD2/PD3) and PD5/PD7 untouched
DDRC = DDRC | B01000000; // sets pin 5 (PC6) as output while leaving PC0-PC5 and PC7 untouched
DDRE = DDRE | B01000000; // sets pin 7 (PE6) as output while leaving PE0-PE5 and PE7 untouched
Am I correctly understanding port manipulation on the ATmega32u4?