Hi! I have just got into the idea of storing multiple scripts in an SD card, and using a custom driver written to the board to execute those scripts on demand.
I have a 2GB SD card, and an Arduino Mega 2560, but I do not have the SD module to create the connections between the SD and the board in the standard way.
Since the SD card only has 9 pins, I thought "maybe I can connect the pins directly to the board and find a way to read the data without the module". Does anyone know if this is even possible? If so, any good resources for me to learn how to do it?
SD cards are usually 3.3V. Unless you are running the processor at 3.3V, that will not work.
The card does not need all 9 connections - just power, Gnd, SCK, MISO, MOSI, chip select. All at 3.3V levels.
There have been some posts recently about custom bootloader to move a file from SD to flash. See what you can find, I personally don't have time right now.
I would have thought that it would be possible. BUT.....
- The Mega2560 operates from 5V, and your SD card needs 3.3V for its power.
- The SD card doesn't like 5V logic levels applied to its pins so you will need to level shift the signals.
- Soldering wires direct to the SD card is a bit of a one shot deal. Once you've done it (and not destroyed the SD card in the process) you probably won't be able to unsolder the wires again and still have a functioning SD card.
- It's handy being able to plug the SD card into a PC and transfer data. Something you won't be able to do if you've soldered wires to it.
I would suggest that you get hold of an SD card module - they are about 3GBP inc postage here in the UK. It would save you a lot of effort and you'd retain the ability to move the SD card between your Arduino and a PC.
The downside of most of the SD card modules is that they don't play well with other devices on the same SPI bus. That's not a problem if you don't intend to add other SPI devices to the same SPI bus. If you do need other devices on your SPI bus, then there is a relatively simple modification you can do to your SD card module to make it work alongside other SPI devices. A quick search of the forums for "SD card" and MISO should find a few guides.
Another option for you might be Bitlash
"Bitlash is an open source interpreted language shell and embedded programming environment for the popular and useful Arduino.
The Bitlash interpreter runs entirely on the Arduino and interprets commands that you type in a terminal window or send programmatically to the serial port"