Atmega16 and MMC

Nov 07, 2004 3 Replies

In ATMega16, I want to ask how to use SPI with a MMC card.



I have seen that there are 4 pins in ATMega16 which implements SPI. They are



SS, MOSI, MISO, SCK.



For a MMC card, the 4 pin assignments are


1 CS
2 Din
5 SCK
7 Dout

Is the SS pin of ATmega16 connected to CS of MMC or else?



Thanks!


"terry" skrev i meddelandet news: snipped-for-privacy@posting.google.com...

are

When You talk to an MMC card, the CPU is the Master and the Card is a slave. The /SS signal is slave select and is used when the CPU is a slave. You can connect any I/O port to the CS of the card. If you have another Master on the bus it needs to be anything but /SS.

Best Regards, Ulf Samuelsson ulf@a-t-m-e-l.com This is a personal view which may or may not be share by my Employer Atmel Nordic AB

I have connected /ss to /cs (pin 1) of mmc card and it works.

slave.

Yes, but as a master, the SS pin of the Mega16 is just an I/O pin which you set yourself. So you could have used any output for that. The only dedicated function of the SS pin is when it is used as an input when the SPI interface is programmed to be a slave.

Meindert

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required