sd card read-modify-write back. possible?
Hi all.
I've been searching the forum for some days and i cant find a way to read a file from an sd manipulate it and write it back to sd.
Porthos os says it can copy files but i cant see the "copy" routine in the spin code
is there a way to do it?
thanx in advance.
Post Edited (giannissam) : 3/10/2009 10:43:53 PM GMT
I've been searching the forum for some days and i cant find a way to read a file from an sd manipulate it and write it back to sd.
Porthos os says it can copy files but i cant see the "copy" routine in the spin code

is there a way to do it?
thanx in advance.
Post Edited (giannissam) : 3/10/2009 10:43:53 PM GMT
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Need to make your prop design easier or secure? Get a PropMod has crystal, eeprom, and programing header in a 40 pin dip 0.7" pitch module with uSD reader, and RTC options.
http://forums.parallax.com/showthread.php?p=747794
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Check out: Protoboard Introduction , Propeller Cookbook 1.4 & Software Index
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us
Got an SD card connected? - PropDOS
i tried to make a file-copy program (attached).
Steps:
1. Read the source file character by character.
2. Save each character temporarily in a variable (read_buf)
3. Close the source file
4. At the first time open the target file in write mode and then append mode. Each time writing the read_buf contents.
Good thing: it works for small text files
Bad thing: you better make plans for the next week (or perhaps a month) before trying to copy more than 5Mbytes
I tried to copy a wav file (windows xp start up sound) in mono (about 212Kb) and it took several hours to copy 14Kb
thinking to make read_buf bigger (to store more characters) in order to have less openings and closings of files.
Any ideas?
can "Pread" and "Pwrite" routines be used for my perpose?
thx in advance.
what does Fullduplexserial do?