External Flash?

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?

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

They come in surface-mount packages so you will need some kind of breakout board.

does the arduino have libraries for that?
How would I interface with those?

Check out the SD library

and Sparkfun's microSD Shield for an example of suitable hardware

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

funkyguy4000:
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.

/** 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;

Okay thanks!