• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Oshonsoft Basic and SD Cards

Not open for further replies.


Well-Known Member
Most Helpful Member
Has any other user of SD Card Oshonsoft Basic been successful in getting the following commands to work.?

SDCardFAT32FileExists and SDCadFAT32Dir

So far I have been able to Init, Create, Write, Append, Close and Delete files OK.

I am using a 18F4520 PIC, 8Gb SD Cards and a USB SD Card Writer/Reader for checking the SD Card files, also to format the cards for FAT32 use.

There also appears to be two other problems.

I have been unable to construct a new file name that the Compiler will allow, it appears that the any file name has to be written as part of the main program.

Also after a Card File Read operation the file-length is zeroed!, so its not possible to Write/Append any further data to the file.


I did raise a bug report to Vlaidir sometime ago regarding the File-exists and Dir, but got no useful reply.

If others are experiencing the same problems I will re-contact Vlad and tell him its got to be fixed.
Last edited:


Well-Known Member
Most Helpful Member
hi Ian,
My project is working fine on all the FAT32 commands except the two commands that will not execute,, the file exists command locks up the program.

For a temporary get around of the file-exists and the 'fixed' file names, I am using the PIC's internal eeprom to save a file incremented count value, then use that value in a Select Case routine.
case 0
create or append file0.txt
Write 10, 1
case 1
create or append file1.txt
Write 10,2


It's a little crappy but it enables me to move forward with my project.

I have also posted my initial post/thread to Oshonsoft/Yahoo group.

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
I tend not to use Oshonsoft anymore.... Things keep changing plus I have now transferred all of my code to XC8 so it suits me better!! I use the SD routines from Motty22's web pages... They are that petite fat... Works okay on a pic16f4620...
Not open for further replies.

Latest threads

EE World Online Articles