Page 1 of 1

Reference Library SD 8:3 format

PostPosted: Wed Jun 19, 2013 9:24 am
by bitfogav
I notice that in the SD Card library it is mentioned that the string will be padded to 8:3 format, Can someone please explain what exactly this means?.. This might explain why when I read a byte from the SD Card, I get some extra bytes than I expect?.

Re: Reference Library SD 8:3 format

PostPosted: Wed Jun 19, 2013 10:29 pm
by Jerry Messina
The 8.3 comments apply to filenames... the lib supports old DOS-style names with an 8 char name and a 3 char extension (ie "FILENAME.TXT").

In SDLib.bas filenames are defined as
Code: Select all
' name structure...
Structure TName
   Dim Name As String(9)
   Dim Extension As String(4)
End Structure
Public Type TSDName = TName


and the padding is done in
Code: Select all
Sub ModifyFileName(ByRef pFileName As TSDName)

Re: Reference Library SD 8:3 format

PostPosted: Wed Jun 19, 2013 11:11 pm
by bitfogav
Thank you Jerry for taking the time to explain this, it is much appreciated..

>This might explain why when I read a byte from the SD Card, I get some extra bytes than I expect?.
In this case this wasn't the issue I thought and I found out that the few bits after each byte read from the SD Card was the new line command.. :oops: I think this has caught me out before..