Been playing around with FemtoBasic and having a great time, up to now I've had no way of saving my programs to SD card but since receiving the Human Interface board(HIB) which plugs into the quickstart board I now have an SD card interface.
Problem I'm having is that when I type files into Femto its says "can't mount SD card" , I'm presuming that it is a pin issue as the HIB SD card is using pins 0-3 the thing is I don't know what to change and where, I've looked at the fsrw.spin and sdspiFemto.spin but it's not clear to me where the pin assingments would be, can someone help put me in the right direction please.
I thought that the HIB would be a straightforward plug in and go as it's supposed to be pin for pin with the prop demo board apart from the microphone(missing on HIB)
Hmm, once I added my human interface board to my quickstart, I loaded femtobasic onto the board, and fired it up, and it worked perfectly, and all I had to do was uncomment the proper items in the femtobasic top section to get the pins correct.
I'm using the vga version, and I've added my emic2 to the setup, but must have it wired wrong, because I'm not getting speech output.
I modified the vga code to send the text to the emic2 as well as to the screen, so that anything that shows up on the vga screen also goes to the emic2, so I got me a talking basic interpreter.
Now, only if I can get it to work.
I also added a cls command (for clear screen) using toc66, and it didn't give me any errors when I coded it, I've not tested it just yet.
I had to reduce the program buffer to 7K from 8K to make enough room to fit the emic2 code into the mix, but it all compiles properly, but the emic doesn't talk (yet) so still working on that, but just wanted to drop a line here stating how much my son liked femtobasic, and how easy it seems to be to add to it.
Not much for structured postings I know, but what the heck, it's all in there.
Oh, btw, is a 2gb card required? if so, why? I can't find anything smaller than 4gb. if it's formatted as a 2gb, will that work, or does it have to be a real 2gb card? I recall reading somewhere that the sd card reader won't support anything larger than 2gb, but I checked over the documentation that came with the card reader I bought directly from parallax (not the one on the human interface board) and it doesn't say anything about a 2gb limitation.
The human interface board documentation doesn't seem to mention it either, but I did read that somewhere, and just can't seem to find it again.
Any ideas/pointers?
A 4GB SD (not HD) will work fine, you can just use only 2GB of it.
BTW, if you need too do the LONG format. Use FAT, (not FAT32). Fast format doesn't actually write sector information.
The SD pin definitions are in the BB_definitions.spin file.
You will need a non-HD SD card, one which is <= 2GB.
Andy
Thanks Andy the BB_definitions.spin file wasn't in the folder I had but I've found it in the QBasic zip file in the first post of this thread
I presume that I now need to add that to the folder I have and modify the Obj section of the version of FemtoBasic that I have to include the definitions file
And I believe I have to change the spi lines of the code below to 0,1,2,3 respectively?
CON
'' Hardware dependent and other basic definitions
clockMode = xtal1 | pll16x
xtalClock = 5_000_000
spiDO = 12 'change to 0
spiClk = 13 'change to 1
spiDI = 14 'change to 2
spiCS = 15 'change to 3
I was also not aware of the 2GB rule but as Duane has suggested a bigger capacity card will work it just only recognises 2GB, if so I have a 8GB HC card with stuff already on it will I be able to write to it or will I have to find a 2GB card? It's not a problem I've just ordered one from ebay it's just I was hoping to start straight away instead of waiting for the new one to arrive.
Hmm, once I added my human interface board to my quickstart, I loaded femtobasic onto the board, and fired it up, and it worked perfectly, and all I had to do was uncomment the proper items in the femtobasic top section to get the pins correct.
I'm surprised it worked with the HIB as it does show pins 12-15 in the comments and code(see above post) and the HIB states pins 0-3
As a matter of interest could you please post the code bit you altered by uncommenting
The SD low level driver in all FemtoBasic's can't handle SDHC cards. It's just a software thing and has nothing to do with the SD socket or other hardware of the board(s). There is also no 2GB limit in the software, but normally the change from SD to SDHC happens between 2GB and 4GB cards. Theoretically also 4GB cards that are not SDHC are possible but I have never seen one so far. All the 4GB cards I have are SDHC and 8GB are anyway, so they will not work.
Sorry for the confusion, I hope it is now clear.
Yes, 4GB SD (not SDHC) cards did exist at one time, but for a very short time period anyway - and never for microSD I believe. Haven't seen one in years, they're not produced. It's very difficult to find 2GB cards these days, for some reason. But they were easy to find in Japan, I saw them everywhere and bought some. They were full-size, but I have some micro-to-full-size adapters (or should that be full-size-to-micro - they're for using SD in microSD sockets) on order, expecting them every day now.. I hate microSD anyway, they're terrible except for permanent, one-time installations deep inside a phone or something.
So presumably the real fix is to update the software to handle SDHC...
I found and ordered a micro SD from ebay, the photo showed only the SD marking so hopefully not HC
price was only £1.99 so presume it is, If it works I'll post here and order more.
I'm using a 2GB MicroSD (not HC) on my FemtoBasic home made PropStick right now.
This came from a garage sale cell phone, $0.50. It even had a Micro to standard adapter.
This works fine.
But seriously, 2GB is an offal lot of memory for a FemtoBasic computer.
I have a bunch of 512MB SD cards, ebay, and it takes maybe an hour to access all of that.
FemtoBasic is a bit slow, but very convenient to use. My favorite Prop Language.
I'm using a 2GB MicroSD (not HC) on my FemtoBasic home made PropStick right now.
This came from a garage sale cell phone, $0.50. It even had a Micro to standard adapter.
This works fine.
But seriously, 2GB is an offal lot of memory for a FemtoBasic computer.
I have a bunch of 512MB SD cards, ebay, and it takes maybe an hour to access all of that.
FemtoBasic is a bit slow, but very convenient to use. My favorite Prop Language.
Duane J
Even when I think i've got a bargain you've outdone me again! It shows how we are always paying over the odds over here. One reason I order from the States
Edit: That's strange quoting you added more to your post that wasn't visible on the forum??
The second paragraph starting "But Seriously" wasn't showing before in your post but showed up when i used the reply with quote function, now it is showing in your original post as well! must be my PC
The second paragraph starting "But Seriously" wasn't showing before in your post but showed up when i used the reply with quote function, now it is showing in your original post as well! must be my PC
I understand.
After submitting the reply I immediately edited the message and added the clarification.
Apparently you started a quoted reply before my edit and the server caught up before your submission. Maybe.
The problem is, regular mini sd cards are getting harder and harder to find. In the future, it might be impossible to locate them outside of ebay or collectors. What would be required to update the sd driver to handle sdhc cards?
If that's the only thing preventing femtobasic from using the other cards, then it seems to me it'd be practical to fix it.
Assuming of course, it isn't a memory hog to support such things. I've already hit the memory limit adding speech capabilities to my copy of femtobasic.
The problem is, regular mini sd cards are getting harder and harder to find. In the future, it might be impossible to locate them outside of ebay or collectors. What would be required to update the sd driver to handle sdhc cards?
If that's the only thing preventing FemtoBasic from using the other cards, then it seems to me it'd be practical to fix it.
Assuming of course, it isn't a memory hog to support such things. I've already hit the memory limit adding speech capabilities to my copy of FemtoBasic.
Just a thought here:
As I understand it, the SD(not HC) cards are formated in FAT (not FAT32) which FemtoBasic likes.
Is it possible to format SDHC cards in FAT (not FAT32)? If yes this might be a "temporary" solution.
Yes, this will waste much of the space but can this be done?
FemtoBasic has already been updated with FSRW 2.6 which is supposed to support FAT32 and SDHC. The other variations of FemtoBasic like DongleBasic have not been updated. Check the comments at the beginning of fsrwFemto.spin
Oh, in that case, I'm ok. I downloaded femtobasic from the femtobasic thread, and I just checked, I do have the 2.6 driver. I only tried once to save a file, and it rebooted the propeller, but that is more likely a case of me not configuring the card reader than anything else.
I'll fix it up and give it another shot, and see what happens.
(I really need a technical pair of eyes around here) I need to verify my wiring for the speech board, and to do that, I have to keep asking questions like Does this wire connect to sin on that side, and p6 on this side?
How about this one, is it connected to p7 and sout?
It works, but does lead to some interesting results at times.
Anyway, will test this today and post results.
Comments
Problem I'm having is that when I type files into Femto its says "can't mount SD card" , I'm presuming that it is a pin issue as the HIB SD card is using pins 0-3 the thing is I don't know what to change and where, I've looked at the fsrw.spin and sdspiFemto.spin but it's not clear to me where the pin assingments would be, can someone help put me in the right direction please.
I thought that the HIB would be a straightforward plug in and go as it's supposed to be pin for pin with the prop demo board apart from the microphone(missing on HIB)
You will need a non-HD SD card, one which is <= 2GB.
Andy
I'm using the vga version, and I've added my emic2 to the setup, but must have it wired wrong, because I'm not getting speech output.
I modified the vga code to send the text to the emic2 as well as to the screen, so that anything that shows up on the vga screen also goes to the emic2, so I got me a talking basic interpreter.
Now, only if I can get it to work.
I also added a cls command (for clear screen) using toc66, and it didn't give me any errors when I coded it, I've not tested it just yet.
I had to reduce the program buffer to 7K from 8K to make enough room to fit the emic2 code into the mix, but it all compiles properly, but the emic doesn't talk (yet) so still working on that, but just wanted to drop a line here stating how much my son liked femtobasic, and how easy it seems to be to add to it.
Not much for structured postings I know, but what the heck, it's all in there.
The human interface board documentation doesn't seem to mention it either, but I did read that somewhere, and just can't seem to find it again.
Any ideas/pointers?
BTW, if you need too do the LONG format. Use FAT, (not FAT32). Fast format doesn't actually write sector information.
Duane J
I presume that I now need to add that to the folder I have and modify the Obj section of the version of FemtoBasic that I have to include the definitions file
And I believe I have to change the spi lines of the code below to 0,1,2,3 respectively? I was also not aware of the 2GB rule but as Duane has suggested a bigger capacity card will work it just only recognises 2GB, if so I have a 8GB HC card with stuff already on it will I be able to write to it or will I have to find a 2GB card? It's not a problem I've just ordered one from ebay it's just I was hoping to start straight away instead of waiting for the new one to arrive.
As a matter of interest could you please post the code bit you altered by uncommenting
Sorry for the confusion, I hope it is now clear.
Andy
So presumably the real fix is to update the software to handle SDHC...
-Tor
price was only £1.99 so presume it is, If it works I'll post here and order more.
This came from a garage sale cell phone, $0.50. It even had a Micro to standard adapter.
This works fine.
But seriously, 2GB is an offal lot of memory for a FemtoBasic computer.
I have a bunch of 512MB SD cards, ebay, and it takes maybe an hour to access all of that.
FemtoBasic is a bit slow, but very convenient to use. My favorite Prop Language.
Duane J
Edit: That's strange quoting you added more to your post that wasn't visible on the forum??
What strange quoting?
Duane J
After submitting the reply I immediately edited the message and added the clarification.
Apparently you started a quoted reply before my edit and the server caught up before your submission. Maybe.
Duane J
If that's the only thing preventing femtobasic from using the other cards, then it seems to me it'd be practical to fix it.
Assuming of course, it isn't a memory hog to support such things. I've already hit the memory limit adding speech capabilities to my copy of femtobasic.
As I understand it, the SD(not HC) cards are formated in FAT (not FAT32) which FemtoBasic likes.
Is it possible to format SDHC cards in FAT (not FAT32)? If yes this might be a "temporary" solution.
Yes, this will waste much of the space but can this be done?
Duane J
I'll fix it up and give it another shot, and see what happens.
(I really need a technical pair of eyes around here) I need to verify my wiring for the speech board, and to do that, I have to keep asking questions like Does this wire connect to sin on that side, and p6 on this side?
How about this one, is it connected to p7 and sout?
It works, but does lead to some interesting results at times.
Anyway, will test this today and post results.