Page 4 of 5

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 22 Oct 2015 10:03
by ilferrari
No support for long file names? (FAT32)

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 29 Oct 2015 17:17
by biljana.nedeljkovic
Hello,

unfortunately FAT32 supports short filename only, 8.3 filename.

I will consult with our developers about the possible extension to long filename as well.

Kind regards,
Biljana

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 25 Mar 2016 02:01
by Artan
excelent!!!

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 13 Jul 2016 11:08
by ilferrari
Thanks for the LFN update.

A couple of issues I saw with the MB version:

1. FAT32_ChangeDir("DIR_A") gives error 327 "Incompatible types ("complex type" to "simple type")"
2. FAT32_ChangeDir("\\") does not work either

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 15 Jul 2016 09:42
by biljana.nedeljkovic
Hello,

In mikroBasic, you should declare the variable as array of char, and than assign it the required value.

We will make some editing in the Help file to give the proper explanation.

Kind regards,
Biljana

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 18 Jul 2016 08:59
by ilferrari
Thanks Biljana, so it is the help file which is incorrect.

The root command "\\" still does not work for FAT32_ChangeDir, even using char array. Please check this

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 18 Jul 2016 09:01
by ilferrari
One more question - is there a way to get the Used and Total space of the SD Card, like with FAT32_GetFreeSpace?

FAT32_ScanDisk is not acceptable because it hangs for a long time while scanning the disk.

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 03 Aug 2016 11:34
by biljana.nedeljkovic
Hello,

Unfortunately, FAT32_ScanDisk does the results you asked for, although it takes some time to scan the disk.

Does the root command give you the same error the types are not compatible or do you receive some different message?

Best regards,
Biljana

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 29 Sep 2019 16:05
by Richie
I'm using the FAT32 lib with mikroe Basic pro for PIC. The following throws up the error -

filename = 'TestFile.txt'
FAT32_Open(@filename, FILE_READ)

248 303 Identifier "FILE_READ" was not declared Test.mbas
248 301 ")"is not valid identifier Test.mbas
249 304 Syntax error: Expected "end" but "FAT32_Size" found Test.mbas
249 304 Syntax error: Expected "sub" but "(" found Test.mbas
249 304 Syntax error: Expected "end" but "@" found Test.mbas
249 304 Syntax error: Expected "." but "filename" found Test.mbas


Thanks

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 30 Sep 2019 14:38
by stefan.filipovic
Hi Richie,

FILE_APPEND_F32, FILE_WRITE_F32, and FILE_READ_F32 are available constants for the FAT32_Open function.

Kind regards,

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 30 Sep 2019 15:51
by Richie
Thankyou. (it didn't say _F32 in the help file)


BTW is it possible to get the number of files in a directory ?

Also, is it possible to read all the filenames in a directory (and place into an array) ?

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 01 Oct 2019 10:40
by stefan.filipovic
Hi Richie,

You should be able to do it with FAT32_Dir() function.

Please refer to this forum topic.

Kind regards,

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 08 Oct 2019 11:53
by Richie
I'm having trouble with initialising -

SPI1_Init_Advanced(_SPI_MASTER_OSC_DIV64, _SPI_DATA_SAMPLE_MIDDLE, _SPI_CLK_IDLE_LOW, _SPI_LOW_2_HIGH)

while FAT32_Init() <> 0 wend

SPI1_Init_Advanced(_SPI_MASTER_OSC_DIV4, _SPI_DATA_SAMPLE_MIDDLE, _SPI_CLK_IDLE_LOW, _SPI_LOW_2_HIGH)


It either never initialises, or takes a very long time.

Tried several different SD cards (all formatted to FAT32)

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 08 Oct 2019 13:48
by stefan.filipovic
Hi Richie,

Which MCU and development board are you using?

Would you like to zip and attach your project here for inspection?

Kind regards,

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

Posted: 10 Oct 2019 08:51
by Richie
Which MCU and development board are you using?
PIC18F4525 on my own board.

The circuit works, and when it initialises, the software works too.

What can influence the SPI module and cause problems ?