Discussion in "8051 Discussion Forum" started by    Abhinav    Jun 13, 2010.
Sun Jun 13 2010, 02: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, 03: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, 03: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, 10:25 AM
#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, 03: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, 03: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

ajay_bhargav
Sat Aug 30 2014, 12:15 PM
@sufiyan, You can use solenoid lock in place of LED.
Fri Aug 29 2014, 12:17 AM
sufiyan
please can you tell me which type of lock activator should i connect in place of LED? can i use selenoid lock actuator
ajay_bhargav
Thu Aug 28 2014, 06:34 AM
Please post questions in forum
Thu Aug 28 2014, 01:44 AM
yednekachew
can you give a project made bay proteus software
Mon Aug 25 2014, 07:12 AM
Vinod Soni
Hi Sir, How can i make this RFID with ATMega16/32 controller
pavanjain
Sat Aug 23 2014, 05:10 AM
Sir i want to download the hex file in P89v51rd2 microcontroller using max232 IC but we not load the program in IC
Tue Aug 19 2014, 04:51 PM
allen ndumu
please i will like to know if the problem of speed control of dc motor using keypad and l298 was if yes can i have the complete project send it to the address i really need to see it
Tue Aug 19 2014, 10:47 AM
Amit Bisht
sir i want to have some trending projects on which i could work related to ATmega 16 microcontroller
ExperimenterUK
Sat Aug 16 2014, 04:16 PM
@diligent . create a thread
Sat Aug 16 2014, 03:17 PM
diligent
in assembly langauage programming..

Downloads

Comments

bobparihar
Mon Sep 01 2014, 06:19 AM
vijit
Sun Aug 31 2014, 08:33 AM
[email protected]
Sat Aug 30 2014, 04:45 PM
enisi
Wed Aug 27 2014, 06:08 AM
sadalakshmi
Wed Aug 27 2014, 12:39 AM
Paecake
Sun Aug 24 2014, 04:07 PM
pavanjain
Sat Aug 23 2014, 02:33 AM
samchovatiya
Thu Aug 21 2014, 02:30 PM

Online

Guests: 40, Members: 0 ...

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

Members: 37504
Newest member: bobparihar
Forum Activity
Peter_Parker Avatar
Posted By Peter_Parker
Mon Sep 01 2014, 06:19 PM
Just to add to this,I've connected this now to a C...
ajay_bhargav Avatar
Posted By ajay_bhargav
Mon Sep 01 2014, 07:28 AM
Which RFID module are you using? Post link to the ...
ajay_bhargav Avatar
Posted By ajay_bhargav
Mon Sep 01 2014, 07:28 AM
We prefer to use English language on our forums. B...
bobparihar Avatar
Posted By bobparihar
Mon Sep 01 2014, 06:33 AM
i am using a RFID module, i want to connect reader...
ajay_bhargav Avatar
Posted By ajay_bhargav
Sat Aug 30 2014, 12:03 PM
Forgot to attach files. This has source for both R...
ajay_bhargav Avatar
Posted By ajay_bhargav
Sat Aug 30 2014, 11:56 AM
I found a very good working source but its for PIC...
siddique Avatar
Posted By siddique
Sat Aug 30 2014, 03:34 AM
Have you tried using the TX setup to receive and v...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Aug 28 2014, 03:31 PM
So, I don't think there is any need to load any da...