# Print out contents of Flash Drive

#### cstroh

Joined Jan 16, 2019
79
Is it possible to access and print out the contents of a flash drive of a microcontroller?

#### Papabravo

Joined Feb 24, 2006
13,741
Is it possible to access and print out the contents of a flash drive of a microcontroller?
I don't think you meant flash drive. I think you meant flash memory. It might be possible if the folks who loaded up the flash memory did not set the protect bits. If they did you are limited to opening the package and scanning the die with a powerful microscope.

#### cstroh

Joined Jan 16, 2019
79
Thanks for the reply and correction. If I was to assume that the protect bits was not used, how might I proceed?

#### Papabravo

Joined Feb 24, 2006
13,741
Thanks for the reply and correction. If I was to assume that the protect bits was not used, how might I proceed?
Is the device on a board or is it loose?

#### MrChips

Joined Oct 2, 2009
21,143
Here is how reading and writing of flash memory on an MCU works.

There has to be some kind of mechanism to write and verify MCU memory. This can be done in one of two ways.

1) The MCU has build-in hardware mechanism such as SPI, I2C, UART, JTAG, SWD, 1-Wire, etc. which can take instructions from an external programming apparatus.

2) The MCU has a "bootstrap" mechanism which allows MCU SRAM to be loaded and executed. This program takes control and can program and verify flash memory.

Using one of the above mechanisms, firmware code is programmed in flash. This is then read back for verification. In secured systems, the security fuse is activated so that one can no longer verify the code. If this step is taken then you are out of luck.

#### cstroh

Joined Jan 16, 2019
79
The PIC16F628-18 pin is board mounted with an 18 pin socket so the chip is easily removed from the board. Something fell on the board and if I cannot program a new chip, the board is toast. How do I confirm if the security fuse has been activated?

#### MrChips

Joined Oct 2, 2009
21,143
You need to get a PICkit (2, 3, or 4) and Microchip's MPLAB IDE to access the chip.

#### cstroh

Joined Jan 16, 2019
79
Thank you.

#### Papabravo

Joined Feb 24, 2006
13,741
To add to what @MrChips posted, if you have a loose chip there are numerous general purpose devices that will read a device and dump the contents to a file. We used to have a Data I/O 29B and a BP-1200. If you have one of these devices you can use it.

If you had another board, you might look for an apparently unused 4-10 pin connector and that would be to the device programming interface. In the good old bad old days devices got programmed BEFORE the got soldered to the board. With the widespread use of Flash memory that could be reprogrammed it becomes, way cheaper to solder blank chips on the board and flash the latest firmware just before the board leaves the factory. A programming connector is essential for this to work. I'm surprised to hear of a programmable chip in a socket.

Last edited:

#### jpanhalt

Joined Jan 18, 2008
9,426
The PIC16F628-18 pin is board mounted with an 18 pin socket so the chip is easily removed from the board. Something fell on the board and if I cannot program a new chip, the board is toast. How do I confirm if the security fuse has been activated?
If the chip is damaged and not working, there is a chance it won't be able to be read regardless of whether the security fuse is set. How is the chip damaged? Are pins broken off? The fact it is socketed may be a sign it is protected, thus leaving the manufacturer a route to updating.

At least 5 pins will need to be intact: 4(VPP), 5(VSS), 12(prog clk),13(prog dat), and 14(VDD). If low-voltage programming is enabled, you may need pin10 (PGM). It's been quite awhile since I used that chip, and I am not sure whether a chip with low-voltage programming enabled can be read without the PGM pin. I suspect it's not needed, but I am not sure.

#### cstroh

Joined Jan 16, 2019
79
Thanks all for your responses. All the pins are serviceable. At present I suspect the chip is bad because of two board responses that should be mutually exclusive. The only damage I noticed was an area of the label attached to the chip was damaged by what fell on the board.

#### jpanhalt

Joined Jan 18, 2008
9,426
Programs don't rattle when they are dropped. That is, it's not like dropping a pile of index cards.

#### cstroh

Joined Jan 16, 2019
79
Picstart Plus is no longer available from the vendor but there are some pre-owned on ebay.

#### jpanhalt

Joined Jan 18, 2008
9,426
Tell us what you found. There are several versions. The original was light beige. Then there was an update that required a backpack board on the inside (user installed). Ar the same time or slightly before, a new version with a different chip came out. That version was usually black.

I had the original version and had updated it. Gave that away thinking no need. Of course, I soon needed one for a C7x chip. So, I got a newer, back version for $20 on eBay. For a non-updated beige version, I wouldn't pay$10.

Edit: I know it is not available from Microchip. I was referring to used versions. Is there some reason you can't give a link? Oh, be sure it comes with the power supply!

#### cstroh

Joined Jan 16, 2019
79
Thanks again. The one Picstart Plus on ebay is a bid of $20 and is black and model 10-00157. All the others go from$40 to \$175. I guess I like the option from MrChips on the PICKit.

#### cstroh

Joined Jan 16, 2019
79
Am I correct that if the chip memory is protected, none of this will work?

#### bertus

Joined Apr 5, 2008
20,540
Hello,

The picstart is probably very old and will not support many devices.
Also this is also why I would not use it:
Microchip Picstart Plus Development Programmer Part Number 10-00157
power supply not included
software not included

Bertus