While trying to open a chinese camera pen, unfortunately the PCB inside it got damaged. Few of the PCB traces got cut and it became useless. After few days, I removed an 8 pin IC with SO8 package from the PCB. I was curious to know what it is, so I googled the part number 25FW406A but I couldn’t find any exact match. I found some part number similar to that and I concluded that it is an SPI flash. Later I got a datasheet from ‘ON semiconductor’ for a similar part -LE25U40CMD which is a 4M-bit SPI flash memory. I soldered the IC on a common board, powered it with 3.3v and interfaced it to a TI stellaris launchpad via SPI port. According to the datasheet the SPI port need to be initialized in mode 0 or 3. I tried few commands listed in the datasheet and got proper response from the chip, the CHIP ID doesn’t matches but that is expected because it is not the same part. I wrote functions for erasing, reading and writing the flash memory and tested it successfully using the launchpad.
Happy Christmas and Happy New Year wishes from Attiny13 – [Link]