View previous topic :: View next topic |
Author |
Message |
jai
Joined: 12 Apr 2011 Posts: 11
|
Is this the best speed possible in this configuration? |
Posted: Tue Apr 12, 2011 5:59 am |
|
|
Hi All,
I am working on a application where a 18F2550 is configured as CDC usb.
I am transferring data from computer to ext EEPROM.
I am using 24LC512 eeprom. Working on page mode(128 bytes).
It takes about 7 minutes to do the job. Is there a way to make it work
faster.
Thanks & Regards,
Jai. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9241 Location: Greensville,Ontario
|
|
Posted: Tue Apr 12, 2011 6:21 am |
|
|
Need a LOT more information ! Your program would help. 7 minutes for just 128 bytes ? Obviously, that's way to slow ! Bus speed of EEPROM( fast,slow ?).Correct pullups for the speed/voltage used?Do you transfer all the data from PC to PIC, then save to EEPROM ? Does the PC do ANYTHING other than communicate to the PIC? ANY other programs running.
24lc512 is 512kbits = 64kBytes = 512 pages
at 5ms / page that's 2.56 seconds for the whole chip, according to the datasheet.So if those numbers are right, should be done in less than 10 seconds accounting for overhead. |
|
|
jai
Joined: 12 Apr 2011 Posts: 11
|
|
Posted: Tue Apr 12, 2011 6:27 am |
|
|
Sorry if my posting in unclear. It takes 7 minutes to program the full EEPROM chip. |
|
|
jai
Joined: 12 Apr 2011 Posts: 11
|
|
Posted: Tue Apr 12, 2011 6:29 am |
|
|
Even the universal programmer GALEP4 takes about 2 min to program the whole chip. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Tue Apr 12, 2011 9:18 am |
|
|
As Temtronic wrote, the programming for the full chip should take a maximum of about 2.56 seconds.
Then there is to add the time for writing data to the chip over I2C:
512 kbit at a 100kHz bus speed = 5.12 sec.
Add extra time for the acknowledge bits and page addressing overhead and the total programming time should be possible in just under 10 seconds. Increasing the I2C bus speed to 400kHz even 6 seconds should be achievable.
Microchip Application Note AN1028 'Recommended Usage of Microchip I2C™ Serial EEPROM Devices' is some good reading material. Page 5 confirms the above mentioned achievable timings.
Without more details of your project it is impossible to help you further. |
|
|
dyeatman
Joined: 06 Sep 2003 Posts: 1934 Location: Norman, OK
|
|
Posted: Tue Apr 12, 2011 10:56 am |
|
|
Use FRAM instead... _________________ Google and Forum Search are some of your best tools!!!! |
|
|
jai
Joined: 12 Apr 2011 Posts: 11
|
|
Posted: Thu Apr 14, 2011 3:29 am |
|
|
I was using Delphi for programming as the PC side software. When you start
the program by itself and not in the IDE. It takes about 1 min 10 seconds to
complete. I wonder whether more speed can be achieved by changing the CDC files?.
I am programming a 24c512 eeprom. I am sending 128 bytes for page write.
Can the speed be increased by working on the CDC IN buffer. Can i receive 128 bytes at the 18F2550 side at one GO.
Any other input would be great.
Thanks ,
Jai |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9241 Location: Greensville,Ontario
|
|
Posted: Thu Apr 14, 2011 5:05 am |
|
|
You should make the largest circular buffer possible to receive the data ! That PIC has 2K of RAM so try for 1280 byte(10 EEP pages) buffer or bigger multiple of 128.128x15=1920bytes , problem max buffer, leaves 128 bytes for scratchpad variables.
Delphi is NOT you're problem...USB and how you program is.
Using real RS232 and a 1920 buffer I can get data transfer and stored in under 10 seconds. |
|
|
|