Lightweight SD card support #553
Replies: 7 comments 1 reply
-
Further to this, Elm-chan provides a generic bit-bang solution here: http://elm-chan.org/fsw/ff/pfsample.zip file in "generic" folder where there is a port bitbang driver: mmcbbp.c That will be a good place for me to start, and in theory it might even work out-of-the-box with the tiny core. That, at least, I can investigate. |
Beta Was this translation helpful? Give feedback.
-
More of my internal monologue, sorry, Given that the Tiny88 does have dedicated hardware, can I assume it works the same way at register level as registers on (say) atmega328? I the comments in SPI.cpp say that Dr Azzy has basically merged the "official" Arduino SPI library and Christiansen's tinySPI. I think I'm write in saying that (as per line 23) the #ifdef SPDR and reference to hardware SPI is the place where that decision is made, I should be able to take example code for atmega328 that uses low-level access to SPI and copy/paste. |
Beta Was this translation helpful? Give feedback.
-
The ATtiny88 SPI peripheral is identical to the 328p one. The SPI peripheral is a very basic one I thought there was some awkwardness about working with SD cards that required a 512b ram buffer though, that could be a deal breaker. |
Beta Was this translation helpful? Give feedback.
-
I'm looking at the feasibility of attaching SD card using SPI to a tiny, specifically our friend the ATTiny88.
The standard Arduino SD package seems to be too big to fit meaningfully into 8K flash. The closest alternative I have found is elm-chan's "petit fs" at http://elm-chan.org/fsw/ff/00index_p.html which is around 2K flash and optimised to use minimal RAM buffers. The limitations of petit fs don't bother rme.
Good points
However
It would be good to have a solution that takes advantage of the Tiny88 SPI hardware, ideally by using the TinyCore SPI abstraction. Given enough time and tantrums I could figure it out eventually, but it would be a good to stand on the shoulders of giants. Does anyone have experience of this or can point me to someone who's worked in this area?
I'm not completely wedded to the idea of SD cards, so if there are better solutions for larger storage (things like raw sound sample) I would be interested in those too.
Beta Was this translation helpful? Give feedback.
All reactions