Duplicating the EEPROM
in Propeller 1
Is there a way to set up the propeller to replicate the EEPROM to a 2nd EEPROM?
If I have my programmed EEPROM on P28 and P29, but want to hook up a second blank EEPROM, say to pins P26 and P27, could I have the propeller take the programming from the programmed EEPROM and copy it to the blank one?
So, this would be a standalone EEPROM programmer, you pop in a blank, turn on the circuit, it gets programmed, then you can remove it to use on other propellers.
Comments
You certainly can !
There's a few EEPROM code examples in GitHub, such as this one![:smile: :smile:](https://forums.parallax.com/resources/emoji/smile.png)
https://github.com/parallaxinc/propeller/tree/master/libraries/community/p1/All/Generic I2C EEPROM Driver
You'd probably want to run a loop from 0 to the size of the EEPROM, reading bytes (or pages for speed) from one EEPROM, writing to the other.
Fantastic! Thank you!
Technically, you only need one set of pins -- if you set the address on your copy-to EEPROM to something other than %000.
I've attached my EEPROM object. It's easy to use and has been vetted in several commercial projects. I would suggest using the .rd_block() method to get a page of bytes from the master EE and then use .wr_block() to copy them to the other EE. Easy-peasy. The PG_SIZE and PAGES constants in the object should make this pretty easy. Perhaps something like this:
...where buf1 is an array that is one EE page size.
That other github post is missing the RS232 Engine Object
But I do have Agyeman's ASCII0 STREngine.