Proton BASIC Community

Proton (Positron) => Proton8 threads => Topic started by: Amateurtje on Feb 04, 2023, 12:46 AM

Title: SD Card, Big card does not work
Post by: Amateurtje on Feb 04, 2023, 12:46 AM
Hello all,

I have here an older script for writing to an SD card. It is based on the file "GPSenSD_Lib.pbp". I think I downloaded this a long time ago. I can not find any other example anymore. The good news is that the script works,. The bad news is that I can not get it to work at a big (128 gig) sd card. My old 32M card works. I even partioned the big SD card as a small 32M card with FAT but it just does not detect the DATA.TXT file which is on the card..He seems to detect the card...

Can anybody help me? These small cards are not easy to buy anymore (and are not of this time)

The size is recognised, so the card is recognised but just the File is not..I also tried a lot of different clustersizes for FAT, FAT32,NTFS and exFAT.

test.zip
Title: Re: SD Card, Big card does not work
Post by: trastikata on Feb 04, 2023, 05:36 AM
If I remember correctly that library didn't support anything else than native FAT16 or multi-partition, thus any card bigger than 2GB won't work.
Title: Re: SD Card, Big card does not work
Post by: Amateurtje on Feb 04, 2023, 07:13 AM
thanks for the answer. this would be probably enough if they would be buy-able.....anybody another script for sd cards maybe?
Title: Re: SD Card, Big card does not work
Post by: RGV250 on Feb 04, 2023, 07:15 AM
Hi,
You have not said what device, as far as I am aware the examples for Proton24 uses Fat32.

Bob
Title: Re: SD Card, Big card does not work
Post by: Amateurtje on Feb 04, 2023, 07:23 AM
sorry, i use a 18F46k22
Title: Re: SD Card, Big card does not work
Post by: RGV250 on Feb 04, 2023, 07:44 AM
Hi,
In that case as Trastikata said, I think you are limited to 2gb. I am not sure what country you are in but I did a quick google and found some here.
https://www.mymemory.co.uk/mymemory-2gb-sd-card-20mb-s.html?gclid=EAIaIQobChMItbWf8637_AIV2e7tCh0XLQngEAQYBCABEgLOfPD_BwE
https://business.currys.co.uk/catalogue/computing/components-upgrades/removable-media/integral-flash-memory-card-2-gb-sd/P282168P?cidp=Froogle&gclid=EAIaIQobChMIhNiUna77_AIVhdLtCh0mHQw6EAQYCCABEgLEcPD_BwE&gclsrc=aw.ds

Also on eBay and aliexpress although I would be wary of those.

Bob
Title: Re: SD Card, Big card does not work
Post by: Amateurtje on Feb 04, 2023, 07:50 AM
Hi,

I am in The Netherlands. I will try to shop in my village this weekend for a card, but I am doubtfull.. Otherwise indeed, I have to scavage the internet...

But I am aa bit surprised that nobody (untill now) is working with an SD card.... Are you all using other storage ideas which i did not think of?  ;D 
Title: Re: SD Card, Big card does not work
Post by: RGV250 on Feb 04, 2023, 07:57 AM
Hi,
Is it mot possible to change the device to try PIC24?, might be easier than finding a reliable 2gb card.

Bob
Title: Re: SD Card, Big card does not work
Post by: Amateurtje on Feb 04, 2023, 08:02 AM
I already made my pcb already and untill now, all my projects are with that pic... there is probable no drop-in solution i can try...
Title: Re: SD Card, Big card does not work
Post by: RGV250 on Feb 04, 2023, 08:03 AM
The other thought is to have a look at FileSys24.inc in the includes folder as that has FAT16/32 and see if you can modify the SD card INC file for your needs?

Bob
Title: Re: SD Card, Big card does not work
Post by: Amateurtje on Feb 04, 2023, 08:16 AM
I am doubtfull if I am good enough in this. I really do not know anything about writing to disks etc. Anyway, can you point me to where I can download this example and I will give it a try?
Title: Re: SD Card, Big card does not work
Post by: RGV250 on Feb 04, 2023, 08:57 AM
Hi,
on Win10 it is in C:\users\YourName\PDS\includes\FileSys.inc

Bob
Title: Re: SD Card, Big card does not work
Post by: Amateurtje on Feb 04, 2023, 09:31 AM
Thanks, found it.. ;D
Title: Re: SD Card, Big card does not work
Post by: Amateurtje on Feb 06, 2023, 02:51 PM
in the meantime I found an old micro SD card so I used the old script for now.. If anybody has already made the FileSys24.inc script working for a 8 bit pic, please do not hold back to share it with us (me  ;D )
Title: Re: SD Card, Big card does not work
Post by: John Lawton on Feb 06, 2023, 05:00 PM
Quote from: RGV250 on Feb 04, 2023, 08:57 AMHi,
on Win10 it is in C:\users\YourName\PDS\includes\FileSys.inc

Bob
In my case with Windows 7, the path is similarly: C:\Users\John\PDS\Includes
Title: Re: SD Card, Big card does not work
Post by: Amateurtje on Feb 06, 2023, 05:48 PM
The path and the files are easily to find.. I did not know/remember they were there (although it looked familiair.. Getting older.. :)  :) ) So also on windows 11, it is on the same location  ;D  ;D
 

Title: Re: SD Card, Big card does not work
Post by: John Lawton on Feb 06, 2023, 06:09 PM
I keep a shortcut to that folder on my desktop as I can never remember it either :)