Page 1 of 1

Pic 18LF1622 buffer sd-card

Posted: Fri Jan 20, 2017 11:12 am
by stefan.erni
Hi Ben

I have a Pic 18LF1622. It's working fine to write date with a sectorsize (512Byte)buffer from the FAT.

So what I need is one(or two) buffer more. So I can write in buffer A new date and on the same time write buffer B to the disk (maybe copy to Fatbuffer).

FC7 let me not create a buffer with 512Byte.
7567: (1250) could not find space (512 bytes) for variable _buffera

But FC7 let me just create 4 buffer's with 256Byte.
So it's not a problem of Dataspace. Is ther a way to go to 512byte?

Re: Pic 18LF1622 buffer sd-card

Posted: Fri Jan 20, 2017 3:27 pm
by Benj
Hello,

The compiler might be struggling to find a single block that is large enough.

You could instead break the 512 byte buffer up into 256 bytes.

If the index to the buffer is < 256 then use the first half buffer, otherwise use the second half buffer. This is how the 512 byte buffer inside the FAT component is done.

Could you use the buffer inside the component at all to save you creating two 512 byte buffers?

Re: Pic 18LF1622 buffer sd-card

Posted: Tue Jan 24, 2017 4:10 pm
by stefan.erni
Hi Ben
Is it possible to have longer File name as the 8.3?

Re: Pic 18LF1622 buffer sd-card

Posted: Tue Jan 24, 2017 5:52 pm
by Benj
Hello,

Extended file names are something I've been meaning to tackle for a while but they are not that straight forward and potentially add a lot of overhead to the component.

I'll add it to the list to have another investigation on how easy it would be to add support for them.

Re: Pic 18LF1622 buffer sd-card

Posted: Tue Jan 24, 2017 6:01 pm
by stefan.erni
Oh Thank you Ben
I have a wish more ....
Write to the first block before I close the file. I need it to write in the fileheader
- how many block there is in the recorded file(data)
-start and stop time