
User's Guide

Patchit

Rev. 2.93



Copyright 1998-1989.  White Perch Software, Belmont, MA  02178



Introduction
This manual describes the operation of the Patchit data acquisition program.  The current 
revision of this program is 2.93.  This software and manual are copyright 1998 through 
1989 by White Perch Software, Belmont, MA  02178.

1.1	Compatibilities
Patchit runs on IBM PC compatible computer systems.  It operates entirely in graphics 
mode.  As such, it requires a compatible graphics display adapter.  Patchit supports all 
major display adapters (Hercules, CGA, EGA, VGA) and has drivers for several other 
graphics display adapters including Super VGA. Patchit works with a Microsoft 
compatible mouse.

Patchit is a data acquisition program.  It therefore requires a data acquisition card.  Patchit 
works with both the Tecmar Labmaster and Labmaster DMA data acquisition cards, in 
addition, Patchit should work with all cards in the Data Translation DT2821 family 
(except the DT2829), and in particular, has been thoroughly tested with both the DT2828 
and DT2821 data acquisition cards. For configuring these boards, see the appendix at the 
end of this manual.  As of this time, these are the only data acquisition adapters supported 
by Patchit.

1.2	Starting Up
Patchit runs entirely in graphics (not text) mode.  In order for it to run, a graphics driver 
for the graphics adapter that is installed in the computer must be available in the directory 
in which the Patchit executable file is.  These drivers have the file extension ".BGI".  The 
drivers required for the following screen types are as follows:
	Display Adapter					Display Driver
	Hercules (Hercules Graphics Adapter)		HERC.BGI
	CGA (Color Graphics Adapter)			CGA.BGI
	EGA (Enhanced Graphics Adapter)			EGAVGA.BGI
	VGA (Video Graphics Adapter)			EGAVGA.BGI
	Super VGA						SVGA16M.BGI
		(Supports common SVGA cards and the VESA standard SVGA interface)
	IBM 8514 Graphics Adapter				IBM8514.BGI
	AT&T 400-Line Graphics Adapter			ATT400.BGI
	3270 PC Graphics Adapter				PC3270.BGI

By default, Patchit will automatically detect the proper graphics driver for the computer.  
If the proper driver is not found by Patchit (in the same directory as the Patchit executable 
file) upon start up then the program will abruptly end and display an error message.  
Otherwise the program will start and Patchit's main screen will appear.

1.3	The Screen
Patchit's main screen is divided into three areas.  The menu bar is on the top of the screen, 
it allows the user to access all of Patchit's commands.  The right-most portion of the 
menu bar shows the amount of free conventional (real mode) memory available for 
Patchit's use.  The lower part of the screen shows the status line.  This line displays 
information about the current status of the program (the amount of data sampled, the 
current parameter file and the last data file saved).  The data display area fills the screen 
between the menu bar and the status line.

1.4	Help
On-line help is available throughout Patchit.  Just type the F1 key and a relevant help 
message will pop up.  The help file "Patchit.hlp" must be in the same directory as the 
Patchit executable file.

1.5	Accessing the Menus
The menu bar has a series of pull down menus.  A menu (e.g. "File") can be accessed in a 
number of ways.  1) A menu can be pulled down by clicking on the desired menu entry 
with the mouse.  2)  A menu can be pulled down by holding down the ALT key while the 
selection letter of the desired menu is typed (the selection letter is usually the first letter 
of the word and is shown underlined and in a different color from the rest of that word 
(unless the current graphics display only supports two colors, or the color configuration 
has been messed with)).  For example, to pull down the File menu, type ALT-F.  3)  A 
menu can be pulled down by first activating the menu bar with the F10 or "/" key.  The 
file menu will drop down, but not be selected.  The selection letter of any of the main 
menu items can then be typed in order to access that particular menu.

Certain functions on the individual menus can be accessed directly, without pulling down 
the menus, by typing a hot-key (the hot-keys are shown to the left of a menu entry, on its 
menu).  For instance, the F7 key will cause Patchit to read a parameter file if pressed 
when the menu bar is not activated.

Many menus contain both an Okay and a Cancel option.  Selecting the Okay option will 
save any changes you have made to the items on that menu (and on any submenus).  
Selecting the Cancel option will discard any changes you have made to the items on that 
menu (and on any submenus).

1.6	Files
Patchit writes three types of files.  data files, parameter files and configuration files.  Data 
files contain recorded data and parameters that describe the data and how it was recorded.  
Data files are only written by Patchit, they can be read by the Tack data analysis program.  
Parameter and configuration files contain all of the information describing the operation 
of Patchit.  Parameter files contain the parameters that describe how data will be acquired 
during an "Acquire" session.  The parameters that go in a parameter file are specified on 
the Acquire:Parameters menu.  Other parameters are stored in the configuration file.  
Patchit reads the configuration file (Patchit.cfg) contained in the current working 
directory at start-up.  If you need multiple configurations, you can either run Patchit from 
several different directories (each with its own Patchit.cfg file) or else rename patchit.cfg.

2.	The Menus

2.1	File Menu
2.1.1	Read Parameters
Selecting this option allows the user to load a new set of parameters into Patchit.  A 
parameter set determines how stimulus/i will be generated and how data will be recorded.  
The parameters that are stored in this file are those that are indicated and controlled by 
the Acquire:Parameters menu, below.  Parameters are stored in files called "parameter 
files".  If there are files in the current directory that match the selected filespec (the 
default is "*.prm"), a selection box will appear listing the available files.  A parameter file 
may be cursor selected from this box (with the mouse or keyboard) or else the name of a 
parameter file may be typed in (do not type the ".prm" extension).  To change the current 
drive, directory, or filespec, just type that in, or else click the left mouse button in the 
upper window and type the pathname.  The list of parameter files will be updated for this 
new directory.

2.1.2	Write Parameters
Selecting this option allows the user to store the current parameter set to a parameter file. 
The name of the parameter file should be typed without the extension ".prm" (this is 
automatically appended by the program).

2.1.3	Save Data File
Selecting this option saves the latest set of data that has been recorded.  When the data is 
saved, a complete copy of the parameters used to record this data is also stored along with 
it.  You must use this option to save the data that you have just recorded.  If you do not, 
then the data recorded by Patchit will be overwritten the next time you acquire data.  The 
only exception to this is if you have configured Patchit to record data directly to your disk 
(see below, Acquire:Parameters:Options:Record To Disk).

2.1.4	DOS Shell
When this is selected the user temporarily exits to DOS to perform simple commands.  In 
order to allow this, Patchit "spawns" a copy of the DOS command interpreter.  Note that 
Patchit is still loaded in memory so there will be less DOS memory available to execute a 
command.  Type "EXIT" at the DOS command line ("C:\>") to return to Patchit.

2.1.5	About
When this is selected the user can find out about Patchit.

2.1.5.1	Patchit
Selecting this causes copyright information about Patchit to appear. 
2.1.5.2	Memory
Selecting this causes information about the memory on your computer and Patchit's use 
of it to appear.  There are three types of memory used by Patchit.
 	Conventional Memory
This is the memory used by all DOS real mode programs, it is limited to a maximum 
of 640 Kilobytes (KB).  Patchit will show you the total amount of conventional 
memory on your computer and the amount that is currently available.
 	XMS Memory
