I have a custom PCB with an ATMega 2560 microcontroller on it. To test if the ATMega was working properly, I uploaded the following code:
void setup() {
Serial.begin(9600);
Serial.println("Test setup");
pinMode(6, OUTPUT);
pinMode(30, OUTPUT);
pinMode(31, OUTPUT);
pinMode(32, OUTPUT);
}
void loop() {
digitalWrite(6, HIGH);
digitalWrite(30, HIGH);
digitalWrite(31, LOW);
digitalWrite(32, HIGH);
}
The mentioned ports are connected to LEDs, 6 to an external LED and 30, 31 and 32 to LEDs on the PCB. Each connected in series with a 220 Ohm resistor.
The board is setup like this:
When uploading I am using a Arduino UNO as ISP and after uploading the Arduino IDE says 'Done uploading' without any errors, but the board is not showing any sign of executing the code. I have checked that VCC is 5V and RESET is HIGH after uploading. The text "Test setup" is also not shown on the serial monitor.
Does anybody have a clue why the board is not working?
Thanks on forehand.