eeprom address

rob nash

Senior Member
hello,
am struggling to understand the eeprom address which is a 24lc256 i have made one board which i followed the manuals and that work fine with this

i2cslave %10100000, i2cfast, i2cword

now im trying a second board which i become stumped on if i
tie the A0 high
Q. do i use a resistor i.e 4.7 or a wire link to tie A0 high ?

and would the address be
i2cslave %10100010, i2cfast, i2cword


now for a stupid moment with resistors is 4.7 (yellow violet red)the same as 4k7
cheers rob
 

hippy

Technical Support
Staff member
You can usually tie A0 to the +V or use a resistor. A resistor is useful because you can then remove the original Eeprom, temporarily connect A0 of the new to 0V and test that with code you know works for the Eeprom which has been removed. Remove the 0V link and use both Eeprom.

Your Eeprom device address of %10100010 is correct.

4.7 is 4.7R or 4R7, not the same as 4K7. A 4.7K is the same as 4K7 so that may just be a typo. You want 4K7, 4700R, 4 7 00, so, yes; yellow, violet, red.
 
Last edited:

westaust55

Moderator
It is not essential to use resistors on the 24LC256 address pins but can be helpful for a qucik change in the future so yes a 4.7 kOhm is okay.

When you change the address pins you need to alter the slave address to match

i2cslave %1010 A2 A1 A0 0, i2cfast, i2cword

so if all three pins are low you have %101000000

if A0 is pulled high then the slave address is %101000010


yellow violet red = 4 7 00 = 4k7 Ohms = 4.7 kOhms . . . red is multiplier and red = 2 so 10^2 = 100
 

westaust55

Moderator
You can usually tie A0 to the +V or use a resistor. A resistor is useful because you can then remove the original Eeprom, temporarily connect A0 of the new to 0V and test that with code you know works for the Eeprom which has been removed. Remove the 0V and link and use both Eeprom.

Your Eeprom device address of %10100010 is correct.

A resistor of yellow, violet, red translates as 4, 7, 1, the last digit being a power-of ten, so 490R. 4.7 is 4.7R or 4R7, not the same as 4K7. A 4.7K is the same as 4K7 so that may just be a typo. You want 4K7, 4700R, 4 7 00, so; yellow, violet, orange.
Black = 0 , brown = 1 and red = 2

orange = 3 ==> mutliplier of 10^3 = 1000
 

hippy

Technical Support
Staff member
Thanks Westaust55, and I wasn't quick enough to get my correction in before others noticed !

Moral : Don't count, "black, brown, red ..." on your fingers then number fingers 1 to 10, and actually remember what powers-of ten are, 10E1 != 0 :)
 

westaust55

Moderator
left hand and
- little finger would be 1 (%0001) finger as favoured in Europe
- middle finger would be 4 %00100
- thumb: up = great while down = demise
 
Top