This is memory above the 1 Megabyte boundary that can be accessed by Patchit if an 
XMS driver (such as Microsoft's HIMEM.SYS) is loaded.  XMS memory allows 
Patchit to store a great deal of data without filling up the DOS (conventional) memory 
area.  If XMS is available Patchit will store acquired data in it unless you have 
disabled this feature (see below, Config:Miscellaneous:XMS Data Storage).
 	Disk Memory
This is the memory available on the disk.  Patchit shows the total disk space and the 
available amount on the current disk.

2.1.6	Quit Program
Selecting this allows the user to exit Patchit.

2.2	Display Menu

2.2.1	Erase Screen
Selecting this causes all data display windows to be cleared.

2.2.2	Redraw Screen
Selecting this causes any data that has been recorded by Patchit to be redisplayed in the 
data display windows.  Data recorded on channels that have not been enabled for display 
will not be displayed. 

2.2.3	Dynamic Zoom 
Selecting this allows you to use the mouse to select the zoom factor for displayed data.  
You marquee-select the part of the displayed data you want to zoom in on, and then all 
displayed data traces are redrawn at the new zoom factor.  The hot key for this is CTRL-
Z. 

When this is selected, you can use either the mouse or the cursor keys on the keyboard to 
select areas for zooming.  You can select areas in the data display winodw(s), the time 
axis window or in the amplitude window(s).
 	Mouse:  Click and drag to select a region using the mouse.  Once you release the 
mouse button, the data area will be redrawn at the new zoom factor.
 	Keyboard:  Use the cursor keys to move the box.  Holding the shift key down while 
using the cursor keys resizes the box.  For both of these operations, the amount of box 
movement for each keystroke is controlled by the step factor, which can be increased 
or decreased by using the `+' and `-' keys.  Use the TAB key to change which 
window the zoom bx is in.  Hit the ENTER key when done, or the ESC key to cancel.

2.2.4	Manual Zoom 
Selecting this allows you to manually enter the zoom factors used for displayed data.  
Enter the values on the menu and then all displayed data traces will be redrawn at the new 
zoom factor.  The hot key for this is CTRL-Y. 

2.2.4.1	Input
Selecting this allows you to select which input channel's data you will set the zoom 
factors for.  If you have displayed only one channel of data, this menu option will be non-
functional.

2.2.4.2	Scale by
Selecting this allows you to enter a value by which the displayed data will be scaled 
(multiplied by).  This value affects only the display of data, the raw data is unaffected.  
Inverting the display of a channel can be set here by setting this value to -1, but toggling 
the invert flag (see Config:Inputs) would cause the display to update faster.

2.2.4.3	Offset
Selecting this allows you to enter a value by which the displayed data will be offset 
vertically.  This value is entered as a value in the range +1.0 to -1.0, +1.0 causes the data 
to be drawn at the top of the display, -1.0 causes the data to be drawn at the bottom of the 
display, and 0.0 causes the data to be drawn as it is recorded.  Intermediate values cause 
intermediate effects.  This value affects only the display of data, the raw data is 
unaffected.

2.2.4.4	Timing
Selecting this allows you to manually enter the timing range over which data traces will 
be displayed.  This value affects only the display of data, the raw data is unaffected.

2.2.4.5	Reset
Selecting this causes the scale factor, offset factor and timing range to be reset for all 
displayed data on this input channel.  This option affects the displayed data for the 
currently selected channel only.

2.2.5	Reset Zoom 
Selecting this resets the scale factor, offset factor, and timing range for all displayed 
channels.  All displayed data is redrawn.  The hot key for this is CTRL-R. 

2.2.6	Show all pts in trace
If this is enabled then Patchit will display all of the data points for a given record on the 
screen.  That is, if there are more data points in a record than there are pixels 
(horizontally) in the data display area then Patchit will show multiple Y points for each X 
point.  If this is disabled then Patchit will only display one Y point for each X point.  
Disabling this feature causes Patchit to draw faster.

2.2.7	Connect the points
If this is enabled then Patchit will connect the data points on the screen with lines.  This 
causes the display of data to look nicer, but significantly slows the display of data.

2.3	Acquire Menu

2.3.1	Acquire
When this is selected, Patchit will acquire data.  Stimuli will be generated on any enabled 
output channels and data will be acquired on any enabled input channels.  This process 
may be interrupted by hitting the ESC key, the space bar, or the right mouse key.  It can 
be paused by hitting the F2 key.

When Acquire is selected, new menus become available.  These are:

2.3.1.1	Cancel
Selecting this cancels the acquisition cycle, and returns to Patchit's main menu.  The hot-
key for this is the ESC key or the space bar.

2.3.1.2	Go/Pause
Selecting this pauses or restarts the acquisition cycle.  If an error occurs during operation, 
the acquisition cycle will automatically pause.  It can be restarted by selecting this menu 
option.  The hot key for this is the F2 key.

2.3.1.3	Display
Selecting this brings up a menu that allows you to select options for the display of data.  
These options are:

2.3.1.3.1	Erase Screen
Selecting this clears the data display area.  The hot key for this is the F5 key.

2.3.1.3.2	Dynamic Zoom
Selecting this allows you to use the mouse to select the zoom factor for displayed data.  
You marquee-select the part of the displayed data you want to zoom in on, and then all 
displayed data traces are redrawn at the new zoom factor.  The hot key for this is CTRL-
Z. 

When this is selected, you can use either the mouse or the cursor keys on the keyboard to 
select areas for zooming.  You can select areas in the data display winodw(s), the time 
axis window or in the amplitude window(s).
 	Mouse:  Click and drag to select a region using the mouse.  Once you release the 
mouse button, the data area will be redrawn at the new zoom factor.
 	Keyboard:  Use the cursor keys to move the box.  Holding the shift key down while 
using the cursor keys resizes the box.  For both of these operations, the amount of box 
movement for each keystroke is controlled by the step factor, which can be increased 
or decreased by using the `+' and `-' keys.  Use the TAB key to change which 
window the zoom bx is in.  Hit the ENTER key when done, or the ESC key to cancel.

2.3.1.3.3	Manual Zoom
Selecting this allows you to manually enter the zoom factors used for displayed data.  
Enter the values on the menu and then all displayed data traces will be redrawn at the new 
zoom factor.  The hot key for this is CTRL-Y. 

2.3.1.3.3.1	Input
Selecting this allows you to select which input channel's data you will set the zoom 
factors for.  If you have displayed only one channel of data, this menu option will be non-
functional.

2.3.1.3.3.2	Scale by
Selecting this allows you to enter a value by which the displayed data will be scaled 
(multiplied by).  This value affects only the display of data, the raw data is unaffected.  
Inverting the display of a channel can be set here by setting this value to -1, but toggling 
the invert flag (see Config:Inputs) would cause the display to update faster.

2.3.1.3.3.3	Offset
Selecting this allows you to enter a value by which the displayed data will be offset 
vertically.  This value is entered as a value in the range +1.0 to -1.0, +1.0 causes the data 
to be drawn at the top of the display, -1.0 causes the data to be drawn at the bottom of the 
display, and 0.0 causes the data to be drawn as it is recorded.  Intermediate values cause 
intermediate effects.  This value affects only the display of data, the raw data is 
unaffected.

2.3.1.3.3.4	Timing
Selecting this allows you to manually enter the timing range over which data traces will 
be displayed.  This value affects only the display of data, the raw data is unaffected.

2.3.1.3.3.5	Reset
Selecting this causes the scale factor, offset factor and timing range to be reset for all 
displayed data on this input channel.  This option affects the displayed data for the 
currently selected channel only.

2.3.1.3.4	Reset Zoom 
Selecting this resets the scale factor, offset factor, and timing range for all displayed 
channels.  All displayed data is redrawn.  The hot key for this is CTRL-R. 

2.3.1.3.5	Real-Time Display
Selecting this toggles the enabled/disabled state of this option.  If this is enabled, then 
data will be displayed as it is acquired.  NOTE that displaying data in real time takes a 
significant amount of time (especially if the data points need to be connected by a long 
line), so an error may occur if you need to use high sampling rates.  The error condition is 
an "overrun error" (new data arrived on the card before the computer had finished 
drawing the previous data).  If you get these errors, you will need to either disable this 
feature, or disable "Connect the Points", below, or select a lower sampling rate. 

2.3.1.3.6	Show all pts in trace
Selecting this toggles the enabled/disabled state of this option.  If this is enabled then 
Patchit will display all of the data points for a given record on the screen.  That is, if there 
are more data points in a record than there are pixels (horizontally) in the data display 
area then Patchit will show multiple Y points for each X point.  If this is disabled then 
Patchit will only display one Y point for each X point.  Disabling this feature causes 
Patchit to draw faster.

2.3.1.3.7	Connect the points
If this is enabled then Patchit will connect the data points on the screen with lines.  This 
causes the display of data to look nicer, but significantly slows the display of data.

2.3.1.3.8	Auto-Erase (Storage)
If this is enabled then the screen will automatically be cleared between each pulse 
generator pulse (data acquisition cycle).  If this is disabled then the screen will not be 
cleared until you manually clear it with the F5 key.

2.3.2	Continue
When this is selected, you can have Patchit begin acquiring data from a record at which it 
had been previously interrupted.  You have the option of continuing from a record earlier 
than that at which data acquisition was previously interrupted.  That is, if you interrupted 
the data acquisition cycle after record #8 because of a big glitch in the recording (due to a 
power line spike of course) you could continue recording at record #6, overwriting 
records 6 - 8 with new data.

