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

Sat Apr 25 2015, 11:29 PM
1
-1'
Sat Apr 25 2015, 11:29 PM
-1'
1
Sat Apr 25 2015, 06:16 AM
rohan_verma
sir this circuit is tested?can i use it directly on developing PCB
Sat Apr 25 2015, 06:13 AM
rohan_verma
MSCOMM32.ocx cannot be copied in the systems folder even with administration rights.
Fri Apr 24 2015, 01:58 AM
mostfa
please fix the LCD Interfacing Tutorial as all pictures is gone
Fri Apr 24 2015, 01:57 AM
mostfa
LCD Interfacing Tutorial
Qasim359
Tue Apr 21 2015, 07:31 AM
hello every one i have made pic industrial and domestic timer and i can,t understand c code written in Hi-Tech please send me Mikroc code for this project anyone...................
ExperimenterUK
Wed Apr 15 2015, 05:07 PM
@Bibek.. and everyone. Create threads if you need help. The chat box is just for chat
ExperimenterUK
Wed Apr 15 2015, 05:06 PM
@mohd atif ..login..create a post/thread,then I can post a copy of the missing file
Mon Apr 13 2015, 07:03 PM
mohd atif
@experimenteruk I didn't get you

Downloads

Comments

Seven
Thu Apr 23 2015, 12:02 AM
killbillpandey
Wed Apr 22 2015, 09:07 PM
Qasim359
Tue Apr 21 2015, 07:06 AM
lumines
Sat Apr 18 2015, 11:30 PM
[email protected]
Sat Apr 18 2015, 05:02 PM
arvindarunoday
Sat Apr 18 2015, 04:26 PM
samarhbk
Sat Apr 18 2015, 12:57 PM
chitty789
Tue Apr 14 2015, 06:14 PM

Online

Guests: 44, Members: 0 ...

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

Members: 37629
Newest member: Seven
Forum Activity
ExperimenterUK Avatar
Posted By ExperimenterUK
Sat Apr 25 2015, 06:03 PM
plz tell me how i edit this code file in MPLAB if ...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Apr 23 2015, 08:00 PM
gsdvprasad Avatar
Posted By gsdvprasad
Thu Apr 23 2015, 12:49 PM
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Apr 21 2015, 04:37 PM
I doubt anyone has Mikroc code.It is probably more...
ExperimenterUK Avatar
Posted By ExperimenterUK
Tue Apr 21 2015, 04:24 PM
A multimeter won't help :(The most practical way i...
ankitbajaj01 Avatar
Posted By ankitbajaj01
Tue Apr 21 2015, 03:21 PM
As I don't have CRO, Can we test the crystal with ...
Qasim359 Avatar
Posted By Qasim359
Tue Apr 21 2015, 07:26 AM
i can,t understand C Code written in Hi-Tech pleas...
gaurav7577 Avatar
Posted By gaurav7577
Mon Apr 20 2015, 07:04 AM
k..let me make all this simple for u so u can add...
ajay_bhargav Avatar
Posted By ajay_bhargav
Sun Apr 19 2015, 06:50 PM
Please zip and attach the code in future. You forg...
ajay_bhargav Avatar
Posted By ajay_bhargav
Sun Apr 19 2015, 06:48 PM
It is really hard to say which course and/or insti...