FC7 and SDCARD FAT

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 7.

Moderator: Benj

Post Reply
ylanchec
Posts: 54
Joined: Mon Jan 14, 2013 10:14 pm
Has thanked: 2 times
Been thanked: 2 times

FC7 and SDCARD FAT

Post by ylanchec »

Hi,

I am testing flowcode 7 with arduino and a FAT SDCARD. All works on flowcode, i read a little text file and display 5 car.

If i compile in hex and link it to a proteus project, the program stay in the initialize function.

Has someone tested SDCARD with arduino and FC7 ?

Best regards

Yannick
Attachments
testsd.zip
(40.03 KiB) Downloaded 278 times

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: FC7 and SDCARD FAT

Post by Benj »

Hello Yannick,

Yes I have been recently testing the FAT component with an Arduino Uno and all is working well.

AVR's have a known bug with SPI you need to either use pin B2 as your CS pin or you need to at least output a 1 to pin B2. If B2 is left as an input it can put the SPI into slave mode which will lock up the SPI comms.

If this is not an option then you will have to use the software channel though this will not be as fast as the hardware channel.

ylanchec
Posts: 54
Joined: Mon Jan 14, 2013 10:14 pm
Has thanked: 2 times
Been thanked: 2 times

Re: FC7 and SDCARD FAT

Post by ylanchec »

Hi Benj,

Thank you for your response.

I have put the spi on software and use b2 and set it as an output.

But this does not seems to be ok.

What is wrong ?

Can you look up at my code please ? do you have your working example ?

Best regards

Yannick
Attachments
testsd.fcfx
(10.23 KiB) Downloaded 308 times

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: FC7 and SDCARD FAT

Post by Benj »

Hello Yannick,

First of all can you check you are using the latest FAT component from here.
http://www.matrixtsl.com/mmforums/viewt ... 356#p78721

Your program looks ok, here is my test program I was using.
FATTest.fcfx
(11.62 KiB) Downloaded 321 times

ylanchec
Posts: 54
Joined: Mon Jan 14, 2013 10:14 pm
Has thanked: 2 times
Been thanked: 2 times

Re: FC7 and SDCARD FAT

Post by ylanchec »

Hi Ben,

I have opened your program and change pins for LCD, it also stay on the init...
I have update the components FAT.

Yannick
Attachments
Snap2.png
(170.46 KiB) Downloaded 718 times
Snap3.png
(150.52 KiB) Downloaded 718 times

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: FC7 and SDCARD FAT

Post by Benj »

Looks like the program is waiting for the card. I get the same thing if I run the program with the card out of the socket.

Do the arrows on the card simulation in Proteus allow the card to be inserted and detected?

ylanchec
Posts: 54
Joined: Mon Jan 14, 2013 10:14 pm
Has thanked: 2 times
Been thanked: 2 times

Re: FC7 and SDCARD FAT

Post by ylanchec »

Hi Benj,

I have test with the button to insert and extraxt the sdcard.

It's the same.

Here is the full project

Thank you

Yannick
Attachments
Snap4.png
(149.8 KiB) Downloaded 712 times
testsd2.zip
(42.21 KiB) Downloaded 297 times

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: FC7 and SDCARD FAT

Post by Benj »

Hi Yannick,

I'm afraid I don't have a license for Proteus that allows me to simulate so I can't check the file you have sent.

However it appears it is Proteus that has the problem as the Flowcode sim and the real world Arduino both seem to be working well.

ylanchec
Posts: 54
Joined: Mon Jan 14, 2013 10:14 pm
Has thanked: 2 times
Been thanked: 2 times

Re: FC7 and SDCARD FAT

Post by ylanchec »

Hi Benj,

I'm going to test with the real hardware.

If the problem comes from proteus, i will write to labcenters.

I have tested examples found on internet with pics and sdcard, and they work on proteus...

Thank you

Yannick

Post Reply