Like Acquire (immediately above), Continue brings up a new main menu (see Acquire).

2.3.3	Parameters

2.3.3.1	Number of Records
Selecting this allows the user to specify the number of records that Patchit will record.  
Patchit records data in blocks that are called "records".  A record can contain multiple 
channels of data.  The number of records is effectively limited by memory.  If you select 
a value and Patchit finds that there is insufficient memory on your computer, then Patchit 
will complain and reset the value.  If you need to record such large amounts of data, you 
should enable Record To Disk. (see Options, below).

2.3.3.2	Record Length
Selecting this option allows the user to specify the length of a record (in milliseconds).  
Each record is limited in size to a maximum of 32767 points.  The number of points is 
equal to ((the number of input channels) * (the length of the record)) / (the sampling rate).  
The record length in time, and the number of points in the record are shown here.  If you 
choose a value for the length of the record that exceeds the maximum number of points 
allowable, or the amount of memory available, Patchit will complain and reset the value.  
You will need to choose a shorter record length, a greater sampling interval or fewer 
channels of input.

2.3.3.3	Sampling Int
Selecting this option allows the user to specify the sampling interval at which Patchit will 
record data (in milliseconds).  This value plays a role in determining the size of the record 
and is limited (see Length of Record, above).  If you choose too small a value, Patchit 
will complain and reset the value.  If this happens, choose a larger value, decrease the 
record length or decrease the number of input channels.
Note:  Due to the design of certain data acquisition boards, under certain 
conditions Patchit may use a smaller sampling interval than you have 
selected.  This should not affect the size of the memory block described 
above, but the sampling interval could be smaller than the board could 
handle.  Although unlikely, this could cause the program to lock up, a full 
computer reboot might then be necessary.  Always test your parameter 
files before using them for critical recording sessions!

2.3.3.4	Inputs
Selecting this option determines which channels of input will be used and displayed 
during a data acquisition cycle.  The items on this menu correspond to the available input 
channels (up to 16, depending on your data acquisition board).  During data acquisition, 
data will only be recorded on an input if it is enabled here.
Note:  Due to the design of certain data acquisition boards, under certain 
conditions Patchit may have to temporarily use more input channels than 
you have selected.  These unwanted channels will be stripped away once 
the data has been recorded, but can have two effects.  1) The amount of 
memory available for a data acquisition cycle may be reduced.  2) The 
increased number of channels may cause the sampling interval used to be 
smaller than you have selected.  This sampling interval could be smaller 
than the board could handle.  Although unlikely, this could cause the 
program to lock up, a full computer reboot might then be necessary.  
Always test your parameter files before using them for critical recording 
sessions!

2.3.3.4.1	x Input x
Selecting this item allows the user to control the settings for this input.

2.3.3.4.1.1	Recording
Selecting this toggles the enabled/disabled state of this input.  Data will be recorded on an 
input during a data acquisition cycle only if it is enabled here.  Enabling/disabling an 
input will also automatically turn on display of this data - you can turn this off below.

2.3.3.4.1.2	Display
Selecting this toggles the enabled/disabled state for whether or not data on this channel 
will be displayed.  Data can only be displayed if this channel is enabled for input.

2.3.3.5	Output
Selecting this option allows the user to determine which channels of output will be used 
during a data acquisition cycle and the default value that will be output by these channels 
at all other times. There are entries on this menu for all of the available analog output 
channels (2) and one binary output consisting of 14 separate TTL outputs.  The exact 
number of outputs depends on your specific data acquisition board.  Note that an output 
will only be used during a data acquisition cycle if it is enabled here.  Specifying outputs 
waveforms is described on the Acquire:Parameters:Stimulus menu, below.

2.3.3.5.1	x Output x
Selecting this option allows the user to enable or disable whether this analog output (D/A 
converter) channel will be used during a data acquisition cycle. and set the default output 
value for this channel.

2.3.3.5.1.1	Use Output?
Selecting this toggles the enabled/disabled state of this output.  This channel of ouput will 
only be used during a data acquisition cycle if it is enabled here.
2.3.3.5.1.2	Default Value
This allows the user to set the default value used for this analog output.  This value is 
specified in user units.  This value is output on this output at all times (except during data 
acquisition cycles, if the channel is enabled for output).  Note that values entered for the 
stimulus descriptors (see below, Acquire:Parameters:Stimulus:D/A Channel X) are 
absolute values and are not relative to this holding potential.
2.3.3.5.1.3	At end of Record, Use Default?
When enabled, this causes the output to return to its default value at the end of each 
recording cycle (acquisition cycle).  When disabled, the output remains at the last value 
that it was at at the end of the recording (acquisition cycle).

2.3.3.5.2	Binary Output
Selecting this option allows the user to enable or disable whether the binary (TTL) output 
will be used during a data acquisition cycle and set the default output value for this 
channel.

2.3.3.5.2.1	Use Output?
Selecting this toggles the enabled/disabled state of this output.  This channel of output 
will only be used during a data acquisition cycle if it is enabled here.
2.3.3.5.2.2	Default Value
This allows the user to set the default state for the binary (TTL) output.  This value is 
expressed as a 14 bit hexadecimal value.  Each bit in this hexadecimal value corresponds 
to the default logic state of the 14 binary output channels.  In most cases the default state 
of these outputs will be zero (0) unless you have a device whose trigger uses negative 
logic (i.e. a falling edge trigger).  The default value is output on the binary output port at 
all times (except during data acquisition cycles, if the channel is enabled for output).
2.3.3.5.2.3	At end of Record, Use Default?
When enabled, this causes the output to return to its default value at the end of each 
recording cycle (acquisition cycle).  When disabled, the output remains at the last value 
that it was at at the end of the recording (acquisition cycle).

