EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: snipersquad100 on December 31, 2014, 09:57:39 am

Title: microcontrollers
Post by: snipersquad100 on December 31, 2014, 09:57:39 am
Is it possible to find out what code is written to an arduino or microcontroller?
if so how please.
thank u
Title: Re: microcontrollers
Post by: picandmix on December 31, 2014, 11:37:52 am
In a word, Yes, but in realistic practical terms for someone with little knowledge of micros then No.

First , when burning a program to a micro you can often put a secure lock on the code to prevent folk from reading it back.

Even if it can be read out via a programmer then all you get is basic machine code / hex  values which are next to useless.

There are some program which can made more sense of the machine code but its still very difficult - probably simpler to write the program code from the beginning yourself.

What are you trying to read and for what purpose ?
Title: Re: microcontrollers
Post by: snipersquad100 on December 31, 2014, 12:23:32 pm
I made a esr arduino shield, but I want to use the arduino for other projects, and make a new esr meter on a pcb.
The problem I have is that I cant find the code I used to program the esr shield and the microcontroller on my arduino is a smd so I cant take that chip off.
Title: Re: microcontrollers
Post by: FreddyVictor on December 31, 2014, 01:14:09 pm
yes, you can connect say an AVR ISP MkII to arduino and read the hex file and then write this to another chip
can even copy the eeprom settings aswell
Title: Re: microcontrollers
Post by: sleemanj on December 31, 2014, 01:19:50 pm
Google for avrdude backup and that should get you pointed in the right direction.
Title: Re: microcontrollers
Post by: snipersquad100 on December 31, 2014, 04:58:50 pm
thank you guys
Title: Re: microcontrollers
Post by: IconicPCB on December 31, 2014, 08:54:47 pm
Arduino generates a conventional hex file ( just like the GCC compiler. The file is located ina some obscure temporary location on the windows machine and equally obscure location on the linux machine.
Searc for files ending in .hex and You will have it in your hot sticky mit.