Libstock exclusive: FAT32 and Network Ethernet Libraries
Re: Libstock exclusive: FAT32 and Network Ethernet Libraries
No support for long file names? (FAT32)
- biljana.nedeljkovic
- mikroElektronika team
- Posts: 1043
- Joined: 30 Jun 2015 15:15
Re: Libstock exclusive: FAT32 and Network Ethernet Libraries
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
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
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
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
- biljana.nedeljkovic
- mikroElektronika team
- Posts: 1043
- Joined: 30 Jun 2015 15:15
Re: Libstock exclusive: FAT32 and Network Ethernet Libraries
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
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
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
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
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.
FAT32_ScanDisk is not acceptable because it hangs for a long time while scanning the disk.
- biljana.nedeljkovic
- mikroElektronika team
- Posts: 1043
- Joined: 30 Jun 2015 15:15
Re: Libstock exclusive: FAT32 and Network Ethernet Libraries
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
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
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
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
- stefan.filipovic
- mikroElektronika team
- Posts: 1135
- Joined: 18 Dec 2018 10:30
Re: Libstock exclusive: FAT32 and Network Ethernet Libraries
Hi Richie,
FILE_APPEND_F32, FILE_WRITE_F32, and FILE_READ_F32 are available constants for the FAT32_Open function.
Kind regards,
FILE_APPEND_F32, FILE_WRITE_F32, and FILE_READ_F32 are available constants for the FAT32_Open function.
Kind regards,
Stefan Filipović
Re: Libstock exclusive: FAT32 and Network Ethernet Libraries
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) ?
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) ?
- stefan.filipovic
- mikroElektronika team
- Posts: 1135
- Joined: 18 Dec 2018 10:30
Re: Libstock exclusive: FAT32 and Network Ethernet Libraries
Hi Richie,
You should be able to do it with FAT32_Dir() function.
Please refer to this forum topic.
Kind regards,
You should be able to do it with FAT32_Dir() function.
Please refer to this forum topic.
Kind regards,
Stefan Filipović
Re: Libstock exclusive: FAT32 and Network Ethernet Libraries
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)
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)
- stefan.filipovic
- mikroElektronika team
- Posts: 1135
- Joined: 18 Dec 2018 10:30
Re: Libstock exclusive: FAT32 and Network Ethernet Libraries
Hi Richie,
Which MCU and development board are you using?
Would you like to zip and attach your project here for inspection?
Kind regards,
Which MCU and development board are you using?
Would you like to zip and attach your project here for inspection?
Kind regards,
Stefan Filipović
Re: Libstock exclusive: FAT32 and Network Ethernet Libraries
PIC18F4525 on my own board.Which MCU and development board are you using?
The circuit works, and when it initialises, the software works too.
What can influence the SPI module and cause problems ?