I have got my own PCB with "some stuff" on it and first I want to make it run a simple "turn on LED".
My setup:
- Atmega 2560
- LED connected to PE4 (D2 in Arduino language) => PE4 - LED - 1K resistor - 5V
- ceramic resonator (CSTCE16M0V53-R0 16MHZ) connected to XTAL1 + XTAL2 with 1MOhm resistor inbetween
- all VINs are pulled to GND with capacitors
Upload is working through ICSP (MISO, MOSI, SCK, RESET, 5V, GND) with an USBasp
Here is my Arduino sketch, which I upload through the Arduino software:
void setup() {
pinMode(2, OUTPUT);
}
void loop() {
digitalWrite(2, LOW);
}
I checked the fuses on the atmega as well:
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK (H:FD, E:D8, L:FF)
avrdude uploads successfully: (output truncated!)
avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9801
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: writing flash (1518 bytes):
Writing | ################################################## | 100% 5.47s
avrdude: 1518 bytes of flash written
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 3.45s
avrdude: verifying ...
avrdude: 1518 bytes of flash verified
avrdude done. Thank you.
Problem: the LED doesn't work. It is OFF all the time.
Any ideas why it is not working?
Cheers Hendrik