Acquiring and storing data to SD card at high rate from 4 analog pins

You may also consider moving the data to a 2nd atmega which is managing the SD card. The simplest approach is to simply use the atmega physical USART, but you could implement another interface, if necessary. There are a number of benefits and not needing to allocate 512 Bytes to the sector buffer is a big one.

I have used this often, the dedicated SD-Card Atmega can simply be a naked 328P build or in today's market, a $3 mini-clone. Just remember that the SD-card is 3.3 Volt logic.

Ray