2.3.3.6	Delay Time
Selecting this option allows the user to specify the delay time (in seconds) between data 
acquisition cycles.  This value is the amount of time the program waits between each 
record.  During data acquisition cycles, this value is counted down on the screen.  A value 
of 0 will NOT cause the records to be acquired immediately after each other.  There is a 
small amount of overhead time that Patchit requires between each data acquisition cycle.

2.3.3.7	Options
Selecting this brings up a menu that allows you to specify various options, primarily 
about how data will be displayed by Patchit.

2.3.3.7.1	On-Line Averaging
This allows the user to select on-line averaging.  If enabled, the running average of the 
acquired data will be displayed in the same window as the data as it is being acquired.
2.3.3.7.2	Record to Disk
Selecting this toggles the enabled/disabled state of this option.  If this is enabled, Patchit 
will store each record as it is acquired to a disk file.  When you begin sampling data, 
Patchit will prompt you for the name of the file into which the data will be saved.  Prior 
to writing each record to this disk file, Patchit will check that there is sufficient disk space 
available.  You will be warned if there is not.
2.3.3.7.3	Record Comments
Selecting this toggles the state of this feature.  When this is enabled, you will be 
prompted for a comment when you save data to a disk file.  The comment can be of any 
length and is useful for recording pertinent facts about the data.
2.3.3.7.4	Real-Time Display
Selecting this toggles the enabled/disabled state of this option.  If this is enabled, then 
data will be displayed as it is acquired. NOTE that displaying data in real time takes a lot 
of time, so you may find that you get errors if you have too high a sampling rate.  One 
way that might prevent this from happening is to not connect the points on the display 
(i.e., disable Display:Connect the Points), since drawing lines takes longer than drawing 
points.  Alternatively, you can increase the sampling interval in order to give poor Patchit 
more time to draw.
2.3.3.7.5	Auto-Erase (Storage)
If this is enabled then the screen will automatically be cleared whenever data is acquired 
or whenever a new parameter file is loaded.  If this is disabled, then the screen will only 
be cleared when you manually clear it (or whenever a parameter file is loaded).

2.3.3.8	Stimulus
Selecting this option allows the user to control the output stimulus waveform(s) during 
data acquisition.  Patchit controls two different types of outputs, analog (D/A) and binary 
(TTL).  The stimuli that can be generated on these channels are different and will be 
described separately.  Selecting one of the options on this menu allows the user to specify 
the output waveform for the selected channel.  If the output channel for which you wish 
to describe the waveform is not enabled, you will be warned.

Output waveforms are described by events, these events can occur at any time during the 
data acquisition cycle.  Existing events occurring on this output channel are listed in 
chronological order, in a box shown at the bottom of the screen.  Events may be added to, 
changed, or deleted from this list using the menu.  Events are described by event 
descriptors.  The event descriptors are different for analog and binary outputs.

2.3.3.8.1	x (D/A) Channel x
This allows the user to configure the analog output waveform for this output channel.  If 
this channel is not enabled for output, you will be warned.  It can be turned on using 
Acquire:Outputs:X Output X:Use Channel.  The event descriptor control menu has 
five items:

2.3.3.8.1.1	Add Event
This allows the user to add an event to the event list (and thus to the output waveform on 
this channel).  The event will be added to the list in its proper chronological order.

2.3.3.8.1.2	Change Event
This allows the user to change an existing event in the event list (and thus the output 
waveform on this channel).  The user will be prompted for which event to change.

Both Add Event and Change Event bring up the event menu:
2.3.3.8.1.2.1	Format
An event can be either a step or a ramp.  A step is an instantaneous (well, as good as the 
hardware can do) change in the output state at the given time.  A ramp causes the output 
to change state in a linear or ramp-like fashion starting at the given time.  The next two 
items on this menu differ depending upon the format for the event that is selected:

