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.

External Memory 24C512 Memory Model

Status
Not open for further replies.

Wafeeq

Member level 3
Joined
Jul 26, 2010
Messages
61
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Pakistan
Activity points
1,728
Hi All
i want to use External Memory 24C512 with AtMega16L for data logging for last one month minimum and my sampling time of data logging is one minute, my data is a string of length of 100 characters. i am unable to understand from the datasheet of 24C512 that what is the memory model of this IC.

let me tell what did i understand from the data sheet? 24C512 is an array of 128 Columns and 512 Rows. is it Right? i got this concept from datasheet but the issue is that when i write data on column No. 255 it is also being stored and retrieved successfully. what is this?

1-Please tell me the memory model of IC?
2-how much data i can save to this 24c512, i mean how many logs as i discussed my requirement above.?

Note: i dont need to know how to store data as i have done this successfully by i2C Library.
 

the eeprom has 65536 bytes storage space, if you want to store 100 bytes per sample then you can only sample 655 times.
If you sample every minute then you can only get about 11 hours (slightly less actually).

Alex
 

the eeprom has 65536 bytes storage space, if you want to store 100 bytes per sample then you can only sample 655 times.
If you sample every minute then you can only get about 11 hours (slightly less actually).

Alex

Thanks for reply:
how to address the device?

---------- Post added at 14:25 ---------- Previous post was at 14:16 ----------

See Below method to write in the memory:

int Xeeprom_read(unsigned char addressH, unsigned char addressL){
XMEMdata=0;
i2c_start();
i2c_write(EEPROM_BUS_ADDRESS);
i2c_write(addressH);
i2c_write(addressL);
i2c_start();
i2c_write(EEPROM_BUS_ADDRESS | 1);
XMEMdata=(int)i2c_read(0);
i2c_stop();
return XMEMdata;
}//int Xeeprom_read(unsigned char addressH, unsigned char addressL)

void Xeeprom_write(unsigned char data, unsigned char addressH, unsigned char addressL){
i2c_start();
i2c_write(EEPROM_BUS_ADDRESS);
i2c_write(addressH);
i2c_write(addressL);
i2c_write(data);
i2c_stop();
delay_ms(10);
}//void Xeeprom_write(unsigned char addressH, unsigned char addressL, unsigned char data)


For Example i want to write in the location AddressH = 0 and addressL = 0 it works fine
Please tell me what must i give maximum address to use whole of the memory?
 

The operation sequence is described in pages 9, 10, 11. http://www.atmel.com/atmel/acrobat/doc1116.pdf

The graph in pager 11 shows that to write a byte you have to send the device address byte then the high and low byte of the memory address (MSB first) and then the byte you want to write.
You can also use a page write to write up to 128 bytes by sending the memory address only once and then sending only the byte data to be written (the address will be internally incremented) but note that the page writes can only be used inside the boundries of a page, what you reach the page boungdries you have to stop and start a new write sending the adress again.
The page boundaries are predefined, every 128 bytes starting from 0, they are addresses 0-127, 128-255 etc so if you start from the middle of a page you can't write 128 bytes but only half of them until you reach the page end.

Alex

---------- Post added at 16:34 ---------- Previous post was at 16:31 ----------

The maximum address is 65535=0xFFFF so address high=0xFF and address low=0xFF
 
Last edited:

i think address high ans low are of 8 bits each not 16 bits for 512K memory? am i right?
Now the addresses will be
Address High = 0xFF
Address Low = 0xFF

??????? What about this now? am i right?
 

Yes, 65535=0xFFFF do high byte=0xFF and low byte=0xFF, sorry for the mistake
 

Thanks All Buddies for Replying..

i have interfaced 24C1024 and i am unable to store data for only 3 three days in this memory i want to save logs for 5 days minimum. Now i have studied from the datasheet of 24C1024 that one more this memory sized IC can be interfaced with the same I2C bus. A1 pin of the memory is used to set the address of the chip.

Let me name the chips first for easy understanding..

The memory chip i have already interfaced is Chip-1 and the memory i am going to interface is Chip-2
i have left the pin A1 open of Chip one when i connected only one chip of memory. now i want to connect another memory chip with same bus. what should i do with A1 pin of Chip-1 one and Chip-2?
 


What do you mean?
There is no formatting involved, you can write the complete memory with a known value if you want (for example 0)

Alex
 

What do you mean?
There is no formatting involved, you can write the complete memory with a known value if you want (for example 0)

Alex

i want to delete the data of whole memory at once.... how to Delete/Clear the all memory locations.
 

There is no erase operation, you can only write the values you want so to set them all to a predefined value use page write which is the fastest method but you have to write all memory content.

ALex
 

