Shop OBEX P1 Docs P2 Docs Learn Events
How to copy eeprom to eeprom — Parallax Forums

How to copy eeprom to eeprom

T ChapT Chap Posts: 4,223
edited 2009-10-16 18:13 in Propeller 1
I have a spare eeprom on a board that contains information that I want to copy the spare on other boards. I can write an app to extract the spare data, save it on a PC and transfer it to the next board, but was hoping there might be some system already available for this. The other option is to write a method that would transfer the 32k to a file on a USB thumbdrive, since there is a Vinculum on board. Then take the USB drive the next board and read/ it into the eeprom. This is a process I will need to do all the time, not a one off. The eeproms are surface mounted.

Comments

  • VIRANDVIRAND Posts: 656
    edited 2009-10-16 10:27
    Someone once did that with a Hydra (very vague memory).
    Hydra has a DIP socket EEPROM 128Kx8 even though only 32Kx8 is usually used.
    Hydra also has a Game Card which will start as soon as it is Hotplugged, which contains only
    another 128Kx8 eeprom SMD and some jumpers.
    Someone discovered that the Motherboard EEPROM (removable) changes address when the Card is plugged in.
    And there is an OBEX object to read and write EEPROMs using I2C.

    So as I understand the question, at least one removable eeprom that is wired to be accessible as well as the other one,
    means just a short program to read bits from one and write them to the other using the object.

    Before I got Prop Plugs and USB protoboards, I used to use HYDRA to program eeproms for other Propellers with the
    Propeller tool, but that's what you said you don't want to do. I agree with not using the PC all the time, but could you
    have meant something else?

    I'll assume you want to make a self-operating eeprom copier device out of a Propeller.
    It's possible with 3 eeproms to do that, and the 3rd eeprom holds the copying program that works as I described.
    The A0 A1 A2 pins are how the eeproms know what order they are accessible in.
    The dual 128K eeprom feature in the Hydra is a side effect of what might have been intended to disable
    the board eeprom but in practice it just moved it to a higher block of accessible memory.
    In other words, the A0A1A2 pins allow up to 8 eeproms connected in parallel but the binary number on the A pins
    tells them each who's first second third fourth fifth sixth seventh eighth in order.

    huff-puff....

    program eeprom shound be first (0th). All A's grounded.
    since there are at least 3 eeprom sizes maybe the ones that need copying should be 4th and 6th,
    so in the program sockets one has A2 at +3.3V and the other has both A1 and A2 at +3.3V.

    The program might have to do a little figuring out the size of the eeproms and if that affects their
    memory address, unless you plan on copying only 32K eproms, then you just have to write a
    program that reads the 4th block of eeprom memory and writes it immediately to the 6th block.

    My choice of 0th, 4th and 6th would be arbitrarily convenient for me.
    You can put the eeproms in binary 000 (program) binary 001 (to be copied) binary 010(to be the copy)
    if that way is easier for YOU, and it probably IS.
  • MicrocontrolledMicrocontrolled Posts: 2,461
    edited 2009-10-16 11:32
    I'm building a mini-project right now for Gadget Gangster that loads, clones, and erases EEPROMs. I use the Basic_I2C_Driver and I read the EEPROM starting at the beginning of the propeller's initialization code and writing it to the second EEPROM in sequence. You then have a perfectly cloned EEPROM.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Computers are microcontrolled.

    Robots are microcontrolled.
    I am microcontrolled.

    But you·can·call me micro.

    Want to·experiment with the SX or just put together a cool project?
    SX Spinning light display·


  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-16 14:36
    FemtoBasic and its derivatives already has a COPY statement that will copy a program from one 32K "page" of an EEPROM to another. It uses the length information in the program to control how much is copied. Either source or destination EEPROM can be attached to the boot EEPROM I/O pins (30/31) or any other even/odd pair of I/O pins.

    This COPY statement can be used in a program, so you could write a program in FemtoBasic that would copy one EEPROM to several others when a PS/2 keyboard key was pressed and display status messages on an attached TV or VGA monitor.
  • Erik FriesenErik Friesen Posts: 1,071
    edited 2009-10-16 16:47
    This might be off the wall but a pickit2 is supposed to be able to read and write the i2c eeproms.
  • T ChapT Chap Posts: 4,223
    edited 2009-10-16 16:50
    Mike the thing about what you are saying is it appears the copy from and paste to eeprom must be connected at the same time. That is not the case, there must be a standalone storage medium like a PC or data card. All the chips are SMT and can't be swapped. I am thinking to just create a program that the Prop runs to archive te entire spare eeprom to USB drive, then plug in the drive to the next device and read the USB and write the eeprom from it. Two methods: ArchiveEepromToUSB and UpdateEepromFromUSB.


    The addresses can't be changed.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-16 18:13
    FemtoBasic can also copy a Spin program to and from an SD card file. You can also just take the code and either modify it to suit your purposes or use the existing routines as models for what you want. They copy the EEPROM in 64 byte segments taking advantage of page mode to speed up the operation.
Sign In or Register to comment.