I'm having problems getting even the demo to work. I'm using a stingray board with nothing but a micro SD card adapter attached to a breadboard. Voltages are good.
All I get is 'Card not mounted', and when I type 'mount' or 'mount 0' I get 'Disk I/O error'. The microSD card is brand new and has been formatted for FAT32.
This is the sum total of my experience with this so far, and would really like to know where I'm going wrong.
Your 3.0v1.1 package fails to find my SDcard on pins 16-19.
The 2.0v1.0 package finds SDcard but has serial port problems > 96MHz.
When I release my product, there will be an on-line list of supported code and optional CD.
I wouldn't normally care about this, but others do use your code. I prefer to see this working.
Jazzed - Are you following the electrical schematics? The block driver should work with or without pull ups. It drives the DI and CLK lines. Open drains the CS line and uses the DI line as an input. the SD card should have an internal pull up on the CS line for the open draining of the CS line to work.
I've worked really hard to make the SD card driver work with alot of stuff. I do not believe it is a problem on my end.
Jazzed - Are you following the electrical schematics? The block driver should work with or without pull ups. It drives the DI and CLK lines. Open drains the CS line and uses the DI line as an input. the SD card should have an internal pull up on the CS line for the open draining of the CS line to work.
I've worked really hard to make the SD card driver work with alot of stuff. I do not believe it is a problem on my end.
I reformatted the disk and it worked after that. I've never had an issue with sdcard hardware. I was very distracted because it worked perfectly with your SD2.0 stuff - except for the serial port weirdness.
Don't use the SD2.0 version. When it unmounts it corrupts the SD card FAT32 File System Info Sector - which is not critical or anything but, bad... (I was horrified when I found that error - the problem is that I pass the data in the place of the index into the functions that write to the SD block ... reversed the arguments).
Yeah, the serial driver is flaky. It will be updated before Parallax Semi is up and out. Just ignore the bad characters for now.
I've soldered in a new set of headers for pins 16-23 and a bypass header. Plugged it all in, changed the pin numbers in the code and up she came, first try.
Will have to keep this in mind for other components I need to add.
I find that one of my 2GB SDcards does not work with SD3.01. Works fine with Tom Rokkiki's FAT16 code. Reformatting does not help. It fails with File System Unsupported here:
partition := (((partition <# 3) #> 0) << 4)
case blockToByte(450 + partition)
$4, $6, $B .. $C, $E, $14, $16, $1B .. $1C, $1E:
other: abortError(MyErrorMessage)
' was File_System_Unsupported. added MyErrorMessage to errorStringAddress array for isolating failure.
A 4GB SDcard works fine in the same Propeller board.
Tom's code checks alot less stuff. So, its pretty easy for it to work with his.
I have every public code for FAT16/FAT32 file systems out there in the list in the code you posted. $4, $6, $B .. $C, $E, $14, $16, $1B .. $1C, $1E... those are all the FAT file system types to support. So, what has happened is that your SD card has a slightly corrupted MBR or it was formatted with something really weird.
You can just disable that check. Its just a check to prevent bogus file systems from coming in.
If you want to fix your SD card you'll need to rewrite the MBR on it. Windows won't do this for you easily. You have to use FDisk. Or force the disk to be completely corrupted so that windows will format everything on the disk.
---
This is not a problem with the driver but expected behaviour. Be thankful I did not actually implement all of the checks and balances I found if other drivers I examined. I could have FILLED!!! the mount function with just endless amounts of sanity checks.
But, instead I just left in the few I thought were necessary to catch serious errors.
Thanks for that explanation. I can rest easier now. DOS chkdsk /F was no help.
I was not suggesting the driver is bad, just that i could not use my 2G SD card.
The surprises I see with SD card stuff is generally very annoying though.
I understand its a little annyoning. But... I mean, its better to know that the SD card is courrpted before you start trying to plug it into another embeded system and wonder why it doesn't work.
Thanks Kye for the new SD3.01 Fat16/32 driver and demo code. I managed to remove the rtc and audio code in your demo, I also removed some spaces from the help string to free up some space and didn't actualy beak any code.
I can't seem to remove the rtc calls from the SD3.01_FATEngine.spin without breaking some code. I dont want it removed totaly, I want it for referance when I make an attempt to use the DS1302 rtc instead so I am just commenting out various parts, Can the DS1307 code be completely removed/commented out from the engine? I am also going to try to find some string handeling functions to replace some commonly repeated words in the strings to try and free up some more space, maybee even read the help string from a file that resides on the sd-card.
Since I have programming experiance in MS windows I have the mentality that I can use a type of .dll file with the propeller, is this possible? For instance having a wav driver as a dll/bin file on SD-media and only loading it in memory when I need to read or write a wav or just access a function from file. Would I need to do this in pasm only and keep it inder 2k???
One last question, do you plan on implimenting any swap space in a future version?
If you, or anyone else reading, have any links on the dll subject with the prop that would be great too but I guess I could do a search for that...
For instance having a wav driver as a dll/bin file on SD-media and only loading it in memory when I need to read or write a wav or just access a function from file. Would I need to do this in pasm only and keep it inder 2k???
Yes as heater says we can do this with other code. There are 10 cogjects now - vga, keyboard, mouse, serial. Lots more to do though. And yes, these bits of code need to be kept under 2k.
If you are running out of memory, you could take a look at Catalina - this can run C programs in external memory - up to many megabytes in size.
thanks hearter, your link, the visual text, is correct but when you hover over it, the forums forgot to add .com after http://forums.parallax so it is broken in that respect.....
(I've spent 2 years writing this driver for free).
Free software is very much appreciated. But occasionally, sometimes, people (like me) sometimes want to say thanks in a monetary way too. How would one do this?
I was just thinking this having gone to sourceforge to download the latest catalina version, bearing in mind I have donated in the past to the author of catalina, and probably will do so again.
Have you thought about putting all your brilliant software on somewhere like sourceforge, maybe with a "donate" button, and a link on the bottom of your posts?
I can't promise rivers of gold or anything, but it may not be zero either?
Free software is very much appreciated. But occasionally, sometimes, people (like me) sometimes want to say thanks in a monetary way too. How would one do this?
I know exactly how you feel, The link in my sig is my website, I enjoy writing software for Windows and have had that site for 5 years or more with free software kindly asking for donations. Over the entire 5 years, only one donation. I dont realy mind too much since the software I write is mainly for my own use but if i think others will benifit from it I release it for free. Support for my software requires a donation of atleast $1.
as a developer, I agree with Kye to a certain extent.
Ha, something like this should be added to the obex. That would improve object quality.
Good code could require a certain cogject and most FTDI chips have unique ID's that cannot be changed, atleast I read that someplace. You would have to have something like that for better encryption mechanisms. But with certain encryptions, you canot export their code overseas to some countries.
Just as well, you could create your own boards with some catchy features and make money that way. It just costs an initial investment of the proto's and initial production run.
Each SPIN object include is its own contatiner with with own variables.Each version of my file system driver supports only one file open at a time. If you want to files open at a time you must include it twice. (Thus making two sets of variables to access the file system with).
If you want to files open at a time you must include it twice. (Thus making two sets of variables to access the file system with).
I was wondering about that too, thank for the info Kye. BTW, The DS1302 code works great for me so far, I look forward to your final release of this.
Are you planning on setting up a website to feature all your code and projects Kye? Put a donate link and I'd be glad to donate something for your ds1302 version.
Comments
Don't kill yourself on graphics.
I'm having problems getting even the demo to work. I'm using a stingray board with nothing but a micro SD card adapter attached to a breadboard. Voltages are good.
Setup is as follows:
I've tried with CD both enabled and disabled.
All I get is 'Card not mounted', and when I type 'mount' or 'mount 0' I get 'Disk I/O error'. The microSD card is brand new and has been formatted for FAT32.
This is the sum total of my experience with this so far, and would really like to know where I'm going wrong.
Also, you may have also applied 5V to the 3.3v card and killed it.
The stringray board is not designed to allow easy access to an SD card.
The 2.0v1.0 package finds SDcard but has serial port problems > 96MHz.
When I release my product, there will be an on-line list of supported code and optional CD.
I wouldn't normally care about this, but others do use your code. I prefer to see this working.
Hi JLocke,
I'm using the Parallax Micro SD adapter (#32312), which to my understanding has the 10K pull-up in it's design, so no.
I am trying to connect via the translator pins. Didn't realise this was going to be an issue, but may also explain problems using the USB datalogger.
I'm definitely using 3.3V, not the 5V feed, so this should be ok.
Sounds like I need to take to the board with a soldering iron and some new headers. Thanks for the advice!
I've worked really hard to make the SD card driver work with alot of stuff. I do not believe it is a problem on my end.
I reformatted the disk and it worked after that. I've never had an issue with sdcard hardware. I was very distracted because it worked perfectly with your SD2.0 stuff - except for the serial port weirdness.
Yeah, the serial driver is flaky. It will be updated before Parallax Semi is up and out. Just ignore the bad characters for now.
I've soldered in a new set of headers for pins 16-23 and a bypass header. Plugged it all in, changed the pin numbers in the code and up she came, first try.
Will have to keep this in mind for other components I need to add.
Thanks again!
A 4GB SDcard works fine in the same Propeller board.
I have every public code for FAT16/FAT32 file systems out there in the list in the code you posted. $4, $6, $B .. $C, $E, $14, $16, $1B .. $1C, $1E... those are all the FAT file system types to support. So, what has happened is that your SD card has a slightly corrupted MBR or it was formatted with something really weird.
You can just disable that check. Its just a check to prevent bogus file systems from coming in.
If you want to fix your SD card you'll need to rewrite the MBR on it. Windows won't do this for you easily. You have to use FDisk. Or force the disk to be completely corrupted so that windows will format everything on the disk.
---
This is not a problem with the driver but expected behaviour. Be thankful I did not actually implement all of the checks and balances I found if other drivers I examined. I could have FILLED!!! the mount function with just endless amounts of sanity checks.
But, instead I just left in the few I thought were necessary to catch serious errors.
I was not suggesting the driver is bad, just that i could not use my 2G SD card.
The surprises I see with SD card stuff is generally very annoying though.
There is also this nice little utility!
http://en.kioskea.net/download/download-127-hp-usb-disk-storage-format-tool
(there may be newer versions around)
Comment out the sanity checks if ya want.
I can't seem to remove the rtc calls from the SD3.01_FATEngine.spin without breaking some code. I dont want it removed totaly, I want it for referance when I make an attempt to use the DS1302 rtc instead so I am just commenting out various parts, Can the DS1307 code be completely removed/commented out from the engine? I am also going to try to find some string handeling functions to replace some commonly repeated words in the strings to try and free up some more space, maybee even read the help string from a file that resides on the sd-card.
Since I have programming experiance in MS windows I have the mentality that I can use a type of .dll file with the propeller, is this possible? For instance having a wav driver as a dll/bin file on SD-media and only loading it in memory when I need to read or write a wav or just access a function from file. Would I need to do this in pasm only and keep it inder 2k???
One last question, do you plan on implimenting any swap space in a future version?
If you, or anyone else reading, have any links on the dll subject with the prop that would be great too but I guess I could do a search for that...
Thanks in advance,
Jorge P.
Nothing like dll or dynamic libraries for the prop I'm afraid. However various people have come up with schemes for loading and running programs. Mini operating systems in fact.
Then there are the "cogjects" by Dr_Acular. Load a PASM code to COG, run it, unload it, reuse the COG for another one...
http://forums.parallax.com/showthread.php?130537-Cogjects-load-cog-code-from-SD-and-save-hub-ram&highlight=cogjects
Then there is the overlay scheme by Cluso, load small bits of PASM into a COG from a running PASM program, run them, load another overlay...
Yes as heater says we can do this with other code. There are 10 cogjects now - vga, keyboard, mouse, serial. Lots more to do though. And yes, these bits of code need to be kept under 2k.
If you are running out of memory, you could take a look at Catalina - this can run C programs in external memory - up to many megabytes in size.
I have no plans to put anymore work in this driver unless I am paid todo so. Gotta keep moving on! (I've spent 2 years writing this driver for free).
Free software is very much appreciated. But occasionally, sometimes, people (like me) sometimes want to say thanks in a monetary way too. How would one do this?
I was just thinking this having gone to sourceforge to download the latest catalina version, bearing in mind I have donated in the past to the author of catalina, and probably will do so again.
Have you thought about putting all your brilliant software on somewhere like sourceforge, maybe with a "donate" button, and a link on the bottom of your posts?
I can't promise rivers of gold or anything, but it may not be zero either?
I know exactly how you feel, The link in my sig is my website, I enjoy writing software for Windows and have had that site for 5 years or more with free software kindly asking for donations. Over the entire 5 years, only one donation. I dont realy mind too much since the software I write is mainly for my own use but if i think others will benifit from it I release it for free. Support for my software requires a donation of atleast $1.
as a developer, I agree with Kye to a certain extent.
Good code could require a certain cogject and most FTDI chips have unique ID's that cannot be changed, atleast I read that someplace. You would have to have something like that for better encryption mechanisms. But with certain encryptions, you canot export their code overseas to some countries.
Just as well, you could create your own boards with some catchy features and make money that way. It just costs an initial investment of the proto's and initial production run.
I don't quite understand why the FATEngine object has to be declared twice
fat: "SD3.01_FATEngine.spin"
taf: "SD3.01_FATEngine.spin"
what is the rational behind this?
I was wondering about that too, thank for the info Kye. BTW, The DS1302 code works great for me so far, I look forward to your final release of this.
Are you planning on setting up a website to feature all your code and projects Kye? Put a donate link and I'd be glad to donate something for your ds1302 version.
Thanks for your time with this...