Microchip 24LC256/P memory register question

tonto2k

Member
Hi,

Just a quick question regarding memory registers, sorry if its been asked before. I have been looking up how to writei2c and readi2c on the 24LC256/P.

I understand about the i2c bit, however when I am reading the picaxe i2c pdf http://www.rev-ed.co.uk/docs/axe110_i2c.pdf it keeps on mentioning writing to the register.

From what I can tell the register is the storage i.e memory. However I don't understand all the $10, $59, $11 $03 etc.

If these are like I believe memory locations is there a table so I know what memory location 1 is ($00 $01 $02 something like this ? ! ?)

It mentioned in the microchip pdf for the 24lc256/p the 'entire array is 0000 to 7fff, Could someone explain please?

Sorry for rambling :)
 

Dippy

Moderator
I think this may be a terminology question.

The PICAXE data sheet refers to Registers and Address Registers as you say.
EEPROM Data Sheet refers to memory locations and addresses.
In fact, Microchip EEPROM data sheets rarely (if ever) use the word 'register'.

When Rev-Ed say "Address Register" think of it as the "Address" position.
And each Rev-Ed 'register' is a memory location.
A 256k EEPROM will use word sized Address values for Address_Size as you know.

Its a pain having non-standard terminology.

"entire array is 0000 to 7fff"
- well you know what 7FFF (hex) is in decimal don't you....
Convert 7FFF to decimal, add 1, times by 8(bits), then divide by 1024 and see what number you get (in kbits)
Don't muddle your bits with bytes.
 

tonto2k

Member
Thanks for clearing it up for me about the address register.

HEX ! ! I heard something about that a few years ago. I just had a look at a hex calculator then a hex table and I think thats what I am after :)

now when I want to put a value in memory location 1,2,3 etc I can use the hex table to help me.
 

Dippy

Moderator
I'd stick to normal decimal wherever possible. Reading/Writing from/to 'Address' (or 'Address location' or 'Memory location') is happy in decimals.

Sometimes hex is needed, sometimes hex is clearer (I find it useful when dealing with nibbles for example) , sometimes hex is habit and sometimes hex is used to show off ;)

Good luck.
 

westaust55

Moderator
Hi Tonto2k,

Also keep in mind also when writing blocks of data to an external EEPROMs the size of theEEPROM’s page buffer. The 24LC256 for example has a 64 byte page buffer.

If you write 1 byte at a time (ie in each writei2c or hi2cwrite statement) there is no problem.

If you start writing multiple bytes in one BASIC program statement and try to cross a 64 byte page “boundary” then once you reach that boundary, the EEPROMs internal address pointer rolls over to byte 0 in that same page
 
Top