Two EEPROMs on the same IO pins
Goog
Posts: 65
I got my new chips today (see C64 ROM Loader topic for more info)... I hooked them up to my breadboard and was wondering if there was something special I had to do to address the two chips individually.· I tied both chips' SDA and SCL lines to pins 5 and 6 (so they share the same I/O lines).· I pulled-up pin 0 (address line 0) on one of the chips, thinking that would give it a unique address.
To test this, I formatted each memory location with $00, to give it a known state.· Then, I wrote $AA into location $7FFF, $AB to $8000, $AC to $8001, and $EF to $FFFF.· When reading back all memory locations, $AA comes back in $7FFF, $BFFF, and $FFFF - no other memory addresses have non-zero values.
I also verified that each EEPROM works when hooked up individually by writing to and reading from each address from $0000 to $7FFF.· It's just when they are tied together is when I have problems.
Have a look at my attached sample program, paying close attention to the ReadByte and WriteByte routines.· Any ideas on why it doesn't work right?
Goog
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
To test this, I formatted each memory location with $00, to give it a known state.· Then, I wrote $AA into location $7FFF, $AB to $8000, $AC to $8001, and $EF to $FFFF.· When reading back all memory locations, $AA comes back in $7FFF, $BFFF, and $FFFF - no other memory addresses have non-zero values.
I also verified that each EEPROM works when hooked up individually by writing to and reading from each address from $0000 to $7FFF.· It's just when they are tied together is when I have problems.
Have a look at my attached sample program, paying close attention to the ReadByte and WriteByte routines.· Any ideas on why it doesn't work right?
Goog
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
Comments
I almost hate to ask, but do you get $AA at $3FFF as well? What's the part number of your EEPROM? Also, try this:
··EEPROM_Addr1 = %1010_0010
The last bit is the R/W bit, not an address bit. A0 is in bit 1.
-Phil
No, I was not getting any other values - just the ones I listed. But it doesn't matter now because it seems to work now that I got the address bits in the right place! [noparse]:D[/noparse]
Thanks - you are a great help!!!
Goog
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
http://www.ramtron.com/doc/Products/Nonvolatile/Detail.asp?ID=41&gr=5
Spec sheet here:
http://www.ramtron.com/lib/literature/datasheets/FM24C256ds_r3.1.pdf
Goog
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Doing my part to keep the Commodore 64 alive!
http://www.commodorestuff.com
·
Again with the good news!
james