The ATtiny85 has no dedicated SPI port. It has, however, an “USI” port
(Universal Serial Interface) that should be able to do the job. The lack
of SPI should not be a problem, but the lack of memory will be a
Files on an SD card are written one sector (512 bytes) at a time.
For this reason, the SD library uses a 512 bytes buffer in RAM.
That cannot work on an ATtiny85, as the buffer would consume the whole
You may be able to do something using the Petit FAT library,
provided you can work around the severe limitations of its write
The write function has some restrictions listed below:
- Cannot create file. Only existing file can be written.
- Cannot expand file size.
- Cannot update time stamp of the file.
- Write operation can start/stop on the sector boundary only.
- Read-only attribute of the file cannot block write operation.
The first two points imply that you would have to create the file and
allocate the sectors for it in your computer.
This blog post mentions a port of the library to the Arduino
environment, and its use on an ATtiny84, which has similar capabilities
to the ATtiny85 (only with more pins).