Sharing SPI with both SD and ISP?

Go To Last Post
4 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For a project in school my teacher recommended I try to do it with SMD components. I am giving it a shot and while working on the circuit I came into a problem. I've always programmed my MCU from the STK500 but for this project I want to put in the ISP header for programming the MCU.

The heart of the project is the MCU interfacing with the SD card through the SPI pins.

I figured the SD card would have to be removed while I was programming since the MCU is programmed at 5V and the SD card runs at 3.3V but I am not sure if the pull-up resisters required to control the SD card would affect the ISP.

If not would my current circuit design work? (labeled 1)

If not would the second circuit design fix the issue? (labeled 2) I added a switch to connect the 5v or SD power.

Any comments?

Thanks in advance.

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This might give you a few clues:
http://www.atmel.com/dyn/resourc...

Its found on the AVR application notes page:
http://www.atmel.com/dyn/product...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

2 will give you problems as the SD will try to power itself off the programming lines.

1 should work. The only resistor you really MUST HAVE is the one on the CS line to keep the chip tristated during programming. Is the CS positive or negative? The resistor will need to be pull up or pull down depending on the CS line.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you both for you inputs.

I'm going to read over the documents you've mentioned Mike B.

On all the circuits that I've seen for interfacing an AVR with an SD card all the SPI pins are pulled up with resistors.