I’m going to make GPS data logger, but I’ve stuck at start. I have PCB board (it’s professional made, not homemade) with Atmega128A, power supply made of 5 V voltage regulator, DS1302 RTC and many connectors (other parts like GPS , Gyro and SD will be connected later). When I try to program the MCU with USBasp+avrdude (I know that programmer works - I’m programming m8, m326 and t13 with it) I get “target doesn’t answer” error every time. I’m sure, that circuit is connected correctly with no short circuits and bridges - I’ve checked it many, many times with digital microscope and ohmmeter. I’ve set SCK frequency under 200 kHz. First time, I thought that it is because of death MCU (I’ve used old atmega from used board and there was option that it was death because of heat, static electricity or something else), but today arrived new MCU and its same. According to oscilloscope programmer is speaking to MCU, but MCU isn’t responding. So I think problem must be in my circuit or maybe there are some special requirements for m128 minimal circuit. Schematics is in attachment and I’m sure, that real board is connected same. I’m stuck on this point for more than week and I really don’t know what to do.
I don't see any caps on the schematic, You really need at least one 0.1uf cap close to the mcu and maybe another 10Uf+ too
10uF is part of power supply. I’ll try add 0.1uF.
You need 0.1uf cap between supply and ground right next to the chip. Distance matters.
I've added 0,1uF between both supply and ground (pins 52, 53 and pins 22, 21) and programmer still can't communicate with MCU. Capacitors are very close (one terminal is placed on MCUs pin).
The Atmega128A is one of those weird AVRs, so prepare to be amused. The ICSP programming happens on different pins than the standard SPI pins. Check out the data sheet where it talks about Serial Programming Pin Mapping, section 31.9.