Reading the program from a Atmega8L-8PU - Page 1
Forum section: electronics / general

author: Yamin
author_rank: Frequent Contributor
timestamp: April 08, 2019, 02:24:11 pm
content: 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

author: mariush
author_rank: Super Contributor
timestamp: April 08, 2019, 02:38:48 pm
content: 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 onwardhttps://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2486-8-bit-AVR-microcontroller-ATmega8_L_datasheet.pdf

author: ebastler
author_rank: Super Contributor
timestamp: April 08, 2019, 02:50:11 pm
content: 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.

author: Yamin
author_rank: Frequent Contributor
timestamp: April 08, 2019, 05:48:47 pm
content: Quote from: ebastler on April 08, 2019, 02:50:11 pmI 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.Quote from: ebastler on April 08, 2019, 02:50:11 pmI 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.Quote from: mariush on April 08, 2019, 02:38:48 pmI 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.

author: ebastler
author_rank: Super Contributor
timestamp: April 08, 2019, 06:06:21 pm
content: Quote from: Yamin on April 08, 2019, 05:48:47 pmThe 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".QuoteDisassembling a microcontroller program of which you know neither the function, nor the peripherals connected to the I/O ports, isnotfun...