
194
AT85C51SND3Bx
7632A–MP3–03/06
Data Line Controller As shown in Figure 89, the data line controller is based on a 16-Byte FIFO used both by
the data transmitter channel and by the data receiver channel.
Data transfer can be handled in transmission or received by the Data Flow Controller
(see
Section “Data Flow Controller”, page 78) or by the C51 using MMDAT register.
Figure 89. Data Line Controller Block Diagram
Bus Width Control The data line controller supports the SD card and the new MMC 4.0 4-bit bus mode
allowing higher transfer rate. The 4-bit bus width is controlled by software by setting the
DBSIZE1:0 bits in MMCON2 register according to
Table 219. In case of 1-bit bus width
(card default), SDDAT0 is used as SDDAT line and SDDAT3:1 lines are released as I/O
port.
Table 219. Data Bus Size
FIFO Implementation The 16-Byte FIFO is managed using 1 pointer and four flags indicating the status ready
of whole or half FIFO.
Pointer value is not accessible by software but can be reset at any time by setting and
clearing DPTRR bit in MMCON0 register. Resetting the pointer is equivalent to abort the
writing or reading of data.
FIFO flags indicate when FIFO is ready to be read in receive mode or to be written in
transmit mode. WFRI is set when 16 bytes are available in writing or reading. HFRI is
set when 8 bytes are available. These flags are cleared when read. These flags may
generate an interrupt request as detailed in
Section “Interrupt”. WFRS and HFRS give
the status of the FIFO. They are set when respectively 16 bytes or 8 bytes are ready to
be read or written depending on the receive or transmit mode.
DATFS
MMSTA.3
CRC16S
MMSTA.4
HFRS
MMSTA.0
HFRI
MMINT.2
DFMT
MMCON0.2
MBLOCK
MMCON0.3
DATDIR
MMCON1.3
Data Converter
// -> 1-bit/4-bit
BLEN11:0
MMCON1.7:4
DATEN
MMCON1.2
DATA Line
Finished State Machine
Data Converter
1-bit/4-bit -> //
DPTRR
MMCON0.6
TX/RX Ptr
WFRI
MMINT.3
CRC16 and Format
Checker
WFRS
MMSTA.1
EOFI
MMINT.4
CBUSY
MMSTA.5
SDDAT3
DBSIZE1:0
MMCON2.4:3
CRC16
Generator
MMBLP7:0
EOBI
MMINT.1
FIFO
16-Byte
MMDAT
DBSIZE1:0 Bus Size
0 1-bit SDDAT0 data bus.
1 4-bit SDDAT3:0 data bus.
2-3 Reserved for future use, do not program these values.
Comentarios a estos manuales