On Apr 24, 2012, at 12:03 PM, Mouse wrote:
> How does
it use CTS as the clock line? Can that be repurposed as an
> output in the Dreamcast hardware?
I was wondering about that myself.
AFAIK, this serial port is bitbanged...but I
don't have that much
info. If you wish, I have the schematics of the mainboard :)
The serial port isn't _necessarily_ bitbanged, but I think there's a
bit you can set in one of the control registers that makes it so.
(Otherwise, it's a relatively nice UARTish interface.)
However, that's orthogonal to making CTS into an output. I don't
recall any such setting in the SH's serial interface registers; perhaps
it's DC-specific circuitry between the SH's pin and the serial port
connector? Or perhaps the card drives the clock? I've fetched copies
of the SD spec (which isn't where the page specified said it is - it
seems to be at
https://www.sdcard.org/downloads/pls/simplified_specs/)
and hope to find the time soon to read them over.
The short answer is that the easy way to interface with SD/MMC cards
is as an SPI device. This schematic uses Tx as MOSI, Rx as MISO,
RTS as #CS and CTS as SCK. The card most certainly doesn't drive
the clock; it behaves as an SPI slave.
- Dave