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
FC7 and SDCARD FAT
Moderator: Benj
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: FC7 and SDCARD FAT
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
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
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: FC7 and SDCARD FAT
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
I have opened your program and change pins for LCD, it also stay on the init...
I have update the components FAT.
Yannick
- 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
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?
Do the arrows on the card simulation in Proteus allow the card to be inserted and detected?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: FC7 and SDCARD FAT
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
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
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Re: FC7 and SDCARD FAT
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
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