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

sorry i am not good at bascom

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.
Mon Jun 14 2010, 07: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, 02:25 PM
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
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
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

Mon Aug 05 2019, 08:09 PM
@Ismail ..post in forum, give details
Mon Aug 05 2019, 05:33 PM
Ismail balghmi
Wed Jul 24 2019, 01:47 AM
@BUSTER123 Please post in the forum
Tue Jul 23 2019, 07:13 PM
BUSTER123
hello! newbie here. i am kind of a guy who hates using ready - made existing libraries, so this helped a lot as i was trying to control and write to a character lcd display. however, i can't figure out how to set the cursor position. for example, i want to set it to the 5th column in the first row, so position 5. so according to the table, i am sending 10000101 on the 8 data lines of the lcd (register select pulled low). the cursor does not move there however. and i cant move the cursor left or right too. is it something wrong that i am doing? thank you.
Thu Jul 11 2019, 08:55 PM
@ramos https://www.theengineeringprojects.com/2017/09/l298-motor-driver-library-proteus.html
Thu Jul 11 2019, 08:44 PM
@praveen123. Can you give a link to the project ?
Thu Jul 11 2019, 05:47 PM
ramos
buenos dias alguien podria ayudarme necesito saber como descargar la libreria del l298n para proteus
Thu Jul 11 2019, 12:11 PM
praveen123
anyone can help me
Thu Jul 11 2019, 12:11 PM
praveen123
i need source code for 8051 -smart trolley rfid
Thu Jul 11 2019, 12:10 PM
praveen123
hii

### Recent

jualanled
Sat Aug 17 2019, 03:41 AM
Wed Aug 07 2019, 10:35 AM
hieu16005
Sat Aug 03 2019, 01:16 PM
Pra
Mon Jul 29 2019, 07:39 AM
manu8193
Wed Jul 24 2019, 04:44 AM
3AAPC
Sun Jul 21 2019, 12:41 AM
rpels7707
Fri Jul 19 2019, 11:31 AM
ameya123
Fri Jul 19 2019, 07:36 AM

#### Online

Guests: 57, Members: 0 ...

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

Members: 38086
Forum Activity
##### Posted By [email protected]
Wed Aug 07 2019, 10:38 AM
I am trying to execute USSD codes through my GSM m...
##### Posted By ExperimenterUK
Sun Jul 28 2019, 08:55 PM
An LM339 may not be fast enough for reliable SPI ...
##### Posted By sakibnaz
Sun Jul 28 2019, 06:40 AM
Hi All.I need to connect my MCU with an external S...
##### Posted By ExperimenterUK
Wed Jul 24 2019, 10:42 PM
Your unit is communicating, so I assume the GPS si...
##### Posted By ExperimenterUK
Wed Jul 24 2019, 10:32 PM
##### Posted By manu8193
Wed Jul 24 2019, 04:57 AM
any one tell me the explaination and 'c' code for ...
##### Posted By 3AAPC
Sun Jul 21 2019, 12:51 AM
##### Posted By 3AAPC
Sun Jul 21 2019, 12:47 AM
With the GPS antenna in the outdoors, I use the ub...
##### Posted By ameya123
Fri Jul 19 2019, 07:42 AM
Hello,Please share 8051 Assembly language code for...
##### Posted By figureyang
Fri Jul 05 2019, 04:37 AM