
                                LPT I/O V1.6

                              by John Augustine

  LPT (parallel port) input/output (digital data acquisition, etc.) was
written in Assembly for MS Dos systems, uses little memory, and requires no
"installation".

  This program is NOT for those who know little or nothing about the parallel
port.  Some applications for using LPT will probably require some type of
interface, the simplest of which can be an isolation or load resistor such as
a 10k resistor to allow you to view the patterns on a scope (example).  A
little knowledge about electronics would be very helpful.

  PLEASE NOTE:

  This is NOT a "free" program. See "CONCLUSION" near the end of this document
for details on making a small "donation" and becoming a "donor".

  TIP:

  If you have a second (older) PC, use it with this program to experiment.

  LPT USES:

  There are many possible uses for LPT which I have not thought about at this
time.  LPT allows you to capture (Record) into memory, digital data (TTL level
(0 or +5V) input) via pin 12 (parallel port), normally used for out of paper
detection (printer).  Afterwards, you can view it in binary format (two modes)
or save it to a file as reference, or for "playback" whenever you need to
simulate a digital source.  The digital data can be transmitted ("playback")
via all the data pins (pins 2-9) in the parallel port, in order to simulate
the digital data source.  Note: Only one of those data pins is normally
needed, unless you have a special use which requires more than one line/pin
(up to 8).

  With the built in binary editor, you can create your own digital data with
specific patterns to transmit out of the parallel port, or modify an existing
pattern/s that you captured earlier.

  You can simulate a digital data sequence for testing purposes, etc.
Another simple example for using LPT is to Record the patterns of a remote
control using a simple inexpensive IR receiver which you can buy at Radio
Shack.

  You can use LPT to check your parallel port for defects (example if a
data pin is "stuck" at one level).

  GETTING STARTED:

  Simply type (without quotes) "LPT" and press Enter

  OR

  Type "LPT FILENAME" to load a file (saved data) immediately.

  VIEWING/EDITING DIGITAL DATA:

  You can view (and edit) data in two binary modes.  This allows you to see
the bits sequence (digital data) which starts at the top (left) row (moving to
right).  One mode displays in "1" and "0" format.  If you press the "S"
(switch) key, another format is displayed, which is better suited for seeing
patterns.  To change a bit/s, simply moving the blinking (cursor) to where you
want to start editing.  Press (or hold down) the "1" or "0" key to overwrite
the existing bit/s.  Pressing the "U" or "D" key moves the binary reference
bar/scale up and down so you can pin point bit/s.  Other commands allow you to
move throughout the data buffer.  Note: If you did not record or load a data
file, what you see is "residue" from a previous application, etc.

  LPT NOTES:

  An option allows you to "clear" (fill with binary 1s or 0s) the entire data
buffer.

  Within the "Record, Playback..." function, is the option to "Set Delay...".
The effect of this delay will vary with PCs and their CPU speed.  The delay
setting determines how long to wait before taking a sample (bit) in "Record"
mode or how long to wait before transmitting the next bit during "playback".
Note: This delay number should be the same for Playback as it was for
recording, in order to simulate the original digital data.  On the other hand,
you can slow down or speed up the digital data if you prefer.

  The length in time, digital data can be recorded, depends on the buffer
size, which will vary some from PC to PC, the CPU speed, and the delay
setting.  Note: Only "conventional" memory is used for storage due to time
balancing in the Record or Playback procedures.  Note: Pressing Esc during
recording or playback will abort that function.

  BAUD RATE (IF):

  When LPT is launched, the delay number is calculated, based on the PC speed,
for 1200 baud, X 32 samples per baud, in the event that the baud rate is
important.  This "over sample" (X 32) means that for the duration of each bit,
there will be many samples of each bit.  In this case, 32 (apx) samples per
bit, resulting in about 32 "1"s or "0"s (per bit) placed into the memory
buffer.  Since sampling is not synchronized, it isn't precise.  However, two
additional functions can correct this, if it is required (explained later).
For other baud rates, simply divide or multiply the 1200 baud delay number.
Examples: 2400 baud, divide the delay number by 2.  300 baud, multiply the
number by 4.

  "REDUCE BINARY SEQUENCE"

  This function was added in the event it is necessary to reduce a sequence
of 1s and 0s.  Every other bit is removed (discarded).  Example: A sequence of
eight "1" bits will become four "1" bits. The same applies to "0" bits.

  "CONVERT BINARY SEQUENCE TO COUNT" (requires "over sample")

  This function counts every consecutive sequence of "1" and "0" bits, and
converts them into a 16 bit "word" (2 bytes) number.  This function can be
useful alone, or used in conjunction with the "Count to precise bits"
function.  This function will not work if the first 16 bits are not the same.
Also, "overrun" will occur when there are too many small, less than 16 bits,
sequences of the same bit.  In this case, the conversion will stop, but
everything up to that point will be converted.  Decreasing the delay number
will increase the samples per bit during recording.  Note: The conversion will
also stop when a sequence of the same bit exceeds 65,535, but there will be no
notification, since this may be the result of a short recording period (user
presses Esc key).

  "COUNT TO PRECISE BITS" (after a conversion to "count")

  If it is important to have a precision sequence of binary bits, this
function usually will convert a less precise "over sampled" recording of
digital data, and convert it to an accurate representation.

  SQUARE WAVE GENERATOR:

  An adjustable square wave generator is one of the features in LPT.  You can
use a scope to view it, but I suggest you put a 10K resistor between one of
the data pins (2 - 9) and ground.  Put your scope (or other) across that
resistor.

  "TEST PIN 12 (INPUT) FOR ACTIVITY":

  This was a feature I added for certain tests I was making.  It will count
the number of transitions from one state to the other that occurs within
1/18th of a second.

  PEEK OR POKE:

  This function allows you to "peek" or "poke" the Data and Status ports for
the parallel port.  This is useful for testing purposes.

  CONCLUSION:

  This is NOT a "free" program.  A one time donation is expected.  You choose
the amount ($5.00 minimum).  For your donation, you will become a "donor".
Your name, etc. will be added to the "donors" list.  As a "donor" (one time
donation), you can select (ask for) one or more programs to receive FREE such
as "Tree Restore", etc.  See (use "HELP") "OTH-PGMS.TXT" for information
about other programs.  Please include your e-mail address with your donation,
and the name/s of the other program/s you want (if any).  I will tell you in
the email message about the attachment (programs.zip) so you know it is safe
to open.  As a "donor", you will be entitled to receive all improved and new
programs (at your request) developed in the future (sent to you by e-mail).
As a "donor", you may request (from time to time) the latest list of programs
from which you can select to receive FREE.  If you know another shareware
author with a better offer, please let me know.

  The donation will motivate me to develop more programs and make improvements
in existing programs (add new features).

  Comments or complaints are always welcomed via email.  If you use "snail
mail" and expect a reply, please include a S.A.S.E.

  If you are overseas, the local bank charges a $10.00 service fee for checks
outside of U.S. I recommend that you send U.S. cash instead.

  Send $5.00 (or more) check, money order, or cash (put in foil for security)
to:

                     John Augustine N3AOF
                     3129 Earl St.
                     Laureldale, Pa 19605

            E-Mail:  jaugust@bellatlantic.net

