Page 4 of 4

Re: FAT Keeps Returning 255

Posted: Fri Jan 11, 2013 6:08 pm
by STibor
Error during compilation:
WAV_Player_PIC_8khz_8bit_Mono.c (194): error: Total number of array elements can not Exceed 0x100 (use-idx 2 compiler command line argument to remove this restriction)
WAV_Player_PIC_8khz_8bit_Mono.c (195): error: Total number of array elements can not Exceed 0x100 (use-idx 2 compiler command line argument to remove this restriction)
BufferA and BufferB 512 elements, I think byte array to 256 elements.

Re: FAT Keeps Returning 255

Posted: Mon Jan 14, 2013 11:11 am
by Benj
Hello,

Whoops yes you can either create four buffers of 256 bytes or you can switch on the -idx2 functionality to allow for bigger buffers to work correctly. There is information on the forums about how to achieve this.

Re: FAT Keeps Returning 255

Posted: Mon Jan 14, 2013 7:34 pm
by STibor
Hi!
And works perfect!
Pic18F26K20 88MHz clock plays 44,1kHz and WAV files. :D

Re: FAT Keeps Returning 255

Posted: Tue Jan 15, 2013 9:41 am
by Mathy
88 Mhz !

Impressive. Have you tried this on several MCU ?
Have you tested much more ?

I saw in your topic that you had problems with some SDcards.
I don't know if your problem are due to your audio application but I'am able to write on SDCARD Kingston 4Gb class 4 in FAT32 and Samsung 32 Gb class 10 FAT32 if it helps....

Re: FAT Keeps Returning 255

Posted: Sat Jan 26, 2013 11:21 am
by STibor
Just a PIC18F26K20 controller was tested.
Just out of curiosity.
Benj program works perfectly with 64MHz clock.
Here's a video of the sound quality.
The PIC PWM output is filtered through the line input is connected to the PC.
The webcam video I recorded.
http://www.youtube.com/watch?v=0yutlrw9 ... Ik7Km-R28Q