SPI programmer for SST25VF016B

Thanks to my M17x I needed a way to program an SST25VF016B. The 25VF016B is a 3.3V SPI flash and I didn’t have anything that would program it. Thanks to some code I found at Sergey Malinov’s website I was able to build a programmer for this chip.

I built Malinov’s code in Linux. I also found some C code for driving the chip on Microchip’s website, but I didn’t use it. It is written for the Keil compiler. There is also Verilog code if you feel like doing this with a programmable logic device.
Malinov’s code uses a parallel port. Based on my CNC experience, I know it is really easy to kill a parallel port so I made my own interface for the parallel port to the flash. The buffer I used is a TI CD74HC366QDRQ1, a high-speed inverting three state buffer. Here is the schematic diagram.

The SPI programmer code runs on the command line. The options are read, write, id, status, and erase with read/write requiring a filename argument. To program a device you must first erase it or the data won’t be written correctly. Then write the image to the chip and verify it with read. You can use the “diff” command in Linux to verify the memory contents. There is also dhex, a nice program for verifying two binary files side-by-side.

Tags:

Thursday, August 16th, 2012 Electronics

Leave a Reply