The PDIUSBD12 is a cost and feature optimized USB device. It is normally used in
microcontroller based systems and communicates with the system microcontroller
over the high-speed general purpose parallel interface. It also supports local DMA
transfer.
This modular approach to implementing a USB interface allows the designer to
choose the optimum system microcontroller from the available wide variety. This
flexibility cuts down the development time, risks, and costs by allowing the use of the
existing architecture and minimize firmware investments. This results in the fastest
way to develop the most cost effective USB peripheral solution.
2.Features
The PDIUSBD12 fully conforms to the
to be compliant with most device class specifications: Imaging Class, Mass Storage
Devices, Communication Devices, Printing Devices, and Human Interface Devices.
As such, the PDIUSBD12 is ideally suited for many peripherals like Printer, Scanner,
External Mass Storage (Zip Drive), Digital Still Camera, etc. It offers an immediate
cost reduction for applications that currently use SCSI implementations.
The PDIUSBD12 low suspend power consumption along with the LazyClock output
allows for easy implementation of equipment that is compliant to the ACPI™,
OnNOW™, and USB power management requirements. The low operating power
allows the implementation of bus powered peripherals.
In addition, it also incorporates features like SoftConnect™, GoodLink™,
programmable clock output, low frequency crystal oscillator, and integration of
termination resistors. All of these features contribute to significant cost savings in the
system implementation and at the same time ease the implementation of advanced
USB functionality into the peripherals.
■ Complies with the
■ High performance USB interface device with integrated SIE, FIFO memory,
transceiver and voltage regulator
■ Compliant with most Device Class specifications
■ High-speed (2 Mbytes/s) parallel interface to any external microcontroller or
microprocessor
■ Fully autonomous DMA operation
■ Integrated 320 bytes of multi-configuration FIFO memory
■ Double buffering scheme for main endpoint increases throughput and eases
real-time data transfer
Universal Serial Bus specification Rev. 1.1
USB specification Rev. 1.1
. It is also designed
Philips Semiconductors
■ Data transfer rates: 1 Mbytes/s achievable in Bulk mode, 1 Mbits/s achievable in
■ Bus-powered capability with very good EMI performance
■ Controllable LazyClock output during suspend
■ Software controllable connection to the USB bus (SoftConnect™)
■ Good USB connection indicator that blinks with traffic (GoodLink™)
■ Programmable clock frequency output
■ Complies with the ACPI, OnNOW and USB power management requirements
■ Internal Power-on reset and low-voltage reset circuit
■ Available in SO28 and TSSOP28 pin packages
■ Full industrial grade operation from −40 to +85 °C
■ Higher than 8 kV in-circuit ESD protection lowers cost of extra components
■ Full-scan design with high fault coverage (>99%) ensures high quality
■ Operation with dual voltages:
■ Multiple interrupt modes to facilitate both bulk and isochronous transfers.
PDIUSBD12
USB interface device with parallel bus
Isochronous mode
3.3 ±0.3 V or extended 5 V supply range of 4.0 to 5.5 V
DATA <0>1IO2Bit 0 of bidirectional data. Slew-rate controlled.
DATA <1>2IO2Bit 1 of bidirectional data. Slew-rate controlled.
DATA <2>3IO2Bit 2 of bidirectional data. Slew-rate controlled.
DATA <3>4IO2Bit 3 of bidirectional data. Slew-rate controlled.
GND5PGround.
DATA <4>6IO2Bit 4 of bidirectional data. Slew-rate controlled.
DATA <5>7IO2Bit 5 of bidirectional data. Slew-rate controlled.
DATA <6>8IO2Bit 6 of bidirectional data. Slew-rate controlled.
DATA <7>9IO2Bit 7 of bidirectional data. Slew-rate controlled.
ALE10IAddress Latch Enable. The falling edge is used to close the
CS_N11IChip Select (Active LOW).
SUSPEND 12I,OD4Device is in Suspend state.
CLKOUT13O2Programmable Output Clock (slew-rate controlled).
INT_N14OD4Interrupt (Active LOW).
RD_N15IRead Strobe (Active LOW).
WR_N16IWrite Strobe (Active LOW).
DMREQ17O4DMA Request.
DMACK_N 18IDMA Acknowledge (Active LOW).
EOT_N19IEnd ofDMA Transfer(Active LOW). Double up as V
RESET_N 20IReset (Active LOW and asynchronous). Built-in Power-onreset
GL_N21OD8GoodLink LED indicator (Active LOW)
XTAL122ICrystal Connection 1 (6 MHz).
XTAL223OCrystal Connection 2 (6 MHz). If external clock signal, instead
V
CC
D−25AUSB D− data line.
D+26AUSB D+ data line.
USB interface device with parallel bus
[1]
Description
latch of the address information in a multiplexed address/ data
bus. Permanently tied LOW for separate address/ data bus
configuration.
EOT_N is only valid when asserted together with DMACK_N
and either RD_N or WR_N.
circuit present on chip, so pin can be tied HIGH to V
of crystal, is connected to XTAL1, then XTAL2 should be
floated.
24PVoltage supply (4.0 − 5.5 V).
To operate the IC at 3.3 V, supply 3.3 V to both V
pins.
The integrated transceiver interfaces directly to the USB cables through termination
resistors.
6.2 Voltage regulator
A 3.3 V regulator is integrated on-chip to supply the analog transceiver. This voltage
is also provided as an output to connect to the external 1.5 kΩ pull-up resistor.
Alternatively, the PDIUSBD12 provides SoftConnect technology with an integrated
1.5 kΩ pull-up resistor.
6.3 PLL
A 6 MHz to 48 MHz clock multiplier PLL (Phase-Locked Loop) is integrated on-chip.
This allows for the use of a low-cost 6 MHz crystal. EMI is also minimized due to the
lower frequency crystal. No external components are needed for the operation of the
PLL.
PDIUSBD12
USB interface device with parallel bus
6.4 Bit clock recovery
The bit clock recovery circuit recovers the clock from the incoming USB data stream
using 4× oversampling principle. It is able to track jitter and frequency drift specified
by the USB specification.
6.5 Philips Serial Interface Engine (PSIE)
The Philips SIE implements the full USB protocol layer. It is completely hardwired for
speed and needs no firmware intervention. The functions of this block include:
synchronization pattern recognition, parallel/serial conversion, bit stuffing/de-stuffing,
CRC checking/generation, PID verification/generation, address recognition, and
handshake evaluation/generation.
6.6 SoftConnect
The connection to the USB is accomplished by bringing D+ (for high-speed USB
device)HIGH through a 1.5 kΩ pull-up resistor. In the PDIUSBD12, the 1.5 kΩ pull-up
resistor is integrated on-chip and is not connected to VCC by default. The connection
is established through a command sent by the external/system microcontroller. This
allows the system microcontroller to complete its initialization sequence before
deciding to establish connection to the USB. Re-initialization of the USB bus
connection can also be performed without requiring to pull out the cable.
The PDIUSBD12 will check for USB V
established. V
description” for details. Sharing of V
accomplished by using V
open-drain output of the DMA controller pin.
sensing is provided through pin EOT_N. See Section 3.2 “Pin
It should be noted that the tolerance of the internal resistors is higher (25%) than that
specified by the USB specification (5%). However, the overall VSE voltage
specification for the connection can still be met with good margin. The decision to
make sure of this feature lies with the users.
6.7 GoodLink
Good USB connection indication is provided through GoodLink technology. During
enumeration, the LED indicator will blink ON momentarily corresponding to the
enumeration traffic. When the PDIUSBD12 is successfully enumerated and
configured, the LED indicator will be permanently ON. Subsequent successful (with
acknowledgement) transfer to and from the PDIUSBD12 will blink OFF the LED.
During suspend, the LED will be OFF.
This feature provides a user-friendly indicator on the status of the USB device, the
connected hub and the USB traffic. It is a useful field diagnostics tool to isolate faulty
equipment. This feature helps lower field support and hotline costs.
6.8 Memory Management Unit (MMU) and Integrated RAM
PDIUSBD12
USB interface device with parallel bus
The MMU and the integrated RAM buffer the difference in speed between USB,
running in bursts of 12 Mbits/s and the parallel interface to the microcontroller. This
allows the microcontroller to read and write USB packets at its own speed.
6.9 Parallel and DMA Interface
A generic parallel interface is defined for ease-of-use, speed, and allows direct
interfacing to major microcontrollers. To a microcontroller, the PDIUSBD12 appears
as a memory device with 8-bit data bus and 1 address bit (occupying 2 locations).
The PDIUSBD12 supports both multiplexed and non-multiplexed address and data
bus. The PDIUSBD12 also supports DMA (Direct Memory Access) transfer which
allows the main endpoint (endpoint 2) to directly transfer to and from the local shared
memory. Both single-cycle and burst mode DMA transfers are supported.
6.10 Example of parallel interface to an 80C51 microcontroller
In the example shown in Figure 3, the ALE pin is permanently tied LOW to signify a
separate address and data bus configuration. The A0 pin of the PDIUSBD12
connects to any of the 80C51 I/O ports. This port controls the command or data
phase to the PDIUSBD12. The multiplexed address and data bus of the 80C51 can
now be connected directly to the data bus of the PDIUSBD12. The address phase will
be ignored by the PDIUSBD12. The clock input signal of the 80C51 (pin XTAL1) can
be provided by output CLKOUT of the PDIUSBD12.
Fig 3. Example of a parallel interface to an 80C51 microcontroller.
]
WR_N
RD_N
CLKOUT
CS_N
ALE
INTO/P3.2
ANY I/O PORT (e.g. P3.3)
P [0.7:0.0]/AD [7:0
WR/P3.6
RD/P3.7
XTAL1
80C51
]
SV00870
Direct Memory Address (DMA) allows an efficient transfer of a block of data between
the host and local shared memory.Using a DMA controller, data transfer between the
PDIUSBD12’s main endpoint (endpoint 2) and local shared memory can happen
autonomously without local CPU intervention.
Preceding any DMA transfer, the local CPU receives from the host the necessary
setup information and programs the DMA controller accordingly. Typically, the DMA
controller is set up for demand transfer mode and the byte count register and the
address counter are programmed with the right values. In this mode, transfers occur
only when the PDIUSBD12 requests them and are terminated when the byte count
register reaches zero. After the DMA controller has been programmed, the DMA
enable bit of the PDIUSBD12 is set by the local CPU to initiate the transfer.
The PDIUSBD12 can be programmed for single-cycle DMA or burst mode DMA. In
single-cycle DMA, the DMREQ pin is deactivated for every single acknowledgement
by the DMACK_N before being re-asserted. In burst mode DMA, the DMREQ pin is
kept active for the number of bursts programmed in the device before going inactive.
This process continues until the PDIUSBD12 receives a DMA termination notice
through pin EOT_N. This will generate an interrupt to notify the local CPU that DMA
operation is completed.
For DMA read operation, the DMREQ pin will only be activated whenever the buffer is
full, signalling that the host has successfully transferred a packet to the PDIUSBD12.
With the double buffering scheme, the host can start filling up the second buffer while
the first buffer is being read out. This parallel processing increases the effective
throughput. When the host does not fill up the buffer completely (less than 64 bytes or
128 bytes for single direction ISO configuration), the DMREQ pin will be deactivated
at the last byte of the buffer regardless of the current DMA burst count. It will be
re-asserted on the next packet with a refreshed DMA burst count.
Similarly, for DMA write operations, the DMREQ pin remains active whenever the
buffer is not full. When the buffer is filled up, the packet is sent over to the host on the
next IN token and DMREQ will be reactivated if the transfer was successful. Also, the
double buffering scheme here will improve throughput. For non-isochronous transfer
(bulk and interrupt), the buffer needs to be completely filled up by the DMA write
operation before the data is sent to the host. The only exception is at the end of DMA
transfer, when the reception of pin EOT_N will stop DMA write operation and the
buffer content will be sent to the host on the next IN token.
For isochronous transfers, the local CPU and DMA controller have to guarantee that
they are able to sink or source the maximum packet size in one USB frame (1 ms).
The assertion of pin DMACK_N automatically selects the main endpoint (endpoint 2),
regardless of the current selected endpoint. The DMA operation of the PDIUSBD12
can be interleaved with normal I/O access to other endpoints.
DMA operation can be terminated by resetting the DMA enable register bit or the
assertion of EOT_N together with DMACK_N and either RD_N or WR_N.
The PDIUSBD12 supports DMA transfer in single address mode and it can also work
in dual address mode of the DMA controller. In the single address mode, DMA
transfer is done via the DREQ, DMACK_N, EOT_N, WR_N and RD_N control lines.
In the dual address mode, pins DMREQ, DMACK_N and EOT_N are not used;
instead CS_N, WR_N and RD_N control signals are used. The I/O mode Transfer
Protocol of PDIUSBD12 needs to be followed. The source of the DMAC is accessed
during the read cycle and the destination during the write cycle. Transfer needs to be
done in two separate bus cycles, storing the data temporarily in the DMAC.
PDIUSBD12
USB interface device with parallel bus
8.Endpoint description
The PDIUSBD12 endpoints are sufficiently generic to be used by various device
classes ranging from Imaging, Printer, Mass Storage and Communication device
classes. The PDIUSBD12 endpoints can be configured for 4 operating modes
depending on the Set mode command. The 4 modes are:
Mode 0Non-isochronous transfer (Non-ISO mode)
Mode 1Isochronous output only transfer (ISO-OUT mode)
Mode 2Isochronous input only transfer (ISO-IN mode)
Mode 3Isochronous input and output transfer (ISO-I/O mode).
[1] IN: input for the USB host; OUT: output from the USB host.
[2] Generic endpoints can be used either as Bulk or Interrupt endpoint.
[3] The main endpoint (endpoint number 2) is double-bufferedto ease synchronization with the real-time
applications and to increase throughput. This endpoint supports DMA access.
[4] Denotes double buffering. The size shown is for a single buffer.
The main endpoint (endpoint number 2) is the primary endpoint for sinking or
sourcing relatively large amounts of data. It implements the following features to ease
this task:
• Double buffering. This allows parallel operation between USB access and local
CPU access thus increasing throughput. Buffer switching is handled automatically.
This results in transparent buffer operation.
• DMA (Direct Memory Access) operation. This can be interleaved with normal I/O
operation to other endpoints.
• Automatic pointer handling during DMA operation. No local CPU intervention is
necessary when ‘crossing’ the buffer boundary.
• Configurableendpoint for either isochronous transfer or non-isochronous (bulk and
interrupt) transfer.
10. Command summary
PDIUSBD12
USB interface device with parallel bus
Table 4:Command summary
NameDestinationCode (Hex) Transaction
Initialization commands
Set Address/EnableDeviceD0Write 1 byte
Set Endpoint EnableDeviceD8Write 1 byte
Set modeDeviceF3Write 2 bytes
Set DMADeviceFBWrite/Read 1 byte
Send ResumeF6None
Read Current Frame NumberF5Read 1 or 2 bytes
11. Command description
11.1 Command procedure
There are three basic types of commands: Initialization, Data Flow and General
commands. Respectively, these are used to initialize the function; for data flow
between the function and the host; and some general commands.
…continued
Control IN41Write 1 byte
Endpoint 1 OUT42Write 1 byte
Endpoint 1 IN43Write 1 byte
Endpoint 2 OUT44Write 1 byte
Endpoint 2 IN45Write 1 byte
11.2 Initialization commands
Initialization commands are used during the enumeration process of the USB
network. These commands are used to enable the function endpoints. They are also
used to set the USB assigned address.
11.2.1 Set Address/Enable
Code (Hex) — D0
Transaction — write 1 byte
This command is used to set the USB assigned address and enable the function.
7654320100
ADDRESS: The value written becomes the address.
ENABLE: A ‘1’ enables this function.
Fig 4. Set Address/Enable command: bit allocation.