When used with the Arduino SD Library, one can easily read, write, create, and remove files (and directories).
The SD card solution is also very convenient! You can plug the SD card into any regular computer (or phone) and copy onto it any programs you want to run on the Hack Computer (for example these games on Github). (Think game cartridge or USB thumb drive). Similarly, if you write a program and save it onto the SD card when using the Hack Computer, you can then open it up later on any other computer (or phone).
Testing it out
To use the SD card reader with an Arduino there wasn’t much I had to do, just connect the shield to the Arduino and use.
The pinouts are as follow:
Arduino | Mcufriend Shield D13 | SD_SCK D12 | SD_DI // MISO D11 | SD_DO // MOSI D10 | SD_SS
RAM (volatile memory)
Though the SD card can also be used as RAM, I’m thinking of using the RAM* inside the FPGA instead. I imagine access times will be much faster given that the data will have a shorter distance to travel. Also the SD card uses serial communication (bits arrive one at a time), whereas the internal RAM can be configured to communicate in parallel (all bits arrive simultaneously).
- Translate the Arduino SD and SPI libraries (and their dependencies) into Hack’s high level language
- Figure out how to use the RAM blocks in the FPGA