Usb Setting
Usb Setting
A first USB-interface to control the N2PK-VNA has been designed by Dave Roberts G8KBB.
Unfortunately the use of this interface is limited to VNA4WIN.
Following a hint from Michael OE1MIS, I found USB2LPT from Henrik Haftmann. This design is
able to implement an LPT-port, that looks like a normal port for the software, but physically is
connected via USB.
The original PCB, Henrik designed to fit into a plug housing, needs professional assembling.
Therefore, I slightly redesigned the schematic and PCB for the following targets:
I was not able to run the original N2PK-DOS-software on the Win2K machine.
May be, this can work with the interface using another configuration.
Thanks to all, who contributed to these projects, expecially to Paul (N2PK) and Henrik, who
allowed me to put some the contents of his site to the Yahoo-Groups file area.
For the design of the schematic and PCB, EAGLE has been used.
A free version for non-profit use of this software can be downloaded from www.cadsoft.de .
73 de
Friedhelm
DL9GAZ
bottom view:
Operational areas
Typical devices are:
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.
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
http://www-user.tu-chemnitz.de/~omat/bastelecke/Rund%20um%20den%20PC/USB2LPT/index.html.en (1 von 5) [06.05.2006 09:41:53]
Interception of port accesses takes place in a driver in privileged mode. But wasted time for the
interception itself is small in opposite to that with each IN instruction a USB frame must be
waited for, 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. Solely modifying the software can reduce execution time of IN instructions, but that's
exactly what should be avoided.
In contrast to competitors I don't want to make false hope!
History of USB2LPT
I had built this device in several versions, or revisions. Here are self-make instructions too.
USB2LPT Evaluation system
Evaluation system
The Original
First Revision
Second Revision
?
Third Revision
Software
That download you need for running the device on your host PC:
Usage
Deutscher Originaltext
Keywords: USB, LPT, parallel, parallel port, printer port,
converter, adaptor
USB2LPT overview
Matlab: digitalio('parallel','lpt1');
Henrik Haftmann,
Deutscher Originaltext
Up to USB2LPT Overview
Structure of firmware
The third function (JTAG) is not yet implemented. There is a lack of documentation about data streams used. When
implemented, USB2LPT could be even much faster than a conventional parallel JTAG adapter connected to a legacy
parallel port.
The user must take care that the functions do not interfere! For example, do not try to print over
USB2LPT while you are programming.
When plugging USB2LPT to a Windows host, there will be the following driver structure under the hood:
Structure of drivers
The port-accessing application software will be trapped by usb2lpt.sys by either a Debug Register trap or a trapped
port access function *. The access will be transcoded and put to USBD, who is communicating via USB with
firmware function Direct Input/Output.
The third function is missing there too. A modified .INF file is sufficient for enabling this data path.
READ_PORT_UCHAR()
READ_PORT_USHORT()
READ_PORT_ULONG()
WRITE_PORT_UCHAR()
WRITE_PORT_USHORT()
WRITE_PORT_ULONG()
Deutscher Originaltext
Q. Would it be more convenient to use existing converters and use its built-in
2305 instead?
Prolific PL-
Q. May it's possible to speed up the emulated IN instructions? (Even without changing software?)
A. If you are a great programmer, you may write an on the fly disassembler for the code
following the IN instruction and look where the IN byte (AL register) is spread. After you get
the true IN byte, you patch all locations where the IN byte is spreaded. Unluckily, most IN
instructions are followed by a conditional jump, so you have to predict the condition... forget
ist!
http://www-user.tu-chemnitz.de/~omat/bastelecke/Rund%20um%20den%20PC/USB2LPT/faq.htm.en (2 von 3) [06.05.2006 09:44:00]
On the other hand, it's easy to speed up REP INSB instructions. But these are seldom used in
conjunction with ECP/EPP ports. With a standard parallel port, REP INSB is completely
useless and therefore never used.