Shop OBEX P1 Docs P2 Docs Learn Events
Unable to write to 64K EEPROM Upper Half — Parallax Forums

Unable to write to 64K EEPROM Upper Half

william chanwilliam chan Posts: 1,326
edited 2008-03-22 08:41 in Propeller 1
Help !

When I write to an address higher than 32K in a 24C512 eeprom,
like below,

OBJ
i2c : "basic_i2c_driver"

eeprom.WriteLong(i2c#bootpin,i2c#eeprom,32768,data)

it actually overwrites the Propeller's own program.
This happens everytime.
Then the Propeller cannot be reset since it's own program is corrupted.

What could be wrong?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.fd.com.my
www.mercedes.com.my

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-21 14:25
    Are you sure you have a 24C512 EEPROM? What you wrote should work with a 24C512.
  • william chanwilliam chan Posts: 1,326
    edited 2008-03-21 15:17
    I just bought it from Farnell.
    Everything else works with this eeprom.

    Have you tested the basic_i2c_driver with this eeprom before?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
  • hippyhippy Posts: 1,981
    edited 2008-03-21 15:58
    You can try writing to $FFFF and similar top-32KB addresses and checking what is written there and the corresponding lower-32KB addresses. Any overwriting of the top end of the lower-32KB should have less impact on the program which is being bootloaded.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-03-21 16:08
    The basic_i2c_driver has been tested on a Propeller Protoboard which uses an Atmel 24C512.
    There's nothing in the code that would cause addresses to wraparound at 32K. The only mechanism for
    what you're reporting would be a substitution of a 32K byte EEPROM for the expected 64K byte EEPROM.
  • william chanwilliam chan Posts: 1,326
    edited 2008-03-22 08:41
    Sorry Mike and everyone else.
    It was a wrong chip that was plugged in.
    The basic_i2c_driver now works with the correct 24LC512 chip.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.fd.com.my
    www.mercedes.com.my
Sign In or Register to comment.