STM data acquisition program

The STM program performs data acquisition for the scanning tunneling microscope. PASCAL routines are used for controlling file i/o and handling menus for scan parameters, and ASSEMBLER routines are used for most of the communications with the A/D and D/A converters, parallel ports, and graphics devices.

Hardware Configuration:

The hardware configuration for the STM includes two Data Translation boards, configured as follows:
A/D 0 - (board 1, A/D 0) - topography
A/D 1 - (board 1, A/D 1) - tunnel current
A/D 2 - (board 1, A/D 2) - conductance (dI/dV)

D/A 0 - (board 1, D/A 0) - x scan voltage
D/A 1 - (board 1, D/A 1) - y scan voltage
D/A 2 - (board 2, D/A 0) - bias voltage (to sample)
D/A 3 - (board 2, D/A 1) - z offset voltage

parallel port from board 1:

bit 0 (out) - inchworm interface
bit 1 (out) - inchworm interface
bit 2 (out) - tunnel current hold
bit 3 (out) - tunnel current shunt
bit 4 (out) - inchworm interface
bit 5 (out) - inchworm interface

bit 0 (in) - xy swap
bit 1 (in) - rotation
bit 2 (in) - z amplification
bit 3 (in) - z amplification
bit 4 (in) - z amplification

The A/D and D/A converters used are all 16-bit, with a range of +/- 10 V. Thus, the smallest voltage increment is 20 V/2^16 = 0.305 millV.

Graphics devices include an old Tektronix 4006 terminal for displaying line scans for images and spectra, and a Imagraph card which displays grey-scale images on a 1024x1024 color monitor.

The memory capacity of the old IBM PC-AT used for the data acquisition is approximately 3 megabytes. This represents a limit on the amount of data which may be stored in a single data acquistion event. For example, when storing images, a 1024x1024 image will require 1 megaword = 2 megabytes (1 16-bit word = 2 bytes), which is no problem to acquire and store. However, acquiring two such images simultaneously would exceed the storage capacacity of the machine. In that case the user must use a smaller image size; about 1024x700, with two images (channels), can be acquired with the current memory limitation.

Data Storage Files:

Data storage is accomplished using binary arrays, with 2 bytes (1 word) per data point. Each data file is preceded by 20 words (40 bytes) of header information, which defines the scan parameters for the particular type of data. A partial listing of the data types and header information follows:
type 1 data file format:  20 integers followed by integer data of image

header:
=======================================================================================
|  1  | n_row | n_col | X_start |  dX	| Y_start |  dY   | Z_gain | speed | scan_cal |
|     |       |       |  bits	|  bits |  bits   |  bits |	   |	   |  pm/bit  |
=======================================================================================
============================================================================================
| i_cal   | z_cal  | direction	| orientation | vbias | v_cal  | nchan | nv | image | iexp |
| fA/bit  | pm/bit | 1=bi,2=uni | 1=xy,2=rot  |  bit  | uv/bit |       |    |	    |	   |
============================================================================================

z_cal = displacement of z piezo for gain of 100 on KEPCO /
	 voltage into KEPCO as read by a 16 bit, 10 V bipolar A/D

image type = 0	 standard image
	     1	 conductance image
	     10  first double image
	     11  second double image
	     20  topography for multiple i/v's
	     30  fast scan image
	     40+i  multiple images, i=image number

type 2 data file format:  20 integers followed by integer data of i/v curve
			  including scans up and scans down

header:
================================================================================
|  2  |  nv   |  2  | vstart | vstep   | speed | v_cal	| i_exp | i_cal  | nav |
|     |       |     |  bits  |	bits   |       | uv/bit |	| fA/bit |     |
================================================================================
==============================================================
| vbias | delay | z offset | niv  | zcal   | nchan  |  admax |
|	|  ms	|	   |	  | pm/bit |	    |	     |
==============================================================


type 3 data file format:  20 integers followed by integer data of s/v curve
			  including scans up and scans down

header:
================================================================================
|  3  |  nv   |  2  | vstart | vstep  | speed | v_cal  | z_cal	| z_gain | nav |
|     |       |     |  bits  |	bits  |       | uv/bit | pm/bit |	 |     |
================================================================================
==========================
| vbias | delay | i_cal  |
|	|  ms	| fA/bit |
==========================


type 4 data file format:  20 integers followed by integer data of i/z curve
			  including scans up and scans down

header:
=================================================================================
|  4  |  nz   |  2  | zstart | zstep   | speed | z_cal	| i_exp  | i_cal  | nav |
|     |       |     |  bits  |	bits   |       | pm/bit |	 | fA/bit |	|
=========================================================================== =====
=======================================
| vbias | delay | v1 | v_cal  |  sens |
|	|  ms	|    | uv/bit |       |
=======================================

