FAT Keeps Returning 255

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: FAT Keeps Returning 255

Post 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.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: FAT Keeps Returning 255

Post 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.

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: FAT Keeps Returning 255

Post by STibor »

Hi!
And works perfect!
Pic18F26K20 88MHz clock plays 44,1kHz and WAV files. :D

Mathy
Posts: 333
Joined: Mon Oct 05, 2009 2:39 pm
Has thanked: 30 times
Been thanked: 33 times
Contact:

Re: FAT Keeps Returning 255

Post 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....

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: FAT Keeps Returning 255

Post 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

Post Reply