View previous topic :: View next topic |
Author |
Message |
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
|
Posted: Sun Sep 25, 2005 9:42 pm |
|
|
u-hu. Table 1-2, item 17. |
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
|
Posted: Sun Sep 25, 2005 10:53 pm |
|
|
Oh! I see. Really so slow eh? Most of the time spent for waiting? |
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
|
Posted: Sun Sep 25, 2005 10:56 pm |
|
|
All parameters in nanosecond and this one in milisecond. Why read time not specified? |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Mon Sep 26, 2005 1:41 am |
|
|
With about 10kbyte data size I agree that something like an external serial EEPROM is the best solution for storing the data. For transferring the data to the PC I suggest using RS232, USB is nice but way more difficult to implement.
I have good experiences with FRAM chips from Ramtron . FRAM chips do have the same advantages as EEPROM but have unlimited write cycles and are a lot faster (only limited by the serial bus). Available in both SPI, I2C and parallel versions. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Mon Sep 26, 2005 6:30 am |
|
|
Joshua Lai wrote: | All parameters in nanosecond and this one in milisecond. Why read time not specified? |
5ms is the time required for the write. Not the data transfer.
There is no wait period for reading and thus no data parameter. The time required to read data depends on how fast you are talking to the chip as well as any inter byte delays. |
|
|
JimB
Joined: 25 Aug 2005 Posts: 65 Location: Huntington Beach, CA
|
|
Posted: Mon Sep 26, 2005 8:19 pm |
|
|
I talked with our programmer at work today about this problem of data and transferring it. He programs mostly AVR devices but he turned me on to several documents for the AVR that allow dealing with FLASH cards plus a load of software that give you functions like fopen() and creating FAT12, etc. to write to these devices. Only problem is that it takes the most powerful of the AVRs to support all the code required. He also told me about the PIC and AVR Webrings. Just put "PIC Webring" into google.
When I first went there today there was an ad for a module to use with the PIC processors that allow you to interface to a SD Flashcard. When I went there this evening I couldn't find it again. Some of the windows must rotate their information. It was in one of the minor windows. |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Mon Sep 26, 2005 8:34 pm |
|
|
But for 10K worth of data, I think you are better off just using a serial eeprom. I don't think you specified what happens to the data once it is on the PC. |
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
Re: Data size |
Posted: Tue Sep 27, 2005 10:02 pm |
|
|
JimB wrote: | To answer the question regarding the amount of data saved and later transferred - quick calculation says around 10,000 bytes maximum. |
How fast your application needs to store the data? The eeprom write speed is 5ms, then the fastest rate can be achieve is only 200 words per second.
Any other faster way to store large amount of data for portable application? For example, sound recording, ecg recording. |
|
|
asmallri
Joined: 12 Aug 2004 Posts: 1634 Location: Perth, Australia
|
Re: Data size |
Posted: Tue Sep 27, 2005 11:37 pm |
|
|
Quote: | How fast your application needs to store the data? The eeprom write speed is 5ms, then the fastest rate can be achieve is only 200 words per second.. |
No. You can do a page write. The page size for a 24LC512 is 64 bytes which means you can write 12800 bytes per second. You could also look at a SD/MMC card which uses the SPI interface. _________________ Regards, Andrew
http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!! |
|
|
Joshua Lai
Joined: 19 Jul 2004 Posts: 42 Location: Malaysia, PJ
|
|
Posted: Wed Sep 28, 2005 10:17 pm |
|
|
Page size (64 bytes) is so small, that means cannot use eeprom for continuous data aquasition? Other storage media are more difficult to interface, and more expensive??
I tested the eeprom speed, and found that,
write time=5ms
read time=600us
sequential read=100us
page write not yet tried...
www.ccsinfo.com/forum/viewtopic.php?p=51687#51687 |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Thu Sep 29, 2005 6:07 am |
|
|
Joshua Lai wrote: | Page size (64 bytes) is so small, that means cannot use eeprom for continuous data aquasition? Other storage media are more difficult to interface, and more expensive??
I tested the eeprom speed, and found that,
write time=5ms
read time=600us
sequential read=100us
page write not yet tried...
www.ccsinfo.com/forum/viewtopic.php?p=51687#51687 |
Well if it takes 5ms to aquire 64 samples then I guess you could! |
|
|
Guest
|
Take a look at this. |
Posted: Thu Sep 29, 2005 9:29 am |
|
|
I found this for supporting a flashcard. A little large but not totally out of the question.
http://www.armanet.com/
As for the speed, I don't think that this would be an issue. |
|
|
Eugeneo
Joined: 30 Aug 2005 Posts: 155 Location: Calgary, AB
|
|
Posted: Fri Sep 30, 2005 8:43 pm |
|
|
I used a M25P20, it's a 2 mbit Flash chip (256k for less than 2 dollars). I can download at 19200 contiuous with no flow control interruptions. Just had a 20 byte ring buffer to take care of the page program down time. |
|
|
ckielstra
Joined: 18 Mar 2004 Posts: 3680 Location: The Netherlands
|
|
Posted: Sat Oct 01, 2005 5:46 am |
|
|
JimB wrote: | When I first went there today there was an ad for a module to use with the PIC processors that allow you to interface to a SD Flashcard. When I went there this evening I couldn't find it again. Some of the windows must rotate their information. It was in one of the minor windows. | Maybe this is what you were looking for? http://www.ccsinfo.com/forum/viewtopic.php?t=24187
As your colleague already mentioned, a library like this will only work on the more powerful processors (a PIC18F252+ for limited functionality or PIC18F6720+ for full functionality).
Just one more thing: Compact Flash and MMC cards are nice but for your application seem like a huge overkill in required processor power, money and time to complete the project.
Why do you focus so hard on the fopen() function? Is it going to be one large file or are you planning on multiple files? Why would you ever want to introduce the overhead of file names, file systems and all the alike when the PC has no direct access to the memory chip but only by talking to your PIC?
You only want to write about 10kbyte of data. Easiest implementation would be to use one of the suggested external serial memory devices. I prefer FRAM because it is extremely fast and easy to implement because of no memory pages like most EEPROMs and no erase commands required.. With a small wrapper function you can access these devices just like you would access a large memory array. Choose any cheap PIC with I2C or SPI interface and off you go. |
|
|
|