Arduino Forum

Topics => Robotics => Topic started by: mkbutan on Oct 28, 2012, 02:19 pm

Title: How to find the Last program loaded in Arduino ATMEGA328p
Post by: mkbutan on Oct 28, 2012, 02:19 pm
hi
I am new in this forum and with ARDUINO pl help.
how do i know which is the last program is loaded in my Arduino 328p
how to read the last code uploaded in the ATMEGA328p ? controller ?
Title: Re: How to find the Last program loaded in Arduino ATMEGA328p
Post by: PaulS on Oct 28, 2012, 03:24 pm
Quote
how do i know which is the last program is loaded in my Arduino 328p

Put something in the program that identifies itself when the program runs. Then, just open the serial monitor to see.

Quote
how to read the last code uploaded in the ATMEGA328p ? controller ?

If you mean hex file, there is an avrdude function to do that. What do you intend to do with that binary file once you have retrieved it? "Edit it" is not one of your options.
Title: Re: How to find the Last program loaded in Arduino ATMEGA328p
Post by: mkbutan on Oct 28, 2012, 03:59 pm
yesterday I loaded my ARDUINO with led and Motor code's but today nether LED glows Nor the Motor is running
I don't know which program's were loaded in the ARDUINO
pl can any one help me find the same
thanks
Title: Re: How to find the Last program loaded in Arduino ATMEGA328p
Post by: PaulS on Oct 28, 2012, 04:54 pm
The sketch loaded on the Arduino does not have a name. If you want it to display a name, you must assign it one, in the sketch, and you must print it in the sketch.

Quote
yesterday I loaded my ARDUINO with led and Motor code's but today nether LED glows Nor the Motor is running

So, load it again. If it still fails to work, you blew up your Arduino somehow.
Title: Re: How to find the Last program loaded in Arduino ATMEGA328p
Post by: mkbutan on Oct 28, 2012, 08:01 pm
HI
IF I LOAD THE NEW PROGRAM AGAIN IT WILL OVERWRITE IT AND IT WILL WORK .
MY QUESTION IS THAT 
whether we can see the program loaded in the ATMEGA 328P on the pc
I have Arduino 1.0.1
Title: Re: How to find the Last program loaded in Arduino ATMEGA328p
Post by: techra on Oct 28, 2012, 09:24 pm
Did you save your program before uploading?..
Title: Re: How to find the Last program loaded in Arduino ATMEGA328p
Post by: dxw00d on Oct 28, 2012, 09:43 pm
Quote
MY QUESTION IS THAT
whether we can see the program loaded in the ATMEGA 328P on the pc


I believe it is possible, using avrdude, to retrieve the binary code that is currently on the atmega. In theory, you could compile your possible sketches, then compare the binary files produced by the compiler to the one retrieved from the atmega. The sketch source code is not stored on the atmega.
Title: Re: How to find the Last program loaded in Arduino ATMEGA328p
Post by: techra on Oct 28, 2012, 09:58 pm
If u uploaded a program now, and did not upload any new program after switching your arduino ON , the same program should still be their on the ON-chip memory,as its non-volatile and you can test it by checking your output...but i dont think u can retrieve the program once you upload any new program,as it does not save the sketches.