CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Is this the best speed possible in this configuration?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
jai



Joined: 12 Apr 2011
Posts: 11

View user's profile Send private message

Is this the best speed possible in this configuration?
PostPosted: Tue Apr 12, 2011 5:59 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Apr 12, 2011 6:21 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Apr 12, 2011 6:27 am     Reply with quote

Sorry if my posting in unclear. It takes 7 minutes to program the full EEPROM chip.
jai



Joined: 12 Apr 2011
Posts: 11

View user's profile Send private message

PostPosted: Tue Apr 12, 2011 6:29 am     Reply with quote

Even the universal programmer GALEP4 takes about 2 min to program the whole chip.
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Tue Apr 12, 2011 9:18 am     Reply with quote

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

View user's profile Send private message

PostPosted: Tue Apr 12, 2011 10:56 am     Reply with quote

Use FRAM instead...
_________________
Google and Forum Search are some of your best tools!!!!
jai



Joined: 12 Apr 2011
Posts: 11

View user's profile Send private message

PostPosted: Thu Apr 14, 2011 3:29 am     Reply with quote

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

View user's profile Send private message

PostPosted: Thu Apr 14, 2011 5:05 am     Reply with quote

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.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group