With the new ATMEGA328 my app stopped working...

Hi all, I have a C langage application that, when initializing, calls internally the AVRDUDE utility to upload on Arduino the needed code. The command used is :

avrdude -p m168p -b 19200 -c stk500v1 -P COM4 -e -U flash:w:mycode.hex

where mycode.hex is the compiled code of the part of my application that resides on Arduino.

Everything has always worked perfectly with the Arduinos equipped with the ATMEGA168. But recently they were changed to use the ATMEGA328, and AVRDUDE stopped working… of course I changed, but to no avail, the command as follows :

avrdude -p m328p -b 19200 -c stk500v1 -P COM4 -e -U flash:w:mycode.hex

the result is that these error messages are issued :

avrdude: stk500_getsync(): not in sync: resp=0x00
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x51

Can anybody help me ? I am using the AVRDUDE.EXE and the AVRDUDE.CONF of the latest V15 release of the Arduino platform.

Thanks in advance

Problem solved ! Using the ATMega328 you need to specify the serial speed as 57600 baud and not 19200 as with the ATMega168.

All is well what ends well...