Smart Media/USB Interface

From Ninerpedia
Revision as of 11:04, 15 February 2015 by Stephen Shaw (talk | contribs) (new article with very brief summary of Thiery Nouspikel's USB card)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This interface card was designed by Thierry Nouspikel as a build-it-yourself project, and details remain on his website.

The following description has been extracted from Thierry's web site:

This is a 2-in-1 card: it consists of a USB card, and a SmartMedia interface card, sharing their buffers, the CRU interface, and the DSR memory circuitry. It is possible to build only the USB part, or only the Smartmedia part.

Main features:

  • Philips ISP1161 USB 1.1 controller.
  • Supports half-speed and full-speed, but not high-speed.
  • Two downstream ports to control upto 127 devices (with hubs).
  • One upstream port, to communicate with another computer.
  • A connector for SmartMedia cards (digital camera type), either 3.3 volts or 5 volts.
  • One megabyte of SRAM and 8 megabytes of Flash-EEPROM for DSR memory.
  • CRU interface, 24 output bits, 8 input bits.
  • CRU address selectable with DIP switches.
  • Compatible with Myarc's Geneve.
  • DMA capable.

Memory map

>4000-4FFF: Flash-EEPROM 8 megabytes. Mapped as 2048 pages of 4K, switched via the CRU. The Flash-EEPROM maps at >4000-4FFF (although, when CRU bit 1 is '1', the Smartmedia card maps at >4FF0-4FFF)

>5000-5FFF: SRAM 1 megabyte. Mapped as 256 pages of 4K, switched via the CRU.


Smart Media

There are three "ports" to a Smartmedia card: a bidirectional data port, a write-only adress port and a write-only command port. Each of these are 8 bits-wide.

In the USB-SM card, these ports map at 4 distinct addresses in the DSR space. The data port is split in an "input-only" and an "output-only" ports. This is necessary because the TMS9900 microprocessor always performs a read before each write, which would confuse multiple byte operations. All ports are 8-bit wide, so the least significant byte should be ignored. The addresses are:

>4FF0: Read data
>4FF8: Write data
>4FFA: Write address
>4FFC: Write command

USB

In general, a transaction consists in 3 stages, each comprising at least 3 packets (token, data and handshake):

  • A setup stage, where a request is sent (by the host)
  • An (optional) data stage, during which data is transfered. This stage can contain more than 1 data packet.
  • A status stage, in which the device reports the result of the transaction.

You will need to take care of this yourself, by passing three PTDs to the host controller. The good news is that, if more than one data packet is required, the host controller will take care of sending them: you don't need to pass any extra PTD (Philips Transfer Descriptor) for that.