Discussion in "8051 Discussion Forum" started by    Abhinav    Jun 13, 2010.
Sun Jun 13 2010, 02:43 PM
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
>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
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
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
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
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.

### Information

#### Conversation

Tue May 19 2020, 06:29 PM
Does anyone have microcontroller programming software for STC15F104W (core 8051, 4 k, 128 byte, 6 I/O pin, UART ... DIL8), that works?
Sat May 02 2020, 03:38 PM
Tamu Gurung
Hi I am looking for a assembly language program for a digital decimal counter. Time counts max limit of 2 mins starting from 2.00 mins and ending at 0.00. time is to be displayed on 4 7-segment LED displays. Edsim51 simulator to be used. Thanks
Wed Mar 25 2020, 09:39 AM
Tajammul
Sir kindly send the code file i2c for 8051
Fri Mar 13 2020, 06:36 PM
@ Rohitnani,ABEBE..which project ?
Fri Mar 13 2020, 08:55 AM
ABEBE
how can get hadwere of this project
Sat Mar 07 2020, 12:11 PM
Sir, Could you please send me the zip file input password....
Wed Feb 26 2020, 11:58 AM
Peter Parker
Is it possible to send multiple messages using only 1 GSM module?
Sat Feb 01 2020, 05:12 AM
Pearl Olin
Hello,
Wed Jan 22 2020, 01:16 PM
MINU CHAUDHARY
I m getting errors while simulation process during interfacing socket output and lcd... Can i get the report of ur project which is same as us.
Tue Jan 14 2020, 02:08 AM
when i am trying to simulate the program in Proteus 8 professional, I am getting some errors as cannot find module file dhtxx.md can u help me

### Recent

Davidthils
Thu May 21 2020, 08:44 AM
Jakeror
Wed May 20 2020, 09:28 PM
motorCar
Wed May 20 2020, 03:05 PM
Vordrync
Wed May 20 2020, 07:52 AM
Wed May 20 2020, 03:15 AM
scena
Tue May 19 2020, 06:08 PM
CodySiz
Tue May 19 2020, 02:22 PM
ClaireSat
Mon May 18 2020, 09:50 PM

#### Online

Guests: 79, Members: 0 ...

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

Members: 38211

#### Trending Topics

Forum Activity
##### Posted By xrxx
Thu Apr 30 2020, 06:59 AM
BCD MULTIPLICATIONAssume that you have to 2 BCD nu...
##### Posted By liqian
Tue Apr 28 2020, 05:26 AM
I happened to see your post and I got many useful ...
##### Posted By ExperimenterUK
Tue Apr 28 2020, 04:21 AM
The code is hard to read.Please zip it and attach ...
##### Posted By rogermado
Sun Apr 26 2020, 01:53 AM
@ExperimenterUK, thanks for your reply. You'll fin...
##### Posted By ExperimenterUK
Sat Apr 25 2020, 05:42 PM
Some simulators handle displays better than others...
##### Posted By rogermado
Sat Apr 25 2020, 03:59 PM
Hello everyone, sorry in advance if i'm not in the...
##### Posted By PHANTOM28
Fri Feb 28 2020, 10:25 AM
Hi.I hope you all can help me. I am relatively ne...
##### Posted By ExperimenterUK
Fri Feb 21 2020, 05:05 PM
Did you sort out your problem?
##### Posted By ajay_bhargav
Fri Feb 21 2020, 04:45 AM
Yes you can do that.1. Create a channel @Thingspea...
##### Posted By ananyagupta
Thu Feb 20 2020, 03:58 AM
With regards to the particular characters sent to ...