Hi,
Yesterday my extra Atmega328P arrived. Today I finally had time to play with it.
I have programmed my Arduino Duemilanove with the ArduinoISP from the Examples menu. So now I can program the new Atmega328P.
There's one thing I can get to work and searching the internet and forums isn't helping me out.
I've tried to increase the baud rate to speed up the programming. In the ArduinoISP's setup() is a Serial.begin(19200). So I thought changing this to 57600 would do the trick. It doesn't
When I change it to 57600 (or anything else) I keep getting errors. e.g.
D:\Development\Arduino\temp>avrdude -p m328p -c avrisp -P COM3 -b 57600 -v -u -U flash:w:RgbMatrix.cpp.hex
avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "C:\Programs\WinAVR_20100110\bin\avrdude.conf"
Using Port : COM3
Using Programmer : avrisp
Overriding Baud Rate : 57600
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 : STK500
Description : Atmel AVR ISP
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.13s
avrdude: Device signature = 0x1e950f
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: reading input file "RgbMatrix.cpp.hex"
avrdude: input file RgbMatrix.cpp.hex auto detected as Intel Hex
avrdude: writing flash (3436 bytes):
Writing | | 0% 0.00s
avrdude: stk500_paged_write(): (a) protocol error, expect=0x14, resp=0x64
avrdude: stk500_cmd(): protocol error
D:\Development\Arduino\temp>
After this the target Atmega looks erased and doesn't do anything. (Switching back to 19200 baud allows me to program it again.)
How can I increase the programming speed of ArduinoISP?
Another question I'd like to be sure about:
When I write a program to the target Atmega using ArduinoISP, it overwrites the Arduino bootloader, right?