Discussion in "8051 Discussion Forum" started by    Abhinav    Jun 13, 2010.
Sun Jun 13 2010, 06:43 PM
#1
Hi friends

i am a little confused while using AT24C04. like how many addresses are available for storing the data bytes?

The slave address is 1010 for all EEPROM'S so can we use 2 EEPROM's with one micro?

How to store values bigger that a byte in EEPROM?

i am using BASCOM for coding.

thank you all.
Sun Jun 13 2010, 07:57 PM
#2
>The slave address is 1010 for all EEPROM'S so can we use 2 EEPROM's with one micro?
those are upper 4 bits of 7-bit address. the lower 3 bits are configurable which means yes you can use more than 1 rather total of 8 such EEPROMs at a time.

>How to store values bigger that a byte in EEPROM?
split them in 2 or 3 depending on how big your data is..
let say if its a 16-bit value then:
EEPROMWrite(Add, data>>8); // write first 8bits
EEPROMWrite(Add+1, data);//write next 8 bits to next address

sorry i am not good at bascom

and for your doubt regarding the subaddress/data address of EEPROM:
before you calculate the size of sub address you need to know how much memory is addressable. lets take an example of 24C02 EEPROM.
24C02 is 2kbit = 2/8 kByte = 1/4Kb = 256bytes

so to accomodate 256 addresses you need 1 byte (00 to 255). so your sub address will only be of 1 byte.

now lets take case with 24C16
24C16 is 16Kbit = 16/8Kbyte = 2Kb = 2048 bytes
so we need atleast 2 bytes to accomodate 2048 addresses. so sub address now will be of 2 bytes in this case.

so you can see how we decide the internal data addresses of EEPROM.
Tags I2C eeprom addressingEEPROM interfacing 8051I2C EEPROM internal addressingi2c eeprom sub addressHow i2c eeprom addressing works
Mon Jun 14 2010, 07:56 AM
#3
Hi ajay

Thanks for a amazing detailed reply.

As per this website http://www.digchip.com/datasheets/parts/datasheet/054/AT24C04-10PC-1_8.php
we can connect maximum of-

AT24C01/02 = 8
AT24C04 = 4
AT24C08 = 2
AT24C16 = 1

because of their reducing hard wired addressing pins.

I cannot understand fully the meaning of below-

"AT24C04, 4K SERIAL EEPROM: Internally organized with 32 pages of 16 bytes each,
the 4K requires a 9-bit data word address for random word addressing"
as written in datasheet.

"The 4K is internally organized with 256 pages of 2-bytes each."
as described on digichip website.

thank you so much.

Mon Jun 14 2010, 02:25 PM
#4
when addressing register there are two path, first on which page that register lies second what is the address of that register on that particular page.

you can assume MSB of address to be as page address and LSB as address of register on that page. so you can understand better what is page address and how it relates to register address.

even in 8051 we have page addressing of ram in which RAM is organized as 256 pages of 256 bytes each. so total accessible ram by 8051 is 256*256 = 65536 bytes. when interfacing external ram the page address is given by P2 and register address is given by P0. relate to it and you will understand.
Thu Jun 17 2010, 07:07 PM
#5
hi ajay,

now i understood almost all things just one to ask that if start sending data bytes from address 0 then i think i have to send address(16) again after 16 bytes else first byte will be overwritten.

am i right ?


thanks
Thu Jun 17 2010, 07:20 PM
#6
write operation will not work if you dont send a stop after page size limit of EEPROM.

You can see every EEPROM datasheet explains Page write operation differently from byte write operation. datasheet will provide you complete details.

Get Social

Information

Powered by e107 Forum System

Conversation

Tue Oct 14 2014, 01:45 PM
skrishna
how do i write an ALP equivalent 7segment display interfacing embedded c program (both 8051 microcontroller)
Sat Oct 11 2014, 06:41 PM
vaidehi
want details of seven segment LED display common cathode ( IC CD 4026)
Fri Oct 03 2014, 12:52 PM
Narsim
Rickey you inspired me a lot ... I am also planing like you ...
ExperimenterUK
Wed Oct 01 2014, 09:33 PM
We're back.. we had a bug, but posting is back to normal
ExperimenterUK
Sat Sep 13 2014, 04:34 PM
jaimin1212,Pimpalkhare Create a thread for your question
jaimin1212
Sat Sep 13 2014, 06:35 AM
i want to make self balancing robot using MPU6050 using atmega8.. please help to get data of gyro and accelerometer from this sensor through atmega8.
Thu Sep 11 2014, 01:00 PM
Sunil Pimpalkhare
Hello sir, I am trying to make Wearfin project https://www.youtube.com/watch?v=iZ6PVBvQf-g so can u help me in teaching how to built the program???
Thu Sep 11 2014, 06:21 AM
hariom panday
plz hlp me in my project
iec.naga
Tue Sep 09 2014, 05:19 AM
spi
Mon Sep 08 2014, 12:14 PM
fameem
water changing in fish tank automatically using microcontoller with timer. send idea to me

Downloads

Comments

pddung93
Sun Oct 19 2014, 01:56 PM
msideal
Thu Oct 16 2014, 08:48 AM
robotgirl
Tue Oct 14 2014, 06:23 PM
BRV64
Mon Oct 13 2014, 05:48 AM
menadjelia
Mon Oct 13 2014, 02:47 AM
kulbhushan
Sun Oct 12 2014, 12:20 PM
HarrySid
Fri Oct 10 2014, 05:15 AM
pphamtuan
Thu Oct 09 2014, 03:58 AM

Online

Guests: 38, Members: 0 ...

most ever online: 182184
(Members: , Guests: 182184) on 06 Aug 2010: 05:37 AM

Members: 37531
Newest member: pddung93
Forum Activity
msideal Avatar
Posted By msideal
Sun Oct 19 2014, 07:25 PM
Is there anyone who could help me in solving this ...
jona Avatar
Posted By jona
Sun Oct 19 2014, 02:03 AM
Has anyone used this device? I was able to get the...
kirangowle Avatar
Posted By kirangowle
Sat Oct 18 2014, 03:49 PM
Thanks ExperimenterUK
kingrosekhan123 Avatar
Posted By kingrosekhan123
Sat Oct 18 2014, 01:46 PM
i try this code but i dnt know where is the proble...
kulbhushan Avatar
Posted By kulbhushan
Sat Oct 18 2014, 11:50 AM
ok.. You need to divide 320x240 LCD area into corr...
msideal Avatar
Posted By msideal
Sat Oct 18 2014, 07:47 AM
Actually I want to take inputs from the Push butto...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Oct 17 2014, 07:37 PM
Can anyone tell me that the situation is now with ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Oct 17 2014, 07:22 PM
Can you tell us more about your project.What would...
ExperimenterUK Avatar
Posted By ExperimenterUK
Fri Oct 17 2014, 07:18 PM
Can you explain more about your problem.What I/O d...
superknoty Avatar
Posted By superknoty
Fri Oct 17 2014, 01:38 PM
I will carry on my project which I have start with...