                                                        8/11/2004

 << PicoWeb Parallel Port Programming Tool source file distribution >>

When run under Windows 95/98/ME/NT/2000/XP, this program makes direct I/O
requests to the parallel port(s) in order to access the PicoWeb's Atmel
microcontroller via the PicoWeb's programming cable, wired as follows:

  PC PP  Breadboard    PicoWeb
  DB-25  8-Pin Header  DB-25    Signal Name
  -----  ------------  -------  -----------
    2       JP1-1        20     RESET* (active low)
    3       JP1-3        18     SCK (PB7)
    4       JP1-7        14     MOSI (PB5)
   13       JP1-5        16     MISO (PB6)
   15       JP1-2         -     GND
   24       JP1-4         -     GND
   23       JP1-6         -     GND
   22       JP1-8         1     GND
   12         -           -     PaperOut      \ Loop-back (cable detect)
   14         -           -     AutoLineFeed* / Loop-back (cable detect)

When run under Windows NT/2000/XP, this program will install a driver
which modifies the program's I/O protection bits allowing direct control
of the PC parallel port(s) from the Windows application.  Note that under
Windows NT/2000/XP this program probably must be run with "Adminstrator"
privileges.

When run under Linux, this program requires "root" privileges in order
to make direct I/O requests to the parallel port(s) in user mode.

Note that under Windows NT/2000/XP the programmer application ("pppt32")
will attempt to run a "helper" application, named "PPortIoD", which is
designed to keep the parallel port occupied after progammer application
("pppt32.exe") has exited.  This helper program will place an icon in
the system "task tray" indicating that it is active.  Clicking on the
"task tray" icon should produce a pop-up window allowing the user
to release the parallel port for use by other programs.

Users that want to write their own console-mode direct I/O programs
using the parallel port will need to use "ppio.h" and "ppio.lib".

The test program source "TestIO.c" shows a simple way to gain access to
the parallel port under Windows NT/2000/XP.  In this case, the program
"InstPrivIoXP.exe" needs to be run manually first, but only once per
Windows re-boot.  The program "InstPrivIoXP.exe" will install the direct
I/O driver and activate a "helper" program ("PPortIOD.exe") which will
ensure that the state of the parallel port remains unchanged after your
application program exits.

Files in this distribution include:

   DriverSys.h      - Driver PrivIoXP.sys binary as C header file
   GivePrivIoXP.c   - GivePrivIoXP direct I/O utility program (source)
   GivePrivIoXP.exe - GivePrivIoXP direct I/O utility program (executable)
   InstDriverXP.c   - Direct parallel port I/O driver install routines
   InstDriverXP.h   - Include file for InstDriverXP.c
   InstPrivIoXP.c   - PrivIoXP driver install program (source)
   InstPrivIoXP.exe - Installs PrivIoXP driver (executable)
   io.s             - Linux 80x86 assembly routines inp() and outb()
   LICENSE.txt      - Use restrictions
   LogPrivIoXP.h    - Include file for logging with true Windows programs
   Makefile         - Microsoft Visual C++ makefile (Windows)
   Makefile.linux   - Linux makefile
   mkPPortIoD.bat   - used to "make" PPortIoD "helper" program
   perl.exe         - Perl4 executable (used by Makefile)
   ppio.c           - PC parallel port I/O routines
   ppio.h           - Include file for ppio.c
   ppio.lib         - Windows library with all utility routines
   PPortIoDExe.h    - Executable PPortIoD.exe as C header file
   pppt.c           - Atmel AVR programming utility source code
   pppt32.exe       - Win32 executable, Atmel AVR programming utility
   PrintfPrivIoXP.h - Include file for logging with "console mode" programs
   PrivIoXP_IOCTL.h - Include file with PrivIoXP driver definitions
   README.txt       - This file
   RemPrivIoXP.c    - PrivIoXP driver un-install program (source)
   RemPrivIoXP.exe  - Removes PrivIoXP driver (executable)
   SetPrivIoXP.c    - Direct parallel port I/O routines
   SetPrivIoXP.h    - Include file for SetPrivIoXP.c
   sys2tbl.pl       - Perl script used to build DriverSys.h/PPortIoDExe.h
   TestIO.c         - Test driver direct I/O function (source)
   TestIO.exe       - Test driver direct I/O function (executable)

   driver/          - directory with Windows NT driver sources
   PPortIoD/        - directory with PPortIoD daemon program sources

This program is a 32-bit Windows application which will compile under
Microsoft Visual C++ with the following command line:

   nmake -f Makefile

A Linux version can be compiled using:

   make -f Makefile.linux

The Linux version must be run with root privileges because to needs
special kernel privileges to do direct I/O to the parallel port un
user mode.

Note that "pppt32.exe" should be renamed to "avr.exe" and placed in the
PicoWeb development system "bin" directory before use with the PicoWeb
development environment.  Under Windows this can be done with:

   make -f Makefile install

Under Linux this same thing can be done (as root) with:

   make -f Makefile.linux install

which also makes the executable "avr" run with "setuid root" such that
users besides "root" can make use of the program.

More information can be found at the Web site http://www.picoweb.net/.

