Go Down

Topic: External Flash? (Read 648 times) previous topic - next topic

funkyguy4000

Hello,

I am developing an application that may require a lot of storage and i'm afraid that my microcontroller won't be able to hold it all. 
I'm using an ATmega328p for the microcontroller and i'm curious as to what I would do if I wanted to reference parts of the sketch that are on a different chip.  Like keep the algorithm on the ATmega, but have the actual hard-coded variables and such on a different chip. 

How would I do that?
Accelerate to 88 miles per hour.

johnwasser

You can get external SPI FLASH chips from Atmel up to 8 megabytes (64 megabits).

http://www.atmel.com/products/memories/sflash/default.aspx

They come in surface-mount packages so you will need some kind of breakout board.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

funkyguy4000

does the arduino have libraries for that?
How would I interface with those?
Accelerate to 88 miles per hour.

tim7

Check out the SD library
http://arduino.cc/en/Reference/SD

and Sparkfun's microSD Shield for an example of suitable hardware
http://www.sparkfun.com/products/9802

funkyguy4000

I would need to change the pins to use that library.  Is that possible or is it hardcoded into the bootloader?
Accelerate to 88 miles per hour.

Chagrin


I would need to change the pins to use that library.  Is that possible or is it hardcoded into the bootloader?


Check Sd2Card.h under arduino-1.0/libraries/SD/utility/. When SOFTWARE_SPI is defined the pins can be set as desired.

Code: [Select]
/** SPI chip select pin */
uint8_t const SD_CHIP_SELECT_PIN = 10;
/** SPI Master Out Slave In pin */
uint8_t const SPI_MOSI_PIN = 11;
/** SPI Master In Slave Out pin */
uint8_t const SPI_MISO_PIN = 12;
/** SPI Clock pin */
uint8_t const SPI_SCK_PIN = 13;


funkyguy4000

Accelerate to 88 miles per hour.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy