Author Topic: Reading the program from a Atmega8L-8PU  (Read 2007 times)

0 Members and 1 Guest are viewing this topic.

Offline YaminTopic starter

  • Frequent Contributor
  • **
  • Posts: 298
  • Country: mv
Reading the program from a Atmega8L-8PU
« on: April 08, 2019, 02:24:11 pm »
Hi everyone, today I salvaged a circuit board which had a Atmega8L-8PU. Looks like a control board used to drive motors or something like that. I am going to burn the bootloader onto it using an arduino.

Potentional Newbie question alert : before burning the bootloader on and using the micro controller for my projects I would like to know what is already on it. From the look of the circuit board (quality of it) I don't think the micro controller would have any read protection on (just a guess). There are four pins next to the controller, what could that be used for? I hope that you guys could direct me to some info on how to do it, would be possible to interface it using an arduino uno board?

I did some PIC controller programming using assembly language - so I know it a bit but not as much C.

Thanks so much

 

Online mariush

  • Super Contributor
  • ***
  • Posts: 4983
  • Country: ro
  • .
Re: Reading the program from a Atmega8L-8PU
« Reply #1 on: April 08, 2019, 02:38:48 pm »
The 4 pin header could be for programming the chip - something like voltage, ground, reset , program ... look on the back side of the board at the traces and where they are connected.

The chip could have the flash memory protected, so you may not be able to read the contents. There are lock bits and other flags.

Read datasheet from page 202 onward https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2486-8-bit-AVR-microcontroller-ATmega8_L_datasheet.pdf
 
The following users thanked this post: Yamin

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6206
  • Country: de
Re: Reading the program from a Atmega8L-8PU
« Reply #2 on: April 08, 2019, 02:50:11 pm »
Since the chip is socketed, the easiest way to read it would be to pull the chip and insert it into a programmer. (I assume you have one, and intend to use it to program the boot loader as well?)

This would still fail if the chip is read protected. The fact that the board is cheaply produced does not mean that the manufacturer did not care about their IP. Maybe even more so, if this device was made in large quantities, and it is easy to copy the physical circuit board.

But I don't think that you need the original ROM contents in order to re-use the board for something else. You should follow the PCB traces to see which processor pins are connected to which connector pins and other hardware on the board. That's much easier than to analyze the original program.
 
The following users thanked this post: Yamin

Offline YaminTopic starter

  • Frequent Contributor
  • **
  • Posts: 298
  • Country: mv
Re: Reading the program from a Atmega8L-8PU
« Reply #3 on: April 08, 2019, 05:48:47 pm »
Since the chip is socketed, the easiest way to read it would be to pull the chip and insert it into a programmer. (I assume you have one, and intend to use it to program the boot loader as well?)

This would still fail if the chip is read protected. The fact that the board is cheaply produced does not mean that the manufacturer did not care about their IP. Maybe even more so, if this device was made in large quantities, and it is easy to copy the physical circuit board.

I haven't got a programmer yet,(please advice on a good one to get). I was going to use the arduino uno to burn the bootloader and program the chip.
How can I check whether its read protected.

But I don't think that you need the original ROM contents in order to re-use the board for something else. You should follow the PCB traces to see which processor pins are connected to which connector pins and other hardware on the board. That's much easier than to analyze the original program.
I would like to do it just for the fun of it as I haven't done it before - would really like to get into it.

The 4 pin header could be for programming the chip - something like voltage, ground, reset , program ... look on the back side of the board at the traces and where they are connected.

The chip could have the flash memory protected, so you may not be able to read the contents. There are lock bits and other flags.

Read datasheet from page 202 onward https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2486-8-bit-AVR-microcontroller-ATmega8_L_datasheet.pdf


I thought of something else as well going through the datasheet,  how would it be possible to set it to external clock signal if I'm using the arduino IDE.  :o
 

Online ebastler

  • Super Contributor
  • ***
  • Posts: 6206
  • Country: de
Re: Reading the program from a Atmega8L-8PU
« Reply #4 on: April 08, 2019, 06:06:21 pm »
I haven't got a programmer yet,(please advice on a good one to get). I was going to use the arduino uno to burn the bootloader and program the chip.
How can I check whether its read protected..

The TL866, while it has some limitations e.g. with very old EPROMs, is good value for money. It has a big following here on the forum: https://www.eevblog.com/forum/blog/eevblog-411-minipro-tl866-universal-programmer-review/

(No need to read that entire thread. A lot of it is concerned with "hacking" the basic version to add in-circuit programming. But the company now sells a new programmer design, the TL866 II Plus, anyway, and this discussion no longer applies.)

When reading a protected chip via the programmer, the programmer software usually tells you that the read protect fuse is set. Or it will read the chip as "empty".

Quote
I would like to do it just for the fun of it as I haven't done it before - would really like to get into it.

Disassembling a microcontroller program of which you know neither the function, nor the peripherals connected to the I/O ports, is not fun...   ;)
 
The following users thanked this post: Yamin


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf