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 Jan 31 2015, 11:17 AM
Pradeep Singh
I'm using 8051 microcontroller and want to configure HC-06 with it but I'm not able to find out what problem is occuring as my blueethooth is getting connected but no communication between blwutooth and pc/andriod phone
sachinmm
Sat Jan 31 2015, 05:23 AM
hello sir,i ask the question related to 7 segment display plz help me.
Thu Jan 29 2015, 11:24 AM
durai
I found discussion relevant to my problem (link:http://www.8051projects.net/t59199/gsm-cdma-discussion/flashing-new-firmware-in-sim900-modem.htm) but i could not find the project mentioned in that discusion
Thu Jan 29 2015, 11:21 AM
durai
Hi i am using a SIM/900A GSM modem, I want to send email with an attachement using a microcontroller but when i try to use AT_Email commands it gives me error,I think modem doesnot support those commands,is there any other way to send mail using that modem??
ajay_bhargav
Thu Jan 29 2015, 06:54 AM
@gaurav, please mail me message you're trying to post.
ExperimenterUK
Thu Jan 29 2015, 01:17 AM
bhagyesh.bhavasar/gaurav.k I can post with Firefox. Can you try other browsers ?
naqirizvi
Wed Jan 28 2015, 08:08 AM
the web theme is too much buggy and heavy , admin please change it to simple theme, so that user can browse quickly
naqirizvi
Wed Jan 28 2015, 08:07 AM
some one please share software name or ebooks related to avr
bhagyesh.bhavasar
Tue Jan 27 2015, 11:06 AM
i want to share my project but there is problem occurred during postng
bhagyesh.bhavasar
Tue Jan 27 2015, 05:58 AM
@ExperimentalUK i have used that purple button but same as previous it takes me to blank page

Downloads

Comments

sachinmm
Thu Jan 29 2015, 07:09 AM
nawfel
Sat Jan 17 2015, 07:27 AM
Rohi123
Sat Jan 10 2015, 11:00 AM
safakarici
Fri Jan 09 2015, 08:55 PM
Nikita_Pinjare
Thu Jan 08 2015, 03:10 PM
mayank058
Wed Jan 07 2015, 05:43 AM
Overeating
Tue Jan 06 2015, 05:56 AM
trancebreaker11
Sun Jan 04 2015, 07:42 AM

Online

Guests: 31, Members: 0 ...

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

Members: 37574
Newest member: sachinmm
Forum Activity
sankalp_s Avatar
Posted By sankalp_s
Fri Jan 30 2015, 05:40 PM
you need to remove jump statements from main progr...
mayank058 Avatar
Posted By mayank058
Fri Jan 30 2015, 07:02 AM
dear sir, please tell me how to do t...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Jan 29 2015, 10:41 PM
T he P89V51RD2 P1.5, P1.6, P1.7 has extra curren...
ExperimenterUK Avatar
Posted By ExperimenterUK
Thu Jan 29 2015, 06:45 PM
@naqirizviAs you already have a thread running I t...
naqirizvi Avatar
Posted By naqirizvi
Thu Jan 29 2015, 02:11 PM
Circuit diagram i am following i am not sure is it...
naqirizvi Avatar
Posted By naqirizvi
Thu Jan 29 2015, 02:11 PM
Circuit diagram i am following i am not sure is it...
naqirizvi Avatar
Posted By naqirizvi
Thu Jan 29 2015, 02:11 PM
Circuit diagram i am following i am not sure is it...
naqirizvi Avatar
Posted By naqirizvi
Thu Jan 29 2015, 01:50 PM
Hi,I am new to programming got some issues in RFID...
sachinmm Avatar
Posted By sachinmm
Thu Jan 29 2015, 07:21 AM
hello sir, plz tell me the circuit diagram interfa...
ajay_bhargav Avatar
Posted By ajay_bhargav
Thu Jan 29 2015, 06:28 AM
Moreover I see the segment Anode is connected via ...