I am trying to design a simple Arduino variant of the Leonardo/Micro using the ATMega32U4 chip.
So far, I have been able to successfully flash the bootloader, and I can upload programs to the board.
Unfortunately they do not seem to execute reliably. When I first programmed, with the ASCII Table
example, the board did print out the ASCII table, but since then programs do not seem to execute
on the board.
At first, I thought that the USB port had failed, so I used avrdude to inspect the fuses and
flash memory.
In avrdude I can verify the programs are uploading to the board okay, and the fuse values
are set identically to the Leonardo. To me, this indicates that the ISP and USB port,
and the ATMega32U4 chip are all functioning.
I presume if the ceramic resonator I am using for the clock signal was not working then the
USB port would not function. Also, if the onboard 3.3V regulator was not working, then the
chip would not power up properly.
I uploaded this very simple test program to the board:
void setup()
{
- delay(1000);*
- pinMode(PORTD0, OUTPUT);*
- pinMode(PORTF0, OUTPUT);*
}
void loop()
{ - digitalWrite(PORTD0,HIGH);*
- digitalWrite(PORTF0,HIGH);*
}
but nothing happens. The same program on a Leonardo, properly lights up LEDs connected to
pins D0 and F0. I have tried testing pin output at the headers on my circuit board and directly
on the output pins of the chip.
I am not sure where to continue in trying to debug the hardware problems from there.