Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

24C04, 24C64 and 24C256 EEPROM interfacing problem

Status
Not open for further replies.

ark5230

Advanced Member level 3
Joined
Jun 29, 2009
Messages
862
Helped
163
Reputation
324
Reaction score
140
Trophy points
1,323
Location
India
Activity points
6,187
I am using 24C64 with Atmega32, the concept is borrowed from that of Data-logger from **broken link removed**.
To increase memory I wish to use 24C256 and for some trials I tried to use 24C04.
The routines for EEPROM are taken from the files from the above link i.e. 24C64.h and 24C64.c.
Now the question is that the same routines will work for 24C04 and 24C256 of different device specific files will be required if so from where to procure those? I tried searching with Atmel website.
Another question whether the address of all these EEPROM's is 0xA0 or it is different for 34C04 as it uses only two address unlike 24C64 which uses all the three address lines A0, A1 and A2.
 

Now the question is that the same routines will work for 24C04 and 24C256 of different device specific files will be required if so from where to procure those? I tried searching with Atmel website.
Another question whether the address of all these EEPROM's is 0xA0 or it is different for 34C04 as it uses only two address unlike 24C64 which uses all the three address lines A0, A1 and A2.
1st i would tell u that u can easily interface the ATmega32 with the 24C04 through the I2C bus.
About the address
the address pins in each ic is set by u to make the total address of the device (the EEPROM) and then u must send that address to the device and the device will acknowledge
these pins are useful only when u connect your ATmega32 to multi EEPROM ICs, and then u should change the connection of the address pins in each IC so that each IC has a different address.

Regards,
Hz
 
Thanks for the information, yes I am using I2C as shown in the link.
The subroutines addressing EEPROM make use of the address and if the address lines are left not connected, they are treated as low (zero). Even in single EEPROM circuit this address is used in each access through the routines. I am using AVR Studio4 with AVR GCC. I noticed that the same program that works with 24C64 does not work with 24C04 (even for lower memory address ranges). That is why this question arose I suspect the address of 24C04 could be different as it used fewer address lines (may be same I dont know and trying to figure out).
 

24C64 needs 2 word address bytes to access it, while 24C04 needs 1 word address byte

Check out the datasheets for more information
 
hi;
I am agree with nandhu015 answer. check ie if your routine using sequential write mode and starts the eeprom from ie zero and writes consecutively.
I faced that some 24c64 eprooms accept (00H) as zero starting address, but some other brands 24c64 waits for (0000H) as the zero starting address.
It might be the subaddress issue. (not he device address)
Hope helps
 
I am concerned about the device address and not the memory space. The device address (default) for 24C64 is 0x0A and that about 24C04 I dont know so the question as to whether the same is applicable here or what ?
 

if the address lines are left not connected, they are treated as low (zero).
I don't believe that you got this information from an official datasheet.
The device address (default) for 24C64 is 0x0A
Not right. All 24Cxx I2C eeproms have a base address of 0xA0, + offset defined by chip select bits as far as applicable.

As said, single address byte eeprom types 24C01.. 24C16 can be accessed with the same driver, dual address byte types 24C32 and above need a different one.
 
I am concerned about the device address and not the memory space. The device address (default) for 24C64 is 0x0A and that about 24C04 I dont know so the question as to whether the same is applicable here or what ?
Hi, ark5230
I want to tell u that the problem is not in the device addressing (The device addressing is the same)
But the problem is in that
in the 24c64 ........ the address of the location to be read or written is two bytes. But in the 24c04 ........ that address is only one byte.
u can use 24c32 instead of 24c04. 24c32 is also has two bytes addressing
 
FvM True, very true, thanks for correcting the mistake it is 0xA0 = 1010 0000 Binary

My problem is that I am trying to use I2C EEPROM 24C04 but I dont have necessary supporting files like those for 24C64. I used 24C64 in few simple test successfully, using the (drivers) include file 24C64.h and supporting file 24C24.c.
I dont have such files for 24C04.
Also I was not careful about the size of the addressable memory and I did not realize that for lower capacity it is one byte for 24C01 to 24C16 and for higher capacity from 24C32 onwards it is two bytes.
This means the accessing modes will be different as one byte can not address more than 256 bytes, I will see the data sheet carefully and try to understand this aspect.
So far as the default address is concerned, the data sheet says if the three addressing pins are not connected, the address will be 0xA0, if more than one chip is used on the I2C bus, the address pins are to be appropriately wired (and some corresponding change will have to be made in program or driver).
Can some one give link to resource giving those drivers for 24C04 ?

T1.JPG
 

Attachments

  • T2.pdf
    242.2 KB · Views: 121
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top