read microcontroller program

Discussion in 'Embedded Systems and Microcontrollers' started by mik3, May 15, 2008.

  1. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    hi guys,

    If we read the program of a microcontroller it will be in hex. Can we translate it back to C++ or find from it the number of the chip used (if the number has been erased form the package) ?
     
  2. Papabravo

    Expert

    Feb 24, 2006
    10,144
    1,791
    A recognizeable translation back to c is highly improbable. All the information about the names of the symbols is lost.

    The type of the processor is problematic also because some processors have a large number of nearly identical variants. This is especially true of microcontrollers which have different arrangements of peripherals around a common core. You could probably tell the difference between a PIC and an 8051 but nailing down the particular variant without additional information would be difficult.
     
  3. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    Is there any way to identify a microcontroller if its product number is erased from the package by using a programmer?
     
  4. Caveman

    Active Member

    Apr 15, 2008
    471
    0
    Sometimes the programmer can identify the part.
     
  5. Papabravo

    Expert

    Feb 24, 2006
    10,144
    1,791
    I woldn't bet on the ability of a PIC programmer to identify an 8051
     
  6. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    Its not a PIC programmer is a universal programmer TOP2049 but it cant identify chips. It can only read the chips in its device list if are unlocked
     
  7. Caveman

    Active Member

    Apr 15, 2008
    471
    0
    If you can program it as a PIC, it is a PIC. If you want to further identify it, you try to write and read memory to determine the amount of memory that actually is written. This should help narrow it down a bit when you consider the package and memory sizes. I'm not sure if a PIC has an identification byte in memory that would make is simpler. That would be easiest.
     
  8. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    Yes, PIC micros have ID bits.
     
  9. mik3

    Thread Starter Senior Member

    Feb 4, 2008
    4,846
    63
    What are the ID bits?
     
  10. n9352527

    AAC Fanatic!

    Oct 14, 2005
    1,198
    4
    They are defined in the respective micro's Flash Memory Programming Specification document. For example, the ID bits for 16F88 are 14 bits wide located at address 2006h. The most significant ten bits are the device ID and the rests are revision ID.

    00 0111 0110 XXXX
     
Loading...