A MultiMediaCard contains these elements (Figure 1-5):
• Memory for data storage. The memory is typically flash memory but ROM-based MultiMediaCards are also available.
• Five registers that can store configuration and status information such as valid power-supply voltages and whether the card has completed its power-up procedure.
• An interface that supports communicating via the MultiMediaCard bus and SPI.
• A controller that executes MultiMediaCard commands.
There are three classes of MultiMediaCards. The Read/Write (RW) class encompasses cards that can read and write to storage media, typically flash memory. Read-only Memory (ROM) cards support reading but not writing to the storage media. I/O cards perform additional functions beyond data storage.
Figure 1-6: From left to right: MultiMediaCard, RS-MultiMediaCard, MMCplus, MMCmobile, and MMCmicro.
The MultiMediaCard specifications are a product of the MultiMediaCard Association (MMCA) (www.mmca.org). The MMCA board consists of over a dozen semiconductor and technology companies. The organization is dedicated to open, royalty-free standards.
The MultiMediaCard specifications are the ultimate authority on the physical interface and command set. Data sheets for specific MultiMediaCards are another helpful source of information about the interface, protocols, and card-specific information.
Table 1-2 compares the five MultiMediaCard variants. The cards are available in three form factors and with interfaces of 7, 10, and 13 pins (Figure 1-6). The original MultiMediaCard has a 7-pin interface and is about 1.25 x 1 inch in size. The RS-MultiMediaCard is functionally identical and about half the size. The MMCplusTM and MMCmobileTM add 13-pin interfaces in both form factors. The MMCmicroTM has 10 pins and is about half an inch square.
A MultiMediaCard can use either of two synchronous serial interfaces: the MultiMediaCard bus or SPI. Just about any microcontroller can implement
either bus. The MMCplus, MMCmobile, and MMCmicro can also use a
Table 1-2: MultiMediaCards are available in several formats.
4-bit parallel MultiMediaCard bus. The MMCplus and MMCmobile can use an 8-bit parallel MultiMediaCard bus.
An SPI host must have a clock output (SCLK), a data output (DataIn on the card), and a data input (DataOut on the card). The host must also control a unique chip-select output (CS) for each device the host communicates with.
A MultiMediaCard-bus host must have a clock output (CLK), a bidirectional pin for commands (CMD), and a bidirectional pin for data (DAT). The master uses commands to assign addresses and select cards, so the MultiMediaCard bus doesn’t need a chip-select line for each card.
On power-up, a MultiMediaCard must be clocked at 400 kHz or less. When the initialization procedure is complete, the host can increase the clock frequency.
These are advantages to using SPI:
• Many microcontrollers include hardware support for SPI. The hardware support simplifies programming.
• All SPI signals are unidirectional so the host doesn’t need to have bidirectional port pins.
• A variety of chips and modules in addition to MultiMediaCards have SPI interfaces. The options include EEPROMs, analog-to-digital converters, and other I/O functions. A microcontroller can thus use one bus to access multiple components.
• For interfaces that don’t require error checking, an SPI host can instruct a card to ignore error checking. Error checking is mandatory with the MultiMediaCard bus.
These are advantages to using the MultiMediaCard bus:
• The host doesn’t require a chip-select line for each card. Instead, addresses are assigned via firmware.
• The host can broadcast commands to multiple cards.
• The host can perform stream reads and writes, where the data isn’t in defined blocks and the card or host transmits continuously until the host issues a STOP_TRANSMISSION command. SPI hosts can perform block reads and writes only.
• MMCplus, MMCmobile, and MMCmicro cards can use a parallel data bus for faster transfers.
A host selects the MultiMediaCard bus or SPI by controlling the CS pin on the card when sending the GO_IDLE_STATE command to the card. To use SPI, the host brings CS low while sending the command. To use the MultiMediaCard bus, CS remains high. All communications that follow use the selected bus.
The MultiMediaCard specification doesn’t mandate power-consumption limits. A typical MultiMediaCard consumes 50 mA during read operations and 60 mA during write operations. Cards can support a low-power sleep mode when the card isn’t being accessed.