DLP-245PL-G
USB / Microcontroller Module (Lead-Free)
The DLP-245PL-G combines the same lead-free USB interface used in the DLP-USB245M-G
module with a Microchip PIC microcontroller to form a rapid development tool. The
18LF8722 microcontroller is preprogrammed with basic functionality for accessing the
port pins and can be reprogrammed with user hex code via a 5-pin header that is
compatible with Microchip’s MPLAB ICD2 device programmer/debugger (purchased
separately).
DLP-245PL FEATURES
•
•
•
•
Send/receive data over USB to a host computer at up to 2 megabits per second
50 digital I/O lines (16 can be configured as A/D inputs) plus the 8-bit data bus available for
interfacing to user electronics
Microchip 18LF8722 processor with 128K FLASH Program ROM, 3840 bytes RAM,
1024 bytes of data EEPROM and a multi-channel, 10-bit A/D converter
“Token I/O” code preprogrammed into the 18LF8722’s FLASH for basic port pin input/output
capability including access to the A/D, EEPROM, and external digital temperature sensors.
ROM can be erased and reprogrammed with a device programmer (purchased separately).
No in-depth knowledge of USB is required as all USB protocol is handled automatically by the
on-board FT245RL and its support circuitry
Royalty-free device drivers eliminate the need for USB driver development in most cases
•
•
1
•
•
•
•
Required 5V supply can be taken directly from the USB port or supplied by user electronics
USB 1.1 and USB 2.0 compatible
USB VID, PID, serial number, and product description strings stored in on-chip EEPROM
Virtual Com Port (VCP) drivers for:
- Windows 98 and Windows 98 SE
- Windows 2000/ME/XP
- Windows CE**
- MAC OS-8 and OS-9
- MAC OS-X
- Linux 2.40 and greater
D2XX (USB direct drivers + DLL S/W interface)
- Windows 98 and Windows 98 SE
- Windows 2000/ME/XP
•
APPLICATION AREAS
•
•
•
Prototype development
USB ISDN and ADSL modems
USB interface for digital cameras
USB interface for MP3 players
High-speed USB instrumentation
USB smart-card readers
Set Top Box (STB) PC-USB interface
USB hardware modems
USB wireless modems
USB bar code readers
•
•
•
•
•
•
•
GENERAL DESCRIPTION
The DLP-245PL-G provides a cost-effective, microcontroller-based method of interfacing an
electronic peripheral to a host computer via USB.
To send data from the peripheral to the host computer, the microcontroller simply writes the
byte-wide data into the FT245RL when TXE# is low. If the FT245RL’s transmit buffer fills up or is
busy storing the previously written byte, it will take its TXE# high in order to stop further data from
being written until some of the FIFO data has been transferred over USB to the host.
2
When the host sends data to the peripheral over USB, the FT245RL will take RXF# low to let the
microcontroller know that at least one byte of data is available. The microcontroller then reads
the data until RXF# goes high indicating that no more data is available to read.
By using FTDI’s Virtual COM Port drivers, the peripheral looks like a standard COM port to the
application software. Commands to set the baud rate are ignored--the FT245RL always transfers
data at its fastest rate regardless of the application’s baud-rate setting. The latest versions of the
drivers are available for download from DLP Design’s website at
www.dlpdesign.com.
DRIVER SOFTWARE
FTDI's VCP (Virtual COM Port) driver files are provided royalty free on the condition that they are
used only with designs incorporating an FTDI device (i.e. the FT245RL and
DLP-245PL-G). The latest version of the drivers can be downloaded from
dlpdesign.com
or
ftdichip.com.
The VCP driver download file is a combined set of drivers for Windows 98, Windows ME, and
Windows 2000/XP. Unzip the file to a blank floppy disk or folder on your PC. (The drivers can
coexist on the same floppy disk or folder since the INF files determine which set of drivers to load
for each operating system version.) Once loaded, the VCP drivers allow your application
software running on the host PC to communicate with the DLP-245PL-G as though it were
connected to a COM (RS-232) port.
In addition to VCP drivers, FTDI's D2XX direct drivers for Windows offer an alternative solution to
the VCP drivers that allow application software to interface with the DLP-245PL-G using a DLL
instead of a Virtual Com Port. The architecture of the D2XX drivers consists of a Windows WDM
driver that communicates with the FT245RL device via the Windows USB stack and a DLL that
interfaces the application software (written in VC++, C++ Builder, Delphi, VB, etc.) to the WDM
driver. An INF installation file, uninstaller program, and D2XX Programmer’s Guide complete the
package.
The D2XX direct drivers add support for simultaneous access and control of multiple FT245RL
devices. The extended open function (FT_OpenEx) allows the device to be opened either by its
product description or serial number, both of which can be programmed to be unique. The list
devices function (FT-ListDevices) allows the application software to determine which devices are
currently available for use, again by product description or by serial number.
Functions are provided to program the EEPROM (FT_EE_Program) and read the EEPROM
(FT_EE_Read). Unused space in the EEPROM is called the user area (EEUA), and functions
are provided to access the EEUA. FT_EE_UASize gets its size, FT_EE_UAWrite writes data into
it, and FT_EE_UARead is used to read its contents.
Download FTDI Application Notes AN232-03, AN232-05, AN232-06, and AN232-07 for
detailed instructions on how to install and remove the drivers.
3
EEPROM WRITE UTILITY
The DLP-245PL-G has the option to accept manufacturer-specific information that is written into
the on-chip EEPROM. Parameters that can be programmed include the VID and the PID
identifiers, the manufacturer's product string, and a serial number.
MPROG is the latest EEPROM serializer utility from FTDI for the FT245RL device. MPROG is
based on the new D2XX drivers and will work on Windows 98, Windows ME, and Windows
2000/XP platforms. You must install the latest release of the D2XX drivers in order to run this
application.
If you have VCP drivers installed on the PC that will be used to perform the EEPROM write
process, you must uninstall these drivers and install the D2XX drivers prior to running MPROG.
QUICK START GUIDE
This guide requires the use of a Windows 98/2000/XP PC that is equipped with a USB port.
1. Download the DLL version of the device drivers from either
dlpdesign.com
or
ftdichip.com.
Unzip the drivers onto a blank floppy disk or into a folder on the hard drive.
2. The DLP-245PL-G can be configured to receive its operating power from the USB port or
from an external power source. Jumper JP1 allows for this configuration. Select JP1 Pins 1
and 2 if the DLP-245PL-G is to take its power from the USB port on the host computer;
jumper JP1 Pins 2 and 3 if the DLP-245PL-G is to take its power from your external power
source.
3. Jumper JP2 selects the power source for the 18LF8722 microcontroller and the interface pins
on the FT245RL USB chip. Select JP2 Pins 1 and 2 if 5 volts from the USB port is to be used
to power the microcontroller. Select JP2 Pins 2 and 3 if an external supply is to be used to
power the microcontroller.
Note: The board will not operate until a power source has been selected as mentioned in
Steps 2 and 3.
4. Connect the DLP-245PL-G board to the PC via a standard A-B, 6-foot USB cable. This
action initiates the loading of the USB drivers. When prompted, select the folder where the
DLL version of the device drivers was stored in Step 1. Windows will then complete the
installation of the device drivers for the DLP-245PL-G board. The next time the DLP-245PL-
G board is attached, the host PC will immediately load the correct drivers without any
prompting. Reboot the PC if prompted to do so.
The DLP-245PL-G is shipped with default VID, PID, etc. values programmed into the EEPROM.
You only need to run MPROG if you want to change the default values.
At this point, the DLP-245PL-G is ready for use. Note that the DLP-245PL-G will appear
non-responsive if data sent from the host PC is not read from the FT245RL device by the
18LF8722 microcontroller.
If changing drivers from the VCP to the DLL type (or vice versa), you must first uninstall the
currently loaded drivers. This is accomplished by first disconnecting the DLP-245PL-G adapter
from the host computer and then running Add-Remove-Programs (via Control Panel) to remove
the currently loaded drivers.
4
TOKEN I/O
The 18LF8722 microcontroller on the DLP-245PL-G is shipped from the factory preprogrammed
with firmware that provides rudimentary access to the port pins via either the VCP or DLL drivers.
Features include the ability to read and write individual port pins as well as 8-bit port reads and
writes.
The firmware in the DLP-245PL-G also provides access to the 18LF8722’s A/D converter,
EEPROM memory, and communications with digital temperature-sensing devices.
Commands sent to the Token I/O firmware must adhere to a specific communications protocol.
Each command sequence contains the following information:
Byte 0:
Byte 1:
Byte 2…n-1:
Byte n:
Number of bytes in command sequence
Command
Parameter/Data bytes
Checksum
The checksum is computed by exclusive-OR-ing every byte in the string. If the same checksum
is calculated by the 18LF8722 upon receipt of the packet, then a single-byte reply of 0x55 is
returned to the host. In the event of a checksum error, the 18LF8722 will return an error code of
0xAA. For example, setting port PIN_A1 high would require the following string of bytes:
0x03, 0xA6, 0x2D, 0x01, 0x89
Definition of the Bytes:
0x03 – Number of bytes in command (checksum excluded)
0xA6 – Command for set port pin high/low
0x29 – Affected port pin
0x01 – Desired state of port pin
0x8D – Checksum of previous 4 bytes
The port pins equate to hexadecimal numeric constants as defined below:
PORT A:
PIN_A0 0x2C, PIN_A1 0x2D, PIN_A2 0x2E,
PIN_A3 0x2F, PIN_A4 0x30, PIN_A5 0x31
PORT B:
PIN_B0 0x34, PIN_B1 0x35, PIN_B2 0x36, PIN_B3 0x37,
PIN_B4 0x38, PIN_B5 0x39, PIN_B6 0x3A, PIN_B7 0x3B
5