0
\$\begingroup\$

My idea is to connect a Chip which doesn't explicitly support external memory but has SPI protocol and I2C. So far I understand I have only 3 pins for SPI. Wasn't able to find an approach (schematics) to connect a flash memory with the 3 pins and should and what other practical problems should I solve to achieve that ?

alex.forencich
41.7k1 gold badge71 silver badges110 bronze badges
asked Oct 6, 2015 at 22:10
\$\endgroup\$
2
  • \$\begingroup\$ Finding a fourth pin for the chip select. \$\endgroup\$ Commented Oct 6, 2015 at 22:11
  • \$\begingroup\$ Depending on your requirements, virtually all SD cards support an SPI interface and are a relatively cheap way to add GB's of Flash memory to a project. \$\endgroup\$ Commented Oct 6, 2015 at 22:17

1 Answer 1

1
\$\begingroup\$

Generally the explicit external memory support is for accessing external parallel flash and RAM from within the address space of the executing code. With a chip that supports this, you can run code directly from external memory, create and access pointers in external memory, etc. There is never anything preventing you from using an external memory, you just won't have as clean of a method of accessing it. For SPI/I2C memories, you'll have to call functions to access the memory.

It should be relatively straightforward to connect an SPI flash chip. Just take a look at the flash chip datasheet to see what pins need to be connected where. Generally you'll have MOSI, MISO, clock, and chip select, possibly with some extra control lines such as write protect. The extra lines can usually just be tied high or low. MOSI, MISO, and clock will need to be connected to the chip's SPI controller for maximum performance. Chip select can generally be driven by any I/O pin, though some SPI controllers can also coordinate the chip select line with dedicated pins and possibly an external decoder chip.

answered Oct 6, 2015 at 22:21
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.