Working fatfs implementation for Mega2560

Go To Last Post
2 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Guyzz

 

I'd like to use an Arduino Mega2560 R3 , with fatfs. But not arduino code.

 

I could read up on fatfs hardware pins etc. But was wondering if anyone has a working implementation or link to one.

 

 

 

TIA

 

/Bingo

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Dare I even say this but did you read the (what used to be 14 page!) thread about FatFs in the Tutorial Forum. In later pages I worked through the process of taking the latest (at that time) drop of code from Chan's site and getting it going. There really isn't very much to it in fact. You just have to make sure the right pins for slave select (card select), card present and write protect are being used in the low level driver file. You have to provide a 100ms interrupt that calls disk_timerproc() and that's actually about all there is to it.

 

Rather confusingly recent issues of FatFs have two AVR sudirs - "foolproof" and "complex" and I imagine the temptation is to use "foolproof" but this isn't actually the best choice - it's over simplified. So use "complex" and follow my notes in that thread.

 

EDIT: Crikey! The search here actually worked rather well. I just searched "FatFs" then set the Forums filter to tutorial and there were just 5 items to pick from. This is the one I meant:

 

https://www.avrfreaks.net/forum/t...

 

14 pages on "legacy" is now 34 pages here - I guess that's what they call "progress"? (the fact that there is no "view all" probably means you are going to have to read through most of those 34 pages).

Last Edited: Fri. Sep 19, 2014 - 09:01 AM