Philips Semiconductors - Asia Product Innovation Centre
Visithttp://www.flexiusb.com
USER’S MANUAL D12 SMART Page 3 of 19
D12 SMART KIT
1.1 Introduction
The Philips USB D12 Smart Kit is a comprehensive kit that offers you the full potential of Philips
PDIUSBD12 (or D12), in addition to the know-how on how to convert your existing legacy into
USB devices. This kit includes the D12 smart boards, test application program (or applet), USB
driver, and some sample firmware source codes.
1.2 Description
D12 is a high performance USB interface device that offers DMA transfer capability as well as
features for a cost-effective microcontroller-based system. This kit allows you to thoroughly
evaluate the capabilities and features of the device, and provide quick grounding on how to
convert your existing non-USB devices such as the digital still camera, mass storage device, and
scanner into USB devices.
1.3 Features
The simple design of this kit aims to highlight the features of a USB device. It has the D12 and
the 89C738/89C52 microcontroller interfaced to D12. Philips PDIUSBD12 implements all the
functions of the USB device, and has an 8-bit parallel data bus for microcontroller interface. The
MCU is a member of the 8051-family. The firmware implements all the USB enumeration, D12
Interrupt service, power down and resume signaling interfaces. Though the D12 has DMA
capability, for simplicity, it is not incorporated in this board. A similar evaluation board, the USBEPP, has all the DMA features built into it.
With the accompanying applet, you can operate the kit in three modes: Print, Scan, and Loop
back modes. The purpose for having the print and scan modes is to allow the evaluation board to
emulate either the printer or scanner environment. The Loop back mode is to indicate the integrity
of the data when large data packet is sent and received from the host system.
1.4 Operating Environment
Running the kit only requires a new generation PC (motherboard with USB port) with Microsoft
Windows 98 operating system. The firmware provided with the kit is written in C language (some
Assembly codes for critical timing), and so allows you to port it to any other platforms for
compiling. With this kit, you can develop your USB devices through the firmware and hardware
schematics.
2. SETTING UP THE D12 SMART KIT
2.1 Connection and System Requirement
Connect the board to the host system via the USB upstream connector. Follow the instructions on
the screen to install the device driver, and then install the software provided with the kit. Ensure
that you have the following:
Philips Semiconductors - Asia Product Innovation Centre
Visithttp://www.flexiusb.com
USER’S MANUAL D12 SMART Page 5 of 19
3. INSTALLATION PROCEDURES
3.1 Installing the software
The software includes the firmware, the test application program (or the applet), and the device
drivers. The firmware is programmed in the 89C738/89C52 microcontroller (Flash type). If you
want to change the firmware or use your own firmware, you just need to reprogram the
89C738/89C52 microcontroller.
3.2 Installing the Applet
1. Insert the diskette into your disk drive.
2. Copy the file, D12TEST.EXE, contained in the diskette to a directory of your choice -
C:\D12 Smart.
3. Create a shortcut by dragging the file D12TEST.EXE from the directory to the desktop. An
icon similar to Figure 3.2.1 appears.
3.2.1: The icon on the desktop.
3.3 Installing the device drivers
When connecting the USB cable to your host system for the first time, a dialog box will appear
and prompt you to install the device drivers. Navigate through it and load the device drivers
provided in the floppy that comes along with the kit. To install the device drivers:
1.When you connect the USB cable to your host system for the first time, a dialog box
similar to Figure 3.3.1 appears. Click the Next button.
Philips Semiconductors - Asia Product Innovation Centre
Visithttp://www.flexiusb.com
USER’S MANUAL D12 SMART Page 7 of 19
5.When a dialog box similar to Figure 3.3.5 appears, click the Finish button to end the
installation.
Figure 3.3.5
3.4 Running the applet
The applet supports three test modes: Print, Scan, and Loop back modes. The print and scan
modes allow the evaluation board to emulate either the printer or scanner environment. The Loop
back mode shows the integrity of the data when a large data packet is sent and received by the
host system.
To run the applet, click the D12Test.exe icon on your desktop and an interface similar to Figure
Philips Semiconductors - Asia Product Innovation Centre
Visithttp://www.flexiusb.com
USER’S MANUAL D12 SMART Page 8 of 19
This pipe is defined as Interrupt pipe. The D12-Smart
evaluation board sends specific data packet to the host system
This pipe is defined as Bulk Out pipe. Data packet received
from the host system is interpreted as LED control, and the
These pipes are defined as Bulk In/Out endpoints. The Applet
and the evaluation board support 3 test modes: loop back,
4. DESCRIPTION OF D12 ENDPOINTS
4.1 D12 Endpoints Configuration
Table 4.1.1 describes the PDIUSBD12 Endpoints configuration Mode 0, i.e., it is Non-Iso mode.
The reset 3 mode (Isochronous mode ) can be found on the D12 specification.
4.1.1 Configuration of D12 Endpoints Table
Endpoint
Number
00
12
24
Endpoint
Index
1
3
5
Transfer
Type
Control Out
Control In
Generic Out
Generic In
Generic(Main) Out
Generic(Main) In
Endpoint
DirectionMax Packet Size(Bytes)
Type
DefaultOut
In
Generic
Generic
Generic
Generic
Out
In
Out
In
16
16
16
16
64(another 64 for double buffer)
64(another 64 for double buffer)
4.2 Operations of D12 Endpoints
The table below describes in detail the operations of the endpoints.
4.2.1 Operations of D12 Endpoints Table
Endpoint
Number
Endpoint
Type
Operations
1Generic In
when the test key is pressed or released.
1Generic
Out
firmware will light up the corresponding LED.
2Main In
Main Out
print, and scan modes.
The Generic In and Generic Out endpoints have a maximal packet size of 16 bytes. This
capacity makes them suitable for devices that require small size data transfer such as the
keyboard, mouse and logic controls. The main endpoints have a maximal packet size of 64
bytes for Bulk/Isochronous mode or 128 bytes for Isochronous mode with double buffering
capacity. Hence, they are suitable for high data rate and large size data transfer.
Three test modes are supported at the main endpoints. They are:
• Scan mode: The evaluation board emulates the scanner environment. This mode is used
to evaluate the maximal Bulk In transfer rate.
• Print mode: The evaluation board emulates the printer environment. This mode is used
to evaluate the maximal Bulk Out transfer rate.
• Loop back mode: The evaluation board receives data packets from the Main Out
endpoint (Endpoint Index 4) and sends them back to the host system from the Main In
endpoint (Endpoint Index 5). This mode helps test the firmware’s ability to control the
Philips Semiconductors - Asia Product Innovation Centre
Visithttp://www.flexiusb.com
USER’S MANUAL D12 SMART Page 9 of 19
data flow and the integrity of data transfers.
Since the firmware is protocol-based, the host system can inform the firmware to set any
possible modes. There is, therefore, no longer any need to manually set the scan test mode
before running the scan test on the firmware.
The “buffer size” of the applet is the size of the data buffer, which the applet transmits to the
USB system drivers for receiving or transmitting. Hence, it is the responsibility of the USB
system drivers to divide them into smaller data packets, e.g., 64 bytes for bulk transfer. The
maximal buffer size is limited by the USB system drivers. The best transfer rate over the USB
can be achieved by optimizing the buffer size.
5. MISCELLANEOUS
• Press-Button S1—Reset or Resume the system
• Press-Button S2—PIPE testing
• Press-Button S3—PIPE testing
• LED D1—USB interface GoodLink indicator. When it is on, it means that the link between
the USB host and the USB device has been set up and the enumeration done. If it is blinking,
it means that data is being transmitted or received
• LED D2—PIPE testing
• LED D3—PIPE testing
• Header pin J5 —Connected to Ground leads
• HCT123 with D12 and MCU firmware support the Power down and RESUME operations,
i.e., when D12 comes out from suspend state, the suspend pin state changes from high to low.
When this happens, the HCT123 monostate generates a positive pulse to reset/wakeup
89C52/89C738.
Philips Semiconductors - Asia Product Innovation Centre
Visithttp://www.flexiusb.com
USER’S MANUAL D12 SMART Page 10 of 19
6. DESCRIPTION OF HEADERS
6.1 Header J1
The J1 test header is for D12’s signals as illustrated in the following table:
Pin No.Signal NameSignal TypeDescription
1
2
D∅
D12A∅
I/O
I
D12 Data ∅
D12 Address A∅
3D1I/OD12 Data 1
4/D12RSTID12 Reset
5D2I/OD12 Data 2
6/D12 EOTID12 End of Transfer
7D3I/OD12 Data 3
8/D12DACKID12 DMA ACK
9D4I/OD12 Data 4
10D12REQOD12 DMA Request
11D5I/OD12 Data 5
12/D12WRID12 Write
13D6I/OD12 Data 6
14/D12RDID12 Read
15D7I/OD12 Data 7
16/D12CSID12 Chip Select
175VPower5 Volts Power
18D12ALEID12 Address Catch
195VPower5 volts Power
20D12SUSPDI/OD12 Suspend
21Not Connected
22/D12INTOD12 Interrupt
23GNDPowerGround
24Not Connected
25GNDPowerGround
26CLK12MOD12 Clock Out
6.2 Header J2
The expansion connector J2 is connected from Pin1 to Pin 40 of the MCU. These connectors
allow the use of MCUs from other makes through a pin converter. It will also allow you to debug
signal lines of MPU.
7GNDPowerGround
8RLED1ORed LED 1
9GNDPowerGround
10P1x4I/OMCU Port 1 bit 4 (Not in use)
11GNDPowerGround
12P1x5I/OMCU Port 1 bit 5 (Not in use)
13GNDPowerGround
14/D12CSID12 Chip Select
15GNDPowerGround
16/D12RSTOD12 Reset
17GNDPowerGround
18MCURSTIMCU Reset
19GNDPowerGround
20S232RXDIReceive Data Line
21GNDPowerGround
22S232TXDOTransmit Data Line
23GNDPowerGround
24/D12INTID12 Interrupt
25GNDPowerGround
26D12 SUSPDI/OD12 Suspend
27GNDPowerGround
28P3x4I/OMCU Port 3 bit 4 (Not in use)
29GNDPowerGround
30P3x5I/OMCU Port 3 bit 5 (Not in use)
31GNDPowerGround
32/D12WRO D12 Write
33GNDPowerGround
34/D12RDOD12 Read
35GNDPowerGround
36MCUXTAL2OCrystal Output
37GNDPowerGround
38MCUXTAL1ICrystal Input
39GNDPowerGround
40VCCPower+5V
Philips Semiconductors - Asia Product Innovation Centre
Visithttp://www.flexiusb.com
USER’S MANUAL D12 SMART Page 12 of 19
6.3 Header J3
Pin No.Signal NameSignal TypeDescription
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
VCCPower
GNDPowerGround
D0I/O
GNDPowerGround
D1I/OData 1
GNDPowerGround
D2I/OData 2
GNDPowerGround
D3I/OData 3
GNDPowerGround
D4I/OData 4
GNDPowerGround
D5I/OData 5
GNDPowerGround
D6I/OData 6
GNDPowerGround
D7I/OData 7
GNDPowerGround
/MCUEAOMCU External Excess
GNDPowerGround
D12ALEOD12 Address Catch Enable
GNDPowerGround
/PSENOProgram Strobe Enable
GNDPowerGround
P2x7I/OMCU Port 2 bit 7 (Not in use)
GNDPowerGround
P2x6I/OMCU Port 2 bit 6 (Not in use)
GNDPower
P2x5I/OMCU Port 2 bit 5 (Not in use)
GNDPowerGround
P2x4I/OMCU Port 2 bit 4 (Not in use)
GNDPowerGround
P2x3I/OMCU Port 2 bit 3 (Not in use)
GNDPowerGround
P2x2I/OMCU Port 2 bit 2 (Not in use)
GNDPowerGround
P2x1I/OMCU Port 2 bit 1 (Not in use)
GNDPowerGround
P2x0I/OMCU Port 2 bit 0 (Not in use)
GNDPowerGround