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.

writting huge amount of data in e2prom+ time limit prblem?

Status
Not open for further replies.

omid_juve

Full Member level 1
Joined
Jul 1, 2007
Messages
95
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,982
we want to get 18kbyte data from serial port and write them on a at24c256 e2prom but as you know for sending these huge data and
store them on e2prom we should lower the baud rate so as all data have enough time to be written on
e2prom ,and this cause a long time for getting all the 18kB data and store them on (approx. 4min with B.R:1200)
do we have any solution for this problem?
what is a PAGE WRITTING in e2prom ?
 

xorcise

Full Member level 2
Joined
Sep 27, 2007
Messages
124
Helped
20
Reputation
40
Reaction score
1
Trophy points
1,298
Location
NYC
Activity points
2,169

omid_juve

Full Member level 1
Joined
Jul 1, 2007
Messages
95
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,982
Re: writting huge amount of data in e2prom+ time limit prbl

don't we have any other solution for this problem just by using i2c e2prom ?
 

xorcise

Full Member level 2
Joined
Sep 27, 2007
Messages
124
Helped
20
Reputation
40
Reaction score
1
Trophy points
1,298
Location
NYC
Activity points
2,169
Re: writting huge amount of data in e2prom+ time limit prbl

Yes, and it is as you realized. You must slow down the rate of USART to allow the I2C to complete its tasks of EEPROM writing. You could create a RAM buffer, but 18K is beyond most microcontrollers. I2C can be set up to be 400KHz clock depending on the master's ability and the capability of the slave, your EEPROM, to run that fast. Otherwise it is 100K.

I think that even at 100K I2C speeds you can run USART at 56K and the I2C can keep up. Make sure your EEPROM write timing is at least 100us. This overall rate would let you transfer at approximately 6K bytes per second.... or 18K bytes in 3 seconds.
 

x_zoli

Advanced Member level 4
Joined
Jul 22, 2004
Messages
105
Helped
9
Reputation
18
Reaction score
3
Trophy points
1,298
Location
Brasov, Romania
Activity points
786
Re: writting huge amount of data in e2prom+ time limit prbl

The AT24C256 also works at 400KHz, that means that you can obtain a data rate of around 35-45KByte/s, using page write mode. In page write you send the address that you write to once (preferable the start of the page) and then you can send 64 bytes of data, without stopping the I2C transfer. This is optimal, because otherwise you have to send all the address for writing each byte, that drastically decreases your speed - and, since you say that you have this speed problem, i think this is the mode you are using. See page 9 and 11 of the atmel's datasheet for more on page write. So, for an optimal transfer you can have a 64 byte buffer, enough for a page, eliminating this way the speed limitation of the rs232 transfer.
 

sn_burki

Full Member level 5
Joined
Feb 18, 2003
Messages
260
Helped
16
Reputation
32
Reaction score
11
Trophy points
1,298
Location
Pakistan
Activity points
1,623
Re: writting huge amount of data in e2prom+ time limit prbl

hi

I think you should switch over parallet data transwer techniques, but if not possible then use 120usec data transwer rate. secondly use page writing mode. Page writing mode you need to send the address of the first starting point then it autometically updates the next address. You may be sending address of the location again and again thats why you have this problem. by good techniques you can send data just in 3 - 4 seconds only.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top