Help! FSRW: How to INTERFACE with it?
Who is making use of it? The source listing of fsrw does not make it clear HOW TO USE.
For instance, what are the VARs to use fsrw to connect one's code to it?
I think the documentation implies that one can use A0 for the basepin, and the following three then complete the electrical interface. Who has used fsrw? And how did you know how to make use of this object?
Does one have to provide a buffer RAM area? That is, what marks off the beginning and end of what is to be written to SD card? Is there assumed some sort of 'OS' which provides this info?
I feel like I have the main page missing from 'my documentation! The Spin files of fsrw don't make its use very clear. I don't seem to see the 'hooks' to interface with fsrw. This is totally new stuff for me.
For instance, what are the VARs to use fsrw to connect one's code to it?
I think the documentation implies that one can use A0 for the basepin, and the following three then complete the electrical interface. Who has used fsrw? And how did you know how to make use of this object?
Does one have to provide a buffer RAM area? That is, what marks off the beginning and end of what is to be written to SD card? Is there assumed some sort of 'OS' which provides this info?
I feel like I have the main page missing from 'my documentation! The Spin files of fsrw don't make its use very clear. I don't seem to see the 'hooks' to interface with fsrw. This is totally new stuff for me.
Comments
I have used FSRW. I am assuming you downloaded version 2.6 from the OBEX? Inside the zip there are 2 files you will want to look at: test.spin and serial_terminal.spin. Basically, you could use the object like this:
You _can_ have an external buffer, if you want. You can write or read one character at a time.
hope this helps,
Jonathan
As is true of any object, the interface (to your program) is defined by the public (PUB) methods. Look at the comments associated with each PUB function. These are:
release
unmount *
mount_explicit
mount *
pflush
pclose *
setdate
popen *
get_filesize
pread *
pgetc
pwrite *
pputs
pputc
seek
tell
opendir
nextfile
getclustersize
getclustercount
At a minimum, you need the starred methods to mount the SD card, open a file, read or write the file, close the file, and unmount the card. The comments in the FSRW source file are pretty straightforward.
I now see I failed to mention I wish to display results on a 4.3" LCD. So somehow I need to change the FDS input/output to my LCD display driver and from my on-screen 'keyboard'.
Mike, I will study the * starred methods to get things working. Hopefully I'm not expecting too much from fsrw to run with this LCD approach. I was looking for a hand held configuration. So far there seems to be no problem with RAM usage; that is when I compile. Not sure what all actual usage requires. I'm too 'green' with SD card use. So not sure how I'll be getting files ONTO the SD card in the form needed.
Probably KyeDos could also help.
The 4.3" LCD is 480 x 272 pixels, thus 30 x 17 tiles and Parallax font uses two rows, thus only 7 lines of text, and 30 char/line is limiting. But I still want to go with the LCD just to learn 'stuff'. Like how painful is it really to go so limited. Probably depends on the application.
I just got the SD card pcb wired up today. So now I can begin to debug that h/w too.