Atmega16 and MMC

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!

Reply to
terry
Loading thread data ...

"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
Reply to
Ulf Samuelsson

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

Reply to
terry

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

Reply to
Meindert Sprang

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.