Hello
I need your help
I need to increase flash capacity. For micro Atmga 8
(AT45DB161D) it is good?
And please teach me how to connect it with Atmga 8
And source program BASCOM
Thank you..........
 

hello!

AT45 memories are better options for data loggers because of their huge data spaces.
Well, it depends on what you want to do, but if you really need space, EEPROM is not
a good option. With an EEPROM, you're limited to +/- 512 k. With a flash, you have
several mega bytes depending on the type and writing is a lot faster than the 100 / 400
kbps of an EEPROM.

How to connect it?
CPU GPIO -> AT45 CS
CPU MISO -> AT45 MISO
CPU MOSI -> AT45 MOSI
CPU CLK -> AT45 CLK
That's about it.

Dora.
 

You can use several EEPROMs if one is small, but you see now why people use SD cards today for logging.

Price on market dictate design. ;-)

See this project which log anything from serial port to memory stick :


---------- Post added at 15:04 ---------- Previous post was at 14:59 ----------

Can anyone explain me why Microchip nig with EEPROMs in their uC ulike the Atmel ?
 

Hello!

You can use several EEPROMs if one is small, but you see now why people use SD cards today for logging.

Some resasons NOT to use EEPROMS and NOT to use SD cards:
- Recent flash chips can handle megabytes of memory in a 8-pin chip (check the AT45 series).
If you want the same capacity with eeproms, you will need dozens of them.
=> PCB expensive
=> Dozens of chip is expensive
=> Power consumption raises.
- Using an SD card, you will need 50 mA when writing, vs about 5 mA for a small chip.
- Writing in an SD card implies having a file system. Therefore writing more data than necessary
(you need to keep the tables up to date, which is overhead). Well, in fact, it you use the SD card
as a memory chip, you don't need a file system, but in this case you cannot pull the memory out
and read it with a PC.

Dora.
 

Dora I must disagree with you about SD cards.

What is price of that flash chips ? And can you explain me why is there lots of devices with SD card logging technique.

I think solution should be cheap.

Dora several MB is small for todays logging its history, we today speak about GB space. Just log 8 ADC values, each 5-6bytes + date, time, for several month, years (about 100-150 characters in each row) at every second.

;-)

---------- Post added at 15:21 ---------- Previous post was at 15:15 ----------

See this project of prof. Dharmani :

microSD ATmega32 Data-Logger
https://www.dharmanitech.com/2011/05/microsd-atmega32-datalogger.html

SD/SDHC Card Interfacing with ATmega8 /32 (FAT32 implementation)
https://www.dharmanitech.com/2009/01/sd-card-interfacing-with-atmega8-fat32.html
 

Hello!

Several MB is small, but it depends on what you are logging. I made a brain wave data logger
which was sent last year to the international space station and which is about 200 km over our
heads every 90 minutes. As there is not so much power over there (Li-ion batteries are forbidden
and therefore one must rely on "dry" batteries), consumption is a key point.
Well, taking back your argument of multiple EEPROMS.
If you want to equal a 4MB AT 45 with 24C512 (64 kBytes), then you need 64 memories. As the hardware
address is 3 bits (A0, A1, A2), then you need to multiplex you I2C bus. Multiplexing a 2-line bus for 8
I/O (both directions) is not trivial. Furthermore, having 64 chip on a board makes it expensive. I think
we can agree with that.
Now for SD card, you have to initialize it every time you power it (this takes power), and writing
is card-dependent, but my experience tells me it may be up to 50 mA. A lot too much for many applications.
I do a lot of bio signals and this does not require high sampling frequencies (about 100 Hz for brain,
max 1000 Hz for heart, less for other parameters). So todays multi mega flash chip are usually more than
enough in many cases.

Now if you really need an SD card, it means that you really need a lot of space. Therefore you will likely
be writing continuously and therefore need more than 1000 mAh per day to power your circuit.

That said, judging from the original post, usually you don't store 100 characters strings, but just the
strict minimum. If you record 12-bit data, then you should fit them in 2 data for 3 bytes and so on.

I know that recently, technology allows to log everything, but the bad thing about it is that people
don't think anymore about what is mandatory and what is not.

What is price of that flash chips ? And can you explain me why is there lots of devices with SD card logging technique.

Why? Precisely because SD card are cheap and developer don't think anymore
But SD card (even micro) are big in some cases. A flash chip (AT45 is 5 x 6 mm), so you can use a smaller
PCB. Smaller PCB is less expensive, etc...

Dora.
 

Thank you all
But I just needed a way to communicate with the memory Atmga 8
But now I have another question
How do I connect my micro Atmga 8. With 24c512 - 24c 1024 - 24c2048
This schematic and source code
Bascom is the source. Please
I want that image in my memory.
And whenever I wanted. On the color LCD
Thank you.:lol::lol::lol::lol::oops::oops::oops::oops::oops:
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top