herunterladen

Maxim > Design Support > Technical Documents > Application Notes > Digital Potentiometers > APP 3315
Maxim > Design Support > Technical Documents > Application Notes > Miscellaneous Circuits > APP 3315
Keywords: Parallel Port, 2-wire, I2C, AN3230
APPLICATION NOTE 3315
Writing Parallel-Port 2-Wire Software in C
Aug 24, 2004
Abstract: Provides instruction and source code for writing parallel port 2-wire software for use with the
parallel port hardware described in application note AN3230.
Also see: Application Note: Adding Windows NT/2000/XP Support to the AN3315 Parallel-Port 2-Wire
Software
Introduction
This application note discusses the C source code that is being provided for customers that are
interested in developing 2-Wire software for the parallel port hardware described in application note
AN3230. The source code is available for free on Dallas Semiconductor's FTP site, and can run on any
PC using the Windows® 95 or Windows 98 operating systems. Additionally, a simple Windows program
is available on the FTP site that provides basic 2-Wire communication software that can be used for
simple evaluation and for debugging the parallel port hardware. For more information about the hardware
refer to AN3230.
The software presented in this application note is free and available "as is" for use by our customers.
Dallas Semiconductor accepts no liability for any damages the software may cause. Use the software at
your own risk.
Software Requirements
As mentioned in the introduction, this program must be run on a PC with either the Windows 95 or
Windows 98 operating system. This software directly accesses the parallel port, and Windows NT based
operating systems require a driver to accomplish this task.
Additionally, there are multiple parallel port modes of operation, some of which are not compatible with
the software. Two modes that have been successfully used are EPP and ECP. Most PC's parallel port
mode can be changed in the BIOS settings.
Source Code Description / Use
The source code (see Appendix A) is written in ANSI C, so it should be compatible with any C compiler.
To make its use as simple as possible all the code and declarations are in a single file (2wire.c), so there
is not a header file that must also be included into the project to use the resources.
To use the 2-Wire source code:
Page 1 of 15
Verzeichnis