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: 262
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 115 times
Been thanked: 112 times
Contact:

Re: FAT Keeps Returning 255

Postby STibor » Fri Jan 11, 2013 6:08 pm

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: 14797
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4759 times
Been thanked: 4362 times
Contact:

Re: FAT Keeps Returning 255

Postby Benj » Mon Jan 14, 2013 11:11 am

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.
These users thanked the author Benj for the post:
STibor (Mon Jan 14, 2013 7:31 pm)
Rating: 5%
 

User avatar
STibor
Posts: 262
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 115 times
Been thanked: 112 times
Contact:

Re: FAT Keeps Returning 255

Postby STibor » Mon Jan 14, 2013 7:34 pm

Hi!
And works perfect!
Pic18F26K20 88MHz clock plays 44,1kHz and WAV files. :D
These users thanked the author STibor for the post:
Benj (Tue Jan 15, 2013 10:44 am)
Rating: 5%
 

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

Postby Mathy » Tue Jan 15, 2013 9:41 am

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: 262
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 115 times
Been thanked: 112 times
Contact:

Re: FAT Keeps Returning 255

Postby STibor » Sat Jan 26, 2013 11:21 am

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=0yutlrw9HBs&feature=share&list=UU4P1-RwdOagCbIk7Km-R28Q
These users thanked the author STibor for the post:
Benj (Mon Jan 28, 2013 11:19 am)
Rating: 5%