Can't upload program to atmega328 SPI

Hi! I need to use the arduino ISP to upload sketches. I have no problems burning bootloader and communicating with the chip so it shouldn't be a wiring problem but for some reason it wont work.

When i try to upload code using the "arduino as ISP" and ATmega328 on breadboard(8mhz internal clock) I get a sync error (avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xff).

Using avrdude i get the following specs;

Using Port : COM3
Using Programmer : arduino
Overriding Baud Rate : 19200
AVR Part : ATMEGA328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 5 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : Arduino
Description : Arduino
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e950f
avrdude: safemode: lfuse reads as E2
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as 7

avrdude: safemode: lfuse reads as E2
avrdude: safemode: hfuse reads as DA
avrdude: safemode: efuse reads as 7
avrdude: safemode: Fuses OK

avrdude done. Thank you.

Any ideas? Going mad pretty soon.... :confused:

After 8 hours of error checking, 5 minutes after posting this i found the solution.

In case someone else runs into the same problem here goes;

In the board.txt, check "atmega328bb.upload.speed=57600"

Change the baudrate in the ISP sketch to this value (57600).

Dats it..............

ISP and SPI both mean something but are very different from each other. Please fix the title.

vaj4088:
ISP and SPI both mean something but are very different from each other. Please fix the title.

I was using SPI to upload sketches, what's there to fix?

Eighteen months ago, the OP wrote "When i try to upload code using the "arduino as ISP"" and never wrote about SPI.

When i try to upload code using the "arduino as ISP" and ATmega328 on breadboard(8mhz internal clock) I get a sync error (avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xff).
Using Port : COM3
Using Programmer : arduino
Overriding Baud Rate : 19200

Using "Arduino as ISP", the "programmer type" should be "STK500v1", not "Arduino"