Libstock exclusive: FAT32 and Network Ethernet Libraries

General discussion on Libstock website & codes posted on this website.
Author
Message
ilferrari
Posts: 195
Joined: 18 Nov 2013 09:09

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#46 Post by ilferrari » 22 Oct 2015 10:03

No support for long file names? (FAT32)

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#47 Post by biljana.nedeljkovic » 29 Oct 2015 17:17

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

Artan
Posts: 1
Joined: 25 Mar 2016 01:58

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#48 Post by Artan » 25 Mar 2016 02:01

excelent!!!

ilferrari
Posts: 195
Joined: 18 Nov 2013 09:09

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#49 Post by ilferrari » 13 Jul 2016 11:08

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

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#50 Post by biljana.nedeljkovic » 15 Jul 2016 09:42

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

ilferrari
Posts: 195
Joined: 18 Nov 2013 09:09

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#51 Post by ilferrari » 18 Jul 2016 08:59

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

ilferrari
Posts: 195
Joined: 18 Nov 2013 09:09

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#52 Post by ilferrari » 18 Jul 2016 09:01

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.

User avatar
biljana.nedeljkovic
mikroElektronika team
Posts: 1043
Joined: 30 Jun 2015 15:15

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#53 Post by biljana.nedeljkovic » 03 Aug 2016 11:34

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

Richie
Posts: 50
Joined: 21 Feb 2010 19:41

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#54 Post by Richie » 29 Sep 2019 16:05

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

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#55 Post by stefan.filipovic » 30 Sep 2019 14:38

Hi Richie,

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

Kind regards,
Stefan Filipović

Richie
Posts: 50
Joined: 21 Feb 2010 19:41

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#56 Post by Richie » 30 Sep 2019 15:51

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) ?

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#57 Post by stefan.filipovic » 01 Oct 2019 10:40

Hi Richie,

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

Please refer to this forum topic.

Kind regards,
Stefan Filipović

Richie
Posts: 50
Joined: 21 Feb 2010 19:41

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#58 Post by Richie » 08 Oct 2019 11:53

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)

User avatar
stefan.filipovic
mikroElektronika team
Posts: 1135
Joined: 18 Dec 2018 10:30

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#59 Post by stefan.filipovic » 08 Oct 2019 13:48

Hi Richie,

Which MCU and development board are you using?

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

Kind regards,
Stefan Filipović

Richie
Posts: 50
Joined: 21 Feb 2010 19:41

Re: Libstock exclusive: FAT32 and Network Ethernet Libraries

#60 Post by Richie » 10 Oct 2019 08:51

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 ?

Post Reply

Return to “Libstock Discussion”