For Step events the next two items are:
2.3.3.8.1.2.1.1	Level
The amplitude to which the output will be stepped at the time of the event.
2.3.3.8.1.2.1.2	Incmt
The increment by which the output amplitude will be changed during each occurrence of 
the event (note that the event may not occur during each record (see "Event Occurs", 
below).

For Ramp events the next two items are:
2.3.3.8.1.2.1.3	Level, Starting
The amplitude from which the ramp will start at the time of the event.
2.3.3.8.1.2.1.4	M = Slope
The slope (in user units/millisecond) of the ramp.

2.3.3.8.1.2.2	Time
The time (in milliseconds) at which the event is to occur.
2.3.3.8.1.2.3	Delta T
The increment (in milliseconds) by which the time of the event is shifted during each 
occurrence of the event (note that the event may not occur during each record (see "Event 
Occurs", below).
2.3.3.8.1.2.4	Event Occurs
This allows you to specify when the event will occur from record to record.  The event 
can occur:
 	Every Record,
 	On a single record only
 	For a range of records
 	On Odd records only
 	On Even records only
 	Every nth record, from record
Note: If this event has an increment parameter (either voltage or time) then that 
parameter will only increment each occurrence of the event.  e.g., if the event occurs on 
odd records only, then the parameter will only increment on odd records.

2.3.3.8.1.3	Delete Event
This allows the user to delete an event from the event list (and thus from the output 
waveform for this channel).  The user will be prompted for which event to delete.

2.3.3.8.1.4	Erase All Events
This allows the user to delete all events in the event list (and thus the output waveform 
for this channel).  If this channel is enabled for output and there are no events for it, then 
the output will be the default output amplitude (set by Outputs:x Output x:Default 
Value).

2.3.3.8.2	Binary Output
This allows the user to configure the output waveforms for the binary output.  If the 
binary output channel is not enabled for output, you will be warned.  It can be turned on 
using Acquire:Outputs:Binary Output:Use Channel.  The event descriptor control 
menu has five items:

2.3.3.8.2.1	Add Event
This allows the user to add an event to the event list (and thus to the binary output 
waveform).  The event will be added to the list in its proper chronological order.

2.3.3.8.2.2	Change Event
This allows the user to change an event in the event list (and thus the binary output 
waveform).  The user will be prompted for which event to operate upon.

Both Add Event and Change Event bring up the event menu:
2.3.3.8.2.2.1	Hex value
This is the value in hexadecimal (up to 3FFF) which is to be output on the binary port at 
the time of the event.  Each of the up to 14 TTL outputs are controlled by a bit from this 
value.  To output the logic level "1" on binary channel 0, the value in hexadecimal is 1.  
To output the logic level "1" on binary channel 1, the value in hexadecimal is 2. Oh, go 
look up hexadecimal numbers somewhere else.
2.3.3.8.2.2.2	Time
The time (in milliseconds) at which the event is to occur.
2.3.3.8.2.2.3	Delta T
The increment (in milliseconds) by which the time of the event is shifted during each 
occurrence of the event (note that the event may not occur during each record (see "Event 
Occurs", below).
2.3.3.8.2.2.4	Event Occurs
This allows you to specify when the event will occur from record to record.  The event 
can occur:
 	Every Record,
 	On a single record only
 	For a range of records
 	On Odd records only
 	On Even records only
 	Every nth record, from record
Note: If  this event has a Delta T parameter (time increment) then that parameter will 
only increment each occurrence of the event.  e.g., if the event occurs on odd records 
only, then the parameter will only increment on odd records.

2.3.3.8.2.3	Delete Event
This allows the user to delete an event from the event list and thus from the binary output 
waveform.  The user will be prompted for which event to delete.

2.3.3.8.2.4	Erase All Events
This allows the user to delete all events in the binary output's event list (and thus the 
binary output waveform).  If the binary output is enabled for output and there are no 
events for it, then each of the individual TTL outputs will be set to its default (TTL) value 
(this is set by Acquire:Outputs:Binary Output:Default Outs).

2.4	Pulse_Gen - The Pulse Generator
Selecting this causes Patchit to begin acquiring data in "pulse generator" mode.  In this 
mode, stimulus will be generated on one enabled output channels and data will be 
acquired on one input channel.  This process may be interrupted by hitting the ESC key 
or the space bar.  The analog output for this function is constrained to a simple square 
pulse on the selected output channel.  The pulse width is set at one half of the length of 
the record (see below).  The pulse is preceded and anteceded by a time equal to one 
quarter of the length of the record (the pulse has a 50% duty cycle).

When the pulse generator is started, the screen redraws and new menus are available.   
These are:

2.4.1	Cancel
Selecting this cancels the pulse generator, and returns to Patchit's main menu.  The hot-
key for this is the ESC key or the space bar.

2.4.2	Go/Pause
Selecting this pauses or restarts the pulse generator.  If an error occurs during operation, 
the pulse generator will automatically pause.  It can be restarted by selecting this menu 
option.  The hot key for this is the F8 key.

2.4.3	Display
Selecting this brings up a menu that allows you to select options for the display of data.  
These options are:

2.4.3.1	Erase Screen
Selecting this clears the data display area.  The hot key for this is the F5 key.

2.4.3.2	Dynamic Zoom
Selecting this allows you to use the mouse to select the zoom factor for displayed data.  
You marquee-select the part of the displayed data you want to zoom in on, and then all 
displayed data traces are redrawn at the new zoom factor.  The hot key for this is CTRL-
Z. 

When this is selected, you can use either the mouse or the cursor keys on the keyboard to 
select areas for zooming.  You can select areas in the data display winodw(s), the time 
axis window or in the amplitude window(s).
 	Mouse:  Click and drag to select a region using the mouse.  Once you release the 
mouse button, the data area will be redrawn at the new zoom factor.
 	Keyboard:  Use the cursor keys to move the box.  Holding the shift key down while 
using the cursor keys resizes the box.  For both of these operations, the amount of box 
movement for each keystroke is controlled by the step factor, which can be increased 
or decreased by using the `+' and `-' keys.  Use the TAB key to change which 
window the zoom bx is in.  Hit the ENTER key when done, or the ESC key to cancel.

2.4.3.3	Manual Zoom
Selecting this allows you to manually enter the zoom factors used for displayed data.  
Enter the values on the menu and then all displayed data traces will be redrawn at the new 
zoom factor.  The hot key for this is CTRL-Y. 

2.4.3.3.1	Scale by
Selecting this allows you to enter a value by which the displayed data will be scaled 
(multiplied by).  This value affects only the display of data, the raw data is unaffected.  
Inverting the display of a channel can be set here by setting this value to -1, but toggling 
the invert flag (see Config:Inputs) would cause the display to update faster.

2.4.3.3.2	Offset
Selecting this allows you to enter a value by which the displayed data will be offset 
vertically.  This value is entered as a value in the range +1.0 to -1.0, +1.0 causes the data 
to be drawn at the top of the display, -1.0 causes the data to be drawn at the bottom of the 
display, and 0.0 causes the data to be drawn as it is recorded.  Intermediate values cause 
intermediate effects.  This value affects only the display of data, the raw data is 
unaffected.

2.4.3.3.3	Timing
Selecting this allows you to manually enter the timing range over which data traces will 
be displayed.  This value affects only the display of data, the raw data is unaffected.

2.4.3.3.4	Reset
Selecting this causes the scale factor, offset factor and timing range to be reset for all 
displayed data on this input channel.  This option affects the displayed data for the 
currently selected channel only.

2.4.3.4	Reset Zoom 
Selecting this resets the scale factor, offset factor, and timing range for all displayed 
channels.  All displayed data is redrawn.  The hot key for this is CTRL-R. 

2.4.3.5	Real-Time Display
Selecting this toggles the enabled/disabled state of this option.  If this is enabled, then 
data will be displayed as it is acquired.  NOTE that displaying data in real time takes a 
significant amount of time (especially if the data points need to be connected by a long 
line), so an error may occur if you need to use high sampling rates.  The error condition is 
an "overrun error" (new data arrived on the card before the computer had finished 
drawing the previous data).  If you get these errors, you will need to either disable this 
feature, or disable "Connect the Points", below, or select a lower sampling rate. 

2.4.3.6	Show all pts in trace
Selecting this toggles the enabled/disabled state of this option.  If this is enabled then 
Patchit will display all of the data points for a given record on the screen.  That is, if there 
are more data points in a record than there are pixels (horizontally) in the data display 
area then Patchit will show multiple Y points for each X point.  If this is disabled then 
Patchit will only display one Y point for each X point.  Disabling this feature causes 
Patchit to draw faster.

2.4.3.7	Connect the points
If this is enabled then Patchit will connect the data points on the screen with lines.  This 
causes the display of data to look nicer, but significantly slows the display of data.

2.4.3.8	Auto-Erase (Storage)
If this is enabled then the screen will automatically be cleared between each pulse 
generator pulse (data acquisition cycle).  If this is disabled then the screen will not be 
cleared until you manually clear it with the F5 key.

2.4.4	Amplitude
Selecting this brings up the amplitude menu.  The amplitude menu allows you to select 
the amplitude of the pulse emitted by the pulse generator.  All items on the amplitude 
menu can also be selected from the amplitude toolbar.  The amplitude options are:
2.4.4.1	"1 ... 10"
Selecting one of these ten entries sets the amplitude of the pulse generator to the indicated 
preset amplitude.  The amplitude indicated on the menu option (and on the toolbar) will 
change depending upon the Range selected (10 to 100, 50 to 500, -10 to -100, and -50 to -
500).

A preset amplitude can be selected by using the hot keys (the `1' through the `0' keys, or 
ALT `1' through ALT `0'), or it can be selected by clicking the mouse on the preset 
amplitude buttons on the amplitude toolbar.

2.4.4.2	Change Range
Selecting this changes the range of preset amplitudes available for use.  Range options are 
10 to 100, 50 to 500, -10 to -100, and -50 to -500.  The hot key for this is the TAB key, or 
it can be selected by clicking the mouse on the "Range" button on the amplitude toolbar.

2.4.4.3	Set Manually
Selecting this allows you to enter the amplitude of the pulse directly.  The hot key for this 
is the ENTER key (the Carriage Return key), or it can be selected by clicking the mouse 
on the "Manual" button on the amplitude toolbar.

2.4.5	Parameters
Selecting this brings up the parameters menu.  The parameters menu allows you to select 
the parameters for the pulse generator. The options are:

2.4.5.1	Input Channel
Selecting this option allows the user to specify the channel that will be used for input 
during a pulse generator cycle.  It is on this channel that analog data from an 
experimental preparation will be acquired and displayed.
Note:  Due to the design of certain data acquisition boards, under certain 
conditions Patchit may have to temporarily use more input channels than 
you have selected.  These unwanted channels will be stripped away once 
the data has been recorded, but can have two effects.  1) The amount of 
memory available for a pulse generator cycle may be reduced.  2) The 
increased number of channels may cause the sampling interval used to be 
smaller than you have selected.  This sampling interval could be smaller 
than the board could handle.  Although unlikely, this could cause the 
program to lock up, a full computer reboot might then be necessary.  
Always test your parameter files before using them for critical recording 
sessions!

2.4.5.2	Output Channel
Selecting this option allows you to specify the channel that will be used for output during 
a pulse generator cycle.  It is on this channel that the voltage pulse will be generated 
during each pulse generator cycle.

2.4.5.3	Length
Selecting this option allows you to specify the length of the record (in milliseconds) used 
for the pulse generator.  This is the duration of the each pulse generator cycle, the pulse 
width is one half of this duration.  Data recorded during the pulse generator cycle is 
stored in blocks known as records.  Each record is limited in size to a maximum of 
~32000 points.  The number of points is equal to (the length of the record) / (the sampling 
rate).  If you choose a value for the length of a pulse generator cycle that exceeds the 
maximum number of points or amount of memory, Patchit will complain and reset this 
value.  You will need to choose a shorter event length or a greater sampling interval.

2.4.5.4	Sampling Int
Selecting this option allows the user to specify the sampling interval (in milliseconds) at 
which data is recorded during a pulse generator cycle.  This value plays a role in 
determining the size of the memory block allocated and is limited (see Length of Record, 
above).  If you choose too small a value, Patchit will complain and reset the value, if this 
happens, choose a larger value or decrease the length of the pulse generator cycle.
Note:  Due to the design of certain data acquisition boards, under certain 
conditions Patchit may use a smaller sampling interval than you have 
selected.  This should not affect the size of the memory block described 
above, but the sampling interval could be smaller than the board could 
handle.  Although unlikely, this could cause the program to lock up, a full 
computer reboot might then be necessary.  Always test your parameter 
files before using them for critical recording sessions!

2.4.5.5	Delay Time
Selecting this option allows the user to specify the delay time (in seconds) between pulse 
generator cycles.  This value is the amount of time the program waits between each cycle.  
A value of 0 here will NOT cause the records to be acquired immediately after each other.  
There is a small amount of overhead time that Patchit requires between each pulse 
generator cycle.

2.5	Config Menu

2.5.1	Hardware Config
Selecting this option allows the user to specify the type of data acquisition board in use 
and its configuration.  When this option is selected a menu appears and the user can select 
among the data acquisition boards that Patchit supports.  At present there are two families 
of boards that are supported, the Data Translation DT2821 series and the Tecmar 
Labmaster series.  The user also has the option of selecting "No Board", this allows you 
to try out Patchit on a computer that has no data acquisition board installed.  When one of 
these board families is selected, another menu appears from which the user can select the 
specific type of board that is installed the hardware settings of that board.  These options 
are described further below:

2.5.1.1	Family Member
Selecting this option allows the user to specify the exact type of data acquisition board 
that is installed in the computer.  This selection allows Patchit to take advantage of the 
features of that specific board (i.e. number of input channels etc.).

2.5.1.2	Base Address
Selecting this option allows the user to specify the base address (in hexadecimal) of the 
data acquisition board that is installed.  It is imperative that this value match that on the 
board (see your board's manual).  If it is incorrectly set, Patchit will be unable to 
communicate with the board.
2.5.1.3	DMA Channel(s)
Selecting this option allows the user to select the DMA channel(s) that the program and 
hardware will use.  Again, the value selected here must match the configuration of the 
board.
Note: At present the second DMA channel is NOT used by Patchit for the 
DT2821 series boards.
2.5.1.4	Interrupt
Selecting this option allows the user to select the interrupt channel that the program and 
hardware will use.  This value should match the configuration of the board.
Note: This setting doesn't matter since Patchit doesn't use this interrupt 
presently.
2.5.1.5	A/D Format
(Labmaster Only) Selecting this option allows the user to specify the data format used by 
the data acquisition board for it's A/D converter.  This can be either Two's Complement 
or Binary.  This value must match the configuration of the board.  The default format for 
Patchit (and Tack) is two's complement.
2.5.1.6	Trigger Src
Selecting this option allows the user to specify whether Patchit will use an internal or an 
external trigger.  For internal trigger (the normal mode), Patchit will start its own data 
acquisition cycle.  For external trigger, a falling-edge TTL trigger will start the data 
acquisition cycle.  For a DT2821 series board, the trigger should be applied to the 
external trigger input.  For a Tecmar Labmaster the trigger pulse should be applied to the 
binary input port B, Bit 2 (B2).

2.5.2	Graphics Display
Selecting this option allows the user to specify the type of graphics display installed and 
the display resolution that Patchit should use.  Normally, the graphics autodetect setting 
should be used.  For a given display type to be used, the requisite display driver file (they 
have the extension ".bgi") MUST be present in the same directory as Patchit.
2.5.2.1	Display Type
Selecting this option allows the user to select a graphics display type.  Twelve settings are 
available.
Note:  If your computer does not support the display type that you have 
selected, you may well crash the program when you try to switch display 
types.
2.5.2.2	Resolution
Selecting this option allows the user to select a display resolution for the selected display 
type.  Note that some display types have only one available resolution.
Note:  If your computer's display adapter does not support the resolution 
that you have selected, you may well crash the program when you try to 
switch display resolutions.

2.5.3	Outputs Menu
This menu controls aspects of the channels of output available on your data acquisition 
board.

2.5.3.1	x Output x
This allows the user to control aspects of the selected analog output.  The name of the 
output will appear on this menu.

2.5.3.1.1	Name
This allows the user to specify a useful name for this analog output channel.

2.5.3.1.2	Units
This allows the user to specify the units used for this analog output channel.

2.5.3.1.3	Attenuation
This option allows the user to set the attenuation factor for the analog output.  This value 
allows Patchit to correctly set it's analog outputs to the proper values which correspond to 
those needed at the external hardware (e.g. an amplifier).  The value entered here is the 
factor by which Patchit's output will be divided in order to compensate for any 
attenuation or amplification at the external hardware.  For the Dagan model 8900 
amplifier which has a command potential input which can be scaled by -10:1 or -20:1, the 
value entered into Patchit would be -10 or -20 for these two scale factors, respectively.  
Generally you should use the largest attenuation factor you can use in order to scale down 
any noise which might enter your amplifier riding on the command voltage.  For instance, 
using the -20:1 attenuation factor yields an effective command voltage range at the 
amplifier of +/- 500 mV (for a board with D/A converters with a range of +/- 10 V, 
attenuated by a factor of 20).  This value is critical and MUST be properly set in order 
for Patchit to output accurate voltages.

2.5.4	Inputs Menu
This menu controls aspects of the channels of input available on your data acquisition 
board.

2.5.4.1	x Input x
This allows the user to control aspects of the selected input.  The name of the input will 
appear on this menu.

2.5.4.1.1	Name
This allows the user to specify a useful name for this input channel.

2.5.4.1.2	Units
This allows the user to specify the units used for this input channel.

2.5.4.1.3	Gain
This allows the user to set how Patchit will determine the gain for data on this channel.  
Two options are available.

2.5.4.1.3.1	User-Specified
Selecting this causes Patchit to prompt you for the gain right now.  Gain is entered in 
mV/user units (specified above).  You are also asked if you want Patchit to prompt you 
for the gain when it saves your data to file.  This might be useful if you change the gain 
frequently during a recording session.

2.5.4.1.3.2	Read from Amplifier
This causes Patchit to determine the gain for this channel by reading it from a telegraph 
on your amplifier.  This will only work if your amplifier has gain telegraphs 
(voltage/serial outputs that correspond to the gain setting on the amplifier), and if the 
amplifier is supported by Patchit.  If you select this option you will be prompted for the 
type of amplifier that you are using.

2.5.4.1.3.2.1	Analog telegraph
If your amplifier is NOT the Axon GeneClamp 500 (analog voltage gain telegraphs), the 
amplifier configuration menu will have the following options:

2.5.4.1.3.2.1.1	Head Stage
Select the headstage that is being used by the amplifier.  This is needed for the gain to be 
set correctly.  Note that some amplifiers only have one headstage setting.
2.5.4.1.3.2.1.2	Multiply
Specify a factor by which the gain will be multiplied.  This allows you to adjust an auto-
sampled gain for additional multiplication.
2.5.4.1.3.2.1.3	Input Chan
Select the analog input channel that the amplifier's gain telegraph is connected to.  The 
gain telegraph is an analog output from the amplifier that supplies a voltage proportional 
to the amplifier gain.
2.5.4.1.3.2.1.4	Query
Selecting this causes Patchit to read the gain from the specified amplifier on the specified 
channel.  This is done continuously and is displayed continuously on the screen until a 
key is hit.

2.5.4.1.3.2.2	Serial telegraph
If your amplifier is the Axon GeneClamp 500 (serial gain telegraph), the amplifier 
configuration menu will have the following options:

2.5.4.1.3.2.2.1	Multiply
Specify a factor by which the gain will be multiplied.  This allows you to adjust an auto-
sampled gain for additional multiplication.
2.5.4.1.3.2.2.2	Device
Select the device number of your GeneClamp.  This is set on the rear panel of your 
amplifier and must be set correctly for serial communications to work.
2.5.4.1.3.2.2.3	Serial Port
Select the serial port that you are using to communicate with your GeneClamp.
2.5.4.1.3.2.2.4	Baud Rate
 Select the baud rate that you are using for serial communications with your GeneClamp.
We recommend that if you use a mouse with Patchit that you set this baud rate at no 
greater than 1200.  At higher baud rates, mouse movement could cause a disruption of the 
serial string sent from the amplifier, possibly causing the gain to be read incorrectly.

2.5.4.1.4	Filter
This allows the user to set how Patchit will determine the filter setting for data on this 
channel.  Two options are available.

2.5.4.1.4.1	User-Specified
Selecting this causes Patchit to prompt you for the filter setting right now.  You are also 
asked if you want Patchit to prompt you for the filter setting when it saves your data to 
file.  This might be useful if you change the filter setting frequently during a recording 
session.

2.5.4.1.4.2	Read from Amplifier
This causes Patchit to determine the filter setting for this channel by reading it from a 
telegraph on your amplifier.  This will only work if your amplifier has filter telegraphs 
(voltage/serial outputs that correspond to the filter setting on the amplifier), and if the 
amplifier is supported by Patchit.  If you select this option you will be prompted for the 
type of amplifier that you are using.

2.5.4.1.4.2.1	Analog telegraph
If your amplifier is NOT the Axon GeneClamp 500 (analog voltage filter telegraphs), the 
amplifier configuration menu will have the following options:

2.5.4.1.4.2.1.1	Input Chan
Select the analog input channel that the amplifier's filter telegraph is connected to.  The 
filter telegraph is an analog output from the amplifier that supplies a voltage proportional 
to the amplifier's filter setting.
2.5.4.1.4.2.1.2	Query
Selecting this causes Patchit to read the filter setting from the specified amplifier on the 
specified channel.  This is done continuously and is displayed on the screen until a key is 
hit.

2.5.4.1.4.2.2	Serial telegraph
If your amplifier is the Axon GeneClamp 500 (serial filter telegraph), the amplifier 
configuration menu will have the following options:

2.5.4.1.4.2.2.1	Serial Port
Select the serial port that you are using to communicate with your GeneClamp.
2.5.4.1.4.2.2.2	Baud Rate
Select the baud rate that you are using for serial communications with your GeneClamp.
We recommend that if you use a mouse with Patchit that you set this baud rate at no 
greater than 1200.  At higher baud rates, mouse movement could cause a disruption of the 
serial string sent from the amplifier, possibly causing the filter to be read incorrectly.
2.5.4.1.4.2.2.3	Query
Selecting this causes Patchit to read the filter setting from the specified amplifier.  This is 
done continuously and is displayed on the screen until a key is hit.

2.5.4.1.5	Invert
Selecting this toggles the enabled/disabled state for whether or not data on this channel 
will be displayed inverted (upside-down).  This feature has been implemented for 
amplifiers (such as the Dagan 8900) that have a signal that is inverted (i.e. upside-down) 
relative to the desired convention for that signal.  If a channel of data is configured to be 
displayed inverted, then ONLY the display of this data will be inverted.  The raw data is 
recorded as it is sampled from the analog signal.  If you need to invert a channel for 
display, then the gain at which this data was recorded should be given a negative value.

2.5.5	Colors
When this option is selected a color demonstration window appears and a menu appears 
from which the user can select the colors of the various components of the Patchit screen.  
The various components are the menu bar, status line, popup boxes and data window.  
For menus, the user can control the background, text, frame and select letter colors.  For 
the status line, the user can control the background and text colors.  For popup boxes, the 
user can control the background, text and frame colors.  For the data window, the user can 
control the background, frame and axis colors as well as the colors for all available 
channels of data.
2.5.5.1	Menus
2.5.5.2	Status Line
2.5.5.3	Popup Boxes
2.5.5.4	Data Window  
When the user selects one of these menu options, another menu appears from which the 
user can select the color for the elements of the windows (i.e. frame color of popup 
window).  Clicking on an element will select the next available color for that element, 
this will be shown in the color demonstration window.  Typing the select letter of that 
element will do the same.  Holding the SHIFT key down while typing the select letter of 
that element will select the previous color for that element.  Select Okay when you are 
done setting the colors.
2.5.5.5	Use Defaults
When this option is selected, the colors of all of the elements of the Patchit display revert 
to their default settings.

2.5.6	Font
Selecting this option allows the user to specify the font that will be used by Patchit.  For 
all but the default font, the requisite font file (they have the extension ".chr") MUST be 
present in the same directory as Patchit.  An example of some text written in the selected 
font is displayed.

2.5.6.1	Font
Selecting this option allows the user to select the font family that will be used by Patchit.  
Eleven font families are available.  The default font is a bit-mapped font, the others are 
stroked (outline) fonts.
2.5.6.2	Height
Selecting this option allows the user to set the height of the font that will be used by 
Patchit.  If the selected font family is the default, bit-mapped font, the height and the 
width must be the same.
2.5.6.3	Width
Selecting this option allows the user to set the width of the font that will be used by 
Patchit.  If the selected font family is the default, bit-mapped font, the height and the 
width must be the same.

2.5.7	Sounds
Selecting this option allows the user to control aspects of the sounds that Patchit 
generates during its operation.  These are described below:

2.5.7.1	Sounds
Selecting this option toggles the state of whether Patchit will generate sounds.  When this 
is disabled Patchit will make no noise.

2.5.7.2	Type
Selecting this option allows the user to select the type of sound generation that Patchit 
will use, these are:

2.5.7.2.1	Single Tone
Patchit will always generate a tone of the specified frequency and duration (see below) 
for each data acquisition cycle.
2.5.7.2.2	Rising Scale
When the first record is acquired, Patchit will generate a tone of the specified frequency 
and duration.  For the next and each succeeding record, the tone generated will be of a 
successively higher frequency.
2.5.7.2.3	From A/D
Patchit will generate a tone for each record based on the value of a portion of the data.  
When this is option is selected the user is prompted for the channel of data from which to 
record the value and is then prompted for a value from 0 to 1.  This value tells Patchit 
from where in the record (0 is beginning, 1 is end) to read the value of the data on which 
to base the sound.

2.5.7.3	Frequency
Selecting this option allows the user to specify the frequency (in Hz.) of the tone.  If the 
sound type is "Single Tone", this is the frequency of that tone.  If the sound type is 
"Rising Scale", this is the frequency generated for the first record.  If the sound type is 
"From A/D", this is the frequency of the lowest A/D value, for this sound type, the user is 
also prompted for a frequency corresponding to the highest A/D value.

2.5.7.4	Duration
When this option is selected the user is prompted for the duration (in msec) of the tone.

2.5.7.5	Test
When this option is selected, Patchit demonstrates the tones that will be generated during 
given the currently selected options.  If the tone type is "From A/D", the demonstration 
plays the high and low frequency values over and over.

2.5.8	Miscellaneous
Selecting this option allows the user to control several very important aspects of Patchit's 
operation.  These are described below:

2.5.8.1	XMS Data Storage
Enabling this feature allows Patchit to use memory accessed via the XMS specification in 
order to store data acquired before writing it to disk.  XMS memory is memory above the 
1 MB boundary on PC-AT class computers (80286 and above class microprocessors).  
This memory can only be accessed if you have installed the XMS driver HIMEM.SYS 
(supplied free of charge by Microsoft), or a compatible XMS driver (e.g. Desqview's 
QEMM memory manager) in your config.sys file.  The use of XMS allows Patchit to 
store data above the conventional memory area, which allows more room for Patchit to 
work.  This feature need not be disabled unless you suspect a problem or else have other 
needs.

2.5.8.2	Time Correction
This enables/disables a feature that causes Patchit to correct for time lost during data 
acquisition cycles.  During data acquisition cycles, Patchit disables system interrupts, 
which stops the system clock from being updated.  As a result of this, the system time 
will slip.  If Time Correction is enabled, then Patchit will correct for this time slippage.  
NOTE that we have experienced problems with this under OS/2 (data file time stamps 
were set wrong).  So, this is why this feature can be enabled/disabled.  So, check it out 
carefully if you are running under a multitasking environment (note further that we have 
had no problems with this feature under Windows 3.x or 95).

2.5.8.3	Data overwrite warning
This enables/disables a feature that causes Patchit to warn you if you are about to perform 
an action that will overwrite unsaved data.  You will have the option to continue and to 
overwrite the data (in the buffer), or to cancel.

2.5.8.4	Startup Prm File
Selecting this option allows the user to specify the name of a parameter file to load 
whenever Patchit is started.  This feature allows the user to load a customized parameter 
set at startup.  If this file is not available at startup, Patchit will use a default set 
which may not be correct for your experimental configuration! (in particular the 
Output Scaling will almost certainly be wrong).

2.5.8.5	File Format
This allows the user to specify the file format used by Patchit.  Two options are available, 
the native "Patchit" file format, and the Clampex 5.2 format.  This latter format is used by 
pClamp and is useful for exchanging data.  Note that if you use the Clampex file format, 
records are limited to being no more than 2048 points in length (on all channels), and the 
total number of records is limited to no more than 64.  Also, the stimulus description may 
have to be simplified to fit into the Clampex file format.

Note 1:
The Clampex 5.2 file format supports only one active analog output (D/A 
channel) at a time.  If you are using only one analog output, then Patchit will 
store the information for that specific channel (be it channel 0 or 1) in the 
Clampex file.  If you are using both analog outputs, then Patchit will store the 
information for analog output channel 0 only.

Note 2:
The Clampex 5.2 file format supports only two binary outputs, and these can 
undergo only two transitions.  When storing a clampex file, Patchit stores the 
stimulus information for your first two binary outputs (starting from 0 up to 14) in 
the Clampex file.  So if you used binary outputs 0, 3, and 7, then only the 
information for binary outputs 0 and 3 will be stored in the file.

2.5.9	Write Config File
Selecting this option causes the current configuration data to be written to the Patchit.cfg 
configuration file.  All items that are controlled on the config menu are stored in this file 
as are all pulse generator parameters.

3.	Conclusion
We hope that you understand all of the features that have been described here and that 
Patchit serves you well.  We would appreciate your comments on the program and 
manual.  We always want to know about bugs in the program and will endeavor to fix 
them as speedily as is possible.  We also would value your suggestions for new features 
and ways to improve this program.  We try to thoroughly test all features and be sure that 
everything works properly, but we are not responsible for any loss of data or damage 
caused by this program.  We can be reached as follows: 

White Perch Software
84 Farnham St.
Belmont, MA  02178

www.ultranet.com/~ggrant/whiteperch	(world-wide web)
	
ggrant@ultranet.com			(e-mail)

4.	Appendix	
4.1	Hardware Configuration
4.1.1	Data Translation DT2821 Family Boards
4.1.1.1	Analog Outputs
Patchit uses both Analog Outputs on the DT2821.
4.1.1.2	Analog Inputs
Patchit uses all analog inputs on the DT2821.  Note the weird channel sequence used for 
DT2821 family boards with less than 16 inputs!
4.1.1.3	Binary Outputs
Patchit uses the two Binary Output ports on the DT2821 for binary (TTL) trigger outputs.  
Two of these are put to special use by Patchit.  Binary Output Port 1, Channel (bit) 7 and 
Binary Output Port 1, Channel (bit) 6, go to logic low and logic high, respectively, at the 
beginning of a record and return to logic high and logic low, respectively, at the end of a 
record.  These are useful for triggering oscilloscopes.
4.1.1.4	Triggering
For internal triggering, no special connection is necessary.  If you plan to use an external 
trigger, it should be connected to the external trigger input.  In order to use an external 
trigger, you must enable it in Patchit (see: Config:Hardware Config:Data Translation 
DT2821:Trigger Src.

4.1.2	Tecmar Labmaster Family Boards
4.1.2.1	General
The following connections must be made for Patchit to operate properly:
Source5-Out5-Start Convert
Gate5-Out4
4.1.2.2	Analog Outputs
Patchit uses both Analog Outputs on the Tecmar Labmaster.
4.1.2.3	Analog Inputs
Patchit uses all analog inputs on the Tecmar Labmaster.
4.1.2.4	Binary Outputs
Patchit uses two of the Parallel I/O ports on the Tecmar Labmaster for binary (TTL) 
trigger outputs.  These are Ports C and A.  Patchit numbers these binary outputs from 0 to 
15.  Patchit outputs 0-7 correspond to Port A, bits 0-7 and Patchit outputs 8-15 
correspond to Port C, bits 0-7.  Two of these binary outputs are put to special use by 
Patchit.  Outputs 15 and 14 (C7 and C6) go to logic low and logic high, respectively,  at 
the beginning of a record and return to logic high and low, respectively, at the end of a 
record.  These are useful for triggering oscilloscopes.
Note:
If you have a Labmaster DMA, ports A and C come configured as inputs (except 
Port C, bits 4-7).  If you want to use all sixteen binary outputs that Patchit offers, 
you will need to change a setting on the Labmaster DMA motherboard (if you 
choose not to do this, you will be limited to four binary outputs, 15-12).  The 
change that you need to make to the Labmaster DMA motherboard is to 
reconfigure the rest of ports A and C for outputs (this change will NOT affect 
pClamp).  Reseat chips USS1, USS2 and USS4 so that they are inserted in rows 2 
and 4 (in the same orientation as chip USS3).  Refer to your Labmaster DMA 
manual for this.
4.1.2.5	Triggering
An external trigger pulse should be applied to the binary input port B, Bit 2 (B2).  A 
rising edge trigger is expected (i.e., going from logic low to logic high).  In order to use 
an external trigger, you must enable it in Patchit (see: Config:Hardware Config:Tecmar 
Labmaster:Trigger Src).