type 5 data file format:  20 integers followed by integer data of dIdV/v curve
			  including scans up and scans down

header:
================================================================================
|  5  |  nv  |	2  | vstart | vstep   | speed | v_cal  | i_exp | i_cal	| sens |
|     |      |	   |  bits  |  bits   |       | uv/bit |       | fA/bit |      |
================================================================================
================================================================================
| vbias | delz2 | zstart | delz1 | zcal   | del  | admax | nav | nchan | zgain |
|	|	|	 |	 | pm/bit |	 |	 |     |       |       |
================================================================================


type 6 data file format:  20 integers followed by integer data of dIdV/z curve
			  including scans up and scans down

header:
=============================================================================
|   6	|  nz	|  2  | zstart | zstep	 | speed | z_cal  | i_exp  | i_cal  |
|	|	|     |  bits  |  bits	 |	 | pm/bit |	   | fA/bit |
=============================================================================
=============================================
| nav  | vbias | delay | v1 | v_cal  | sens |
|      |       |  ms   |    | uv/bit |	    |
=============================================


type 7 data file format:  20 integers followed by current image

header:
=======================================================================================
|  7  | n_row | n_col | X_start |  dX	| Y_start |  dY   | Z_gain | speed | scan_cal |
|     |       |       |  bits	|  bits |  bits   |  bits |	   |	   |  pm/bit  |
=======================================================================================
===========================================================================================
| i_cal   | z_cal  | direction	| orientation | vbias | v_cal  | nv  | ... | image | iexp |
| fA/bit  | pm/bit | 1=bi,2=uni | 1=xy,2=rot  |  bit  | uv/bit |     |	   |	   |	  |
===========================================================================================


type 8 data file format:  20 integers followed by conductivity image

header:
=====================================================================================
|  8  | n_row | n_col | X_start |  dX	| Y_start |  dY   | sens | speed | scan_cal |
|     |       |       |  bits	|  bits |  bits   |  bits |	 |	 |  pm/bit  |
=====================================================================================
===========================================================================================
| i_cal   | z_cal  | direction	| orientation | vbias | v_cal  | nv  | ... | image | iexp |
| fA/bit  | pm/bit | 1=bi,2=uni | 1=xy,2=rot  |  bit  | uv/bit |     |	   |	   |	  |
===========================================================================================

Spectroscopy:

In addition to regular image data, the STM program handles several types of spectroscopy data, and it also combines spectroscopy with images in a variety of modes of spatially resolved spectroscopy. The simplest types of spectroscopy is current vs voltage, which can be performed using specified z-offsets for the I(V) curve. One can simultaneously measure the conductance (dI/dV) vs voltage. This is generally done by also specifying a V-shaped ramp in the z direction, to maximize the dynamic range of the measurement. (An obsolete type of spectroscopy involves using other functional forms for z(V) during the spectral measurement). The spectra can be combined with spatial imaging in various ways: (1) as a grid of points on an image, where the spectra are acquired, (2) at specific points in the image, indicated by hitting the "hot key" during the image acquisition, and (3) as a line of spectra, measured across the center of an image (i.e. the bottom half of the image is acquired, followed by the line of spectra, followed by the top half of the image).

Recovering Data:

Data storage is performed following each mode of acquisition, generally by the user being prompted by "store data? (y/n/r)". Here, the "y" (yes) option will store the data, and the "n" (no) option will not. The "r" (recover) option is a special one designed to recover data which was mistakenly not stored in a prior measurement. For example, the user might mistakenly press "n" and not store the data, or perhaps the storage device is full so that the data is not stored, or some other exceptional circumstance causes the program to exit. In those cases, the data is still residing in the computer memory, at some fixed location, and the user must just correctly instruct the program to go and store that data. This is done by re-entering the same data acquisition mode, and entering precisely the same scan parameters as before. The user then starts the scan, and once it starts then hits the ESC key to abort it after one or two line scans. The program will then respond with a "store data? (y/n/r)" query. The user specifies "r", and the program requests the number of rows of data to store. The user enters the number of rows of data in the original data acquisition, and that data is then stored.

Menus:

Scan parameters are specified using menus. There is a main menu, which directs the user to a variety of other menus for performing the desired type of data acquisition. A listing of each menu, including definition of the scan parameters, are contained in the following links:

Obsolete Software:

A number of routines in the /stm directory are obsolete, due to changes in hardware configuration over the years. Some of the old routines refer to a Dadio or Labmaster board, which are old data acquisiton boards. Other routines are for an old graphics board called number-nine. A variety of routine for spatially resolved spectroscopy using specialized forms of the z(V) function exist, but are not currently used. Finally, a number of routines refer to "didv" spectroscopy; these are all superseded by new routines which use the term "liv" spectroscopy in their filenames.