Pages: [1]   Go Down
Author Topic: How to find the Last program loaded in Arduino ATMEGA328p  (Read 1359 times)
0 Members and 1 Guest are viewing this topic.
Mumbai -INDIA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ?
Logged

"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ε∫εζτ√°ηiζ≈
                           AND
                           yes
                           PROGRAMMING

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49077
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Mumbai -INDIA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ε∫εζτ√°ηiζ≈
                           AND
                           yes
                           PROGRAMMING

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 610
Posts: 49077
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Mumbai -INDIA
Offline Offline
Newbie
*
Karma: 0
Posts: 37
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

"THE LIFE IS VERY SMALL TO LEARN ELECTRONICS"
                           ε∫εζτ√°ηiζ≈
                           AND
                           yes
                           PROGRAMMING

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you save your program before uploading?..
Logged

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 34
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: