Shop OBEX P1 Docs P2 Docs Learn Events
24C1024 and I2C_ROMEngine — Parallax Forums

24C1024 and I2C_ROMEngine

JohnCJohnC Posts: 64
edited 2016-03-02 16:56 in Propeller 1
I'm having a hard time accessing the top half of a 24C1024 attached in place of the regular 32k EEPROM on pins 30 & 31. The prop programs and runs as usual, and I'm able to read and write to the empty space between 33K - 64K without issue. Just not having any luck in the higher address space.

I'm using Kye's I2C_ROMEngine driver version 1.1

On this EEPROM, I've tied pin 2 (A1) to ground.

Has anyone else used a 24C1024 successfully?

For example, two addresses I'm passing to the function writeByte are $0002FFF0 and $0002F010.

In Kye's functions 'writePage' and 'readPage' I changed the code

repeat ((byteCount <# (65_536 - (RAMaddress #> 0))) #> 0

to read

repeat ((byteCount <# (131072 - (RAMaddress #> 0))) #> 0)

...in an attempt to access the higher memory space.

But perhaps I'm missing something else?

Comments

  • The address limit for the 24C1024 is 0x01FFFF. The two addresses you are passing to writebyte are beyond the upper limit and are instead accessing 0x00FFF0 and 0x00F010 due to rollover.
  • MODS - feel free to delete. I made a math error and was attempting to read and write to addresses which were far outside the 1024's available address space. The driver works as advertised.
  • JohnCJohnC Posts: 64
    edited 2016-03-02 19:40
    Thanks, Hal. As you were typing I realized I was multiplying my banks by $1000 rather than $100.

    <sigh>
  • JohnC wrote: »
    MODS - feel free to delete. I made a math error and was attempting to read and write to addresses which were far outside the 1024's available address space. The driver works as advertised.

    John,

    We do not delete posts that will help others. This is a mistake that others may run into.

    Thanks for posting your solution.! :)


  • Note that the AT24C1024 is obsolete and has been replaced by the AT24CM01, backward compatible and functionally equivalent.
  • JohnCJohnC Posts: 64
    edited 2016-03-02 19:37
    FYI here's a link to the Digikey part I'm using. It's made by Freemont Micro Devices. After sorting out my math error, I can confirm that the stock ROMEngine driver works with no changes.
Sign In or Register to comment.