Shop OBEX P1 Docs P2 Docs Learn Events
24LC256 Addressing — Parallax Forums

24LC256 Addressing

cjrussellcjrussell Posts: 6
edited 2012-10-30 09:32 in Propeller 1
Hey guys. I've searched through here and found a few articles that skim the subject, but, couldn't find what I was looking for. This may be a very simplistic question, but I've been racking my brain for 2 days and still have nothing.

I'm trying to read and write to a 24LC256 (Prop's native EEPROM attachment). I'm trying to read/write to a secondary EEPROM, not the one that the Prop stores it's programming to. The chip states its a 32K x 8 EEPROM. In the addressing documentation (http://ww1.microchip.com/downloads/en/DeviceDoc/21203R.pdf) it says the address is 15-bits long. I had originally assumed (bad idea) that the address was byte for byte. If the address can only be 15 bits, this can't be the case. So, does each address equal 8 bytes? IE Address 0x0000 contains 8 single byte entries, and address 0x0001 contains an additional 8? With the code I'm using, this doesn't seem to be the case, as I have to increment my address by 4 every time I write a long value to prevent overwriting the previous long. So if it *is* byte-for-byte addressing, how do you get past the 32k boundary? Or am I just so confused by this entire thing that I've missed a very simple answer? Thanks in advance as always.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2012-10-30 09:24
    First of all, it's 32K x 8 bits or 32K bytes, so it only needs 15 bits for addressing. A lot of people get thrown off by the part numbering scheme which shows the number of bits of memory in the device even though it's a byte addressable device that always works in units of a byte. The address that you supply to the chip is 2 bytes long or 16 bits with the high order bit ignored for this device. A 24LC512 uses all 16 bits of the address to provide 64K bytes. A 24LC1024B works by looking like two separate 64K byte devices using two device select codes (out of 8 possible EEPROM devices on an I2C bus).
  • cjrussellcjrussell Posts: 6
    edited 2012-10-30 09:32
    *bangs head**bangs head**bangs head* Yep...something small and simple I overlooked. How wonderful it is that a single word would be my problem. Thanks Mike, greatly appreciated! I think I can stop banging my head against the desk now...sigh.
Sign In or Register to comment.