Deutscher Originaltext
| Keywords:
USB, LPT, parallel, parallel port, printer port, converter, adaptor;
programmer, ATmega, ISP, FPGA, CPLD, JTAG, direct port access emulation, IEEE 1284, IEEE1284
|
Converter From USB To Parallel 
Contrary to all other USB→Parallel adapters which can connect to printers only,
this makes connection to most hardware - without adapting the software!
A parallel port will be
virtualized
by the accompanying driver.
The entire circuitry fits into a usual D-Sub shell housing.
A reverse device called LPTzUSB for connecting a USB printer
to a legacy parallel port is available since 2006.
This USB2LPT is not suitable for capturing parallel printer data.
For this purpose, LptCap exists.
For ordering devices, please email me.
Operational areas
Typical devices are:
- Programming devices (AVR, JTAG…)
- Data logger, data acquisition
- slow controls, like for garden, model railway…
- Synchronous bus connections, like I²C, SPI…
- Laboratory automation, simple robots
Certain equipment categories are excluded from correct emulation:
- Time critical equipment,
like direct stepper motor controls (above 100 Hz or so)
Due to free programmability of the microcontroller used
you may run dedicated stepper motor control software on its 8051 core
and so greatly reduce the impact to the overall PC performance.
Access to source code of the stepper motor control software is required.
- Things with »intentionally« hard-coded (non-hookable)
drivers, such as Dongles (= software protection plugs)
For most software there is a USB dongle available too.
The software accessing the parallel hardware must be run under Windows!
A DOS program may run in a DOS box, window or full-screen.
16-bit Windows programs are supported too.
A Pentium class processor is required. 486 is too old.
Restrictions, Performance
Interception of port accesses instructions take place in the driver in privileged ring0 mode
using hand-optimized assembly code, so this is as fast as possible.
But wasted time for the I/O instruction interception itself is small in opposite to
that — with each IN instruction — a USB frame must be awaited, at least 125 µs.
This may lead to 100x lengthening of time!
I will hope that your software is not so much
input-intensive. While processing time is lengthened, the processor yields
to other running processes, so the processing load is kept low.
There are two known options to shorten awaiting of IN instructions:
- Modifying the software and optimizing its data flow enables concatenating multiple IN instructions into one USB packet.
But that's exactly what should be avoided.
- A replacement host controller driver
which can insert outstanding BULK transfers into the current (not the next) USB microframe.
This is very hard to program, if even possible in a non-realtime OS, I cannot afford this solution.
However, at least one company told me that they wrote such a driver but for DOS. But didn't gave me source code:-(
In contrast to “competitors” I don't want to make false hope!
OUT instructions do not lead to considerable lengthening of time due to auto-concatenating write-back feature of driver software.
It is stupid to use this converter only for a printer!
All other converters do this job correct! They are inexpensive too.
However, this converter contains a printer-compatible USB interface,
therefore, printing is possible without loss of performance,
see USB2LPT as multifunction device.
Programs that come with her own kernel driver will work too.
This ist due to the “brute force” of a debug register trap.
Interferences with debuggers may occur.
For program developers, this converter is relatively uninteresting.
Should I use this?
There are some options to get a parallel port if you need one.
Read this list of available adapters and their advantages / disadvantages:
- PCMCIA:
- + True parallel port with ECP/EPP and expected speed
- + Base address same as built-in (378h, 278h) due to ISA roots
- + No driver necessary
- – Only available on very old or specialized laptops and notebooks
- ExpressCard (PCIe based):
- + True parallel port with ECP/EPP and expected speed
- – Base address offset to >1000h (your software must cope with this, or you need a patch or an address-shift driver)
But there are exceptions!
- + No driver necessary
- + Available on current laptops, notebooks
- – Not available on subnotebooks and netbooks
- – Likelihood of confusion with USB based ExpressCards, see below
- ExpressCard (USB based):
- → Electrically same as USB→ParallelPrinter adapter! See below
- USB→ParallelPrinter adapter:
- + Driverless PnP support for parallel printers, emulates a USB printer
- + USB available everywhere
- – Not a true parallel port, doesn't work with almost all programs,
including scanners, relay cards, data acquisition etc.,
except my programs especially prepared for such adapters, e.g.
DiscoLitez WinAmp plugin,
AD9834 DDS generator interface
- – Even when resellers claim uniqueness, these are always the same (they lying)
- PCI or PCIe cards (for desktop computers):
- + True parallel port with ECP/EPP and expected speed
- – Base address offset to >1000h (your software must cope with this, or you need a patch or an address-shift driver)
- + No driver necessary
- + Cheap and easy to handle
- This USB2LPT:
- + Emulated true parallel port with ECP/EPP
- – Reduced speed due to emulation (expect 10..100 times slower)
- + Base address same as built-in (378h, 278h)
- – Doesn't work with programs that expect a true PnP driver stack (scanners, ZIP drives) and software that disables port access redirection (dongles)
- + Additional USB->ParallelPrinter adapter built-in (High-Speed only)
- + USB available everywhere
- – Driver necessary
- – Driver unstable, tricky, not certified, and currently
non-functional for Win64, currently no driver for Linux
- + open-source, multi-language
Current versions
There are older revisions,
maybe easier to understand or to clone.
Moreover a cloning suggestion with 100 % through-hole components.
All these revisions are supported with current firmware and driver software.
 Low-Speed (cloning instructions)
| USB2LPT Release 1.6
- 2008—2012, Quantity: 750 PCBs
- Microcontroller: Atmel ATmega8-16TQ — AVR core at 12.5 MHz — USB Low Speed — True 5 V design
- No Crystal required. Thanks to continued work of
Objective Development Crystal is optional, typical 12 MHz, but also 15 or 16 MHz.
- Integrated bootloader for firmware update via USB (squeezed into 2 KByte of Flash ROM)
- Two USB interfaces (i.e. multifunction device) for raw access and driverless USB HID operation
- Plug housing, yellow activity LED, USB-MiniB receptacle, 25 pin SubD receptacle
- PCB population alternative available for 3.3 V operation of ATmega controller using a dual diode
- Industrial PCB (two-sided, 150 µm), very easy to populate, eight components at all (4x through-hole, 4x SMD)
- Hardware and firmware design conforms to USB idle-mode power consumption limit (≤ 500 µA)
- Cloning recommended – useful where low-speed is sufficient
- Useful for relay cards, light or LED control, LC displays, slow-moving stepper motors,
amateur radio control like for SDR-1000,
I²C bus control, garden / brewery control and supervising
The firmware from december 2010 to february 2012 is not compatible to Windows Vista and Windows 7 (32 and 64 bit) – please update!
|
 High-Speed (cloning instructions with video)
| USB2LPT Release 1.7
- 2008—2012, Quantity: 850 PCBs
- Microcontroller: Cypress CY7C68013A-56LFXC (FX2LP) — 8051 core at 24 MHz — USB High Speed
- Integrated bootloader code for firmware update via USB, compatible to the
vend_ax code by Cypress
- Three USB interfaces (i.e. multifunction device) for raw access, USB printer emulation, and driverless USB HID operation
- Industrial PCB (two-sided, 150 µm), reflow soldering
- Plug housing, blue High-Speed LED, USB-MiniB receptacle, 25 pin SubD receptacle
- 3.3 V design with disable-able pull-up to 5 V on every port pin
- Three extra lines for using as 20-way I/O device
- Possibility for downloading volatile firmware extension code to RAM
for problem-specific tasks using GPIF and true 480 MBit/s
- New very-low-power low-voltage-drop regulator conforms to USB idle-mode power consumption limit (≤ 500 µA)
- Professional clones recommended
- Useful for programming devices, FPGA bitstream download, graphical LCD,
medium-moving stepper motors (maybe 1000 steps per second)
|
You may order devices by mailing to the address below.
Software
That download you need for running the device
on your host PC:
Driver for Windows 98/Me/2k/XP/Vista/7
(1.6M, Thursday, 16-May-2013 01:57:30 CEST)
These drivers are not so much plug'n'play.
Up to three LPT port address rages are automatically captured.
Up to 9 devices may be connected due to naming scheme.
The driver and software is available in
14 languages.
Do not try this driver with any other hardware, this will simply not work and may confuse your operating system later!
The installer creates four extra pages for “Properties” in Device Manager.
Moreover, this .zip archive contains all source files for the driver,
the property sheet pages (14 languages), the help file (3 languages),
the microcontroller firmware for all USB2LPT revisions, and the utilities for handling the firmware,
all in its latest version.
Note: For Low-Speed USB2LPT 1.5 und 1.6 with Vista/7 the driver
uses the second “Alternate Setting” of the
USB2LPT 1.5 and 1.6 firmware that uses INTERRUPT instead of BULK pipes.
As a real bad consequence, emulation speed drops by factor 8.
This problem is on the TODO list.
If you don't got an installation manual:
- a Pamphlet.doc as WinWord2000 file
.
As all images are linked (not embedded), you must unzip the entire archive and then open the .DOC file.
- Maybe you need a tool for de-activating Microsoft's Driver Signature Enforcement.
For this, there are some third-party programs, for example
this one.
- That download you may need when you make your own USB2LPT:
- This package
contains english-message utilities
(source files and executables) for USB2LPT production.
To be integrated in two-language utilities, because I don't want to maintain doubled source code …
- It's planned to make the video downloadable, because all is open-source, even the YouTube video files.
For now, ask me if you want the files.
Usage
Have a look to Device Manager!
In the “Connections (COM & LPT)” tree,
you will find a new parallel port.
Its property dialog has four extra sheets:
- Emulation: Here you can set up properties like the
port address emulated, the usage of debug registers, etc.
- Statistics: Here you can inspect how USB2LPT is working,
and maybe shooting some trouble
- Monitor: Here you can inspect and modify port pin values
- Title unknown: Here you can see the real LPT number assignment
There is an API for programmers too.
It is simply DeviceIoControl based.
Open the device with CreateFile and file name
"\\.\LPT1"
(or LPT2 if you already have one), and transfer IN/OUT data with
(see USB2LPT.A51, label "upv") via a single call of
DeviceIoControl.
Here is the full API documentation.
Via IOCTL code IOCTL_VLPT_AnchorDownload, you can inject
additional firmware to speed-up your applications.
Therefore, USB2LPT is a
Pocket Development Kit for EZUSB AN2131/CY7C68013 too.
These Property Pages are also available in the languages
German, French, Italian, Spanish, Simplified Chinese,
Japanese, Czech, Polish, Turkish, Russian, Hungarian, and Bazilian Portuguese.
Frequently Asked Questions (FAQ)
You can read the FAQ by following this link.
List of clones
- lzwest (China)
(they removed their clone shortly)
Henrik Haftmann,
– HTML mail,
Full-quoted mail,
or mail with more than 10 lines of footer will be rejected!
Chemnitz, Wednesday, 10-Apr-2013 18:32:01 CEST