United States
Environmental Protection
Agency
Environmental Sciences Research  EPA 6OO 2 79 140
Laboratory         August 1979
Research Triangle Park NC 27711
Research and Development
Implementation  of a
Microcomputer-
Modified  Electrical
Aerosol Analyzer

-------
                 RESEARCH REPORTING SERIES

Research reports of the Office of Research and Development. U S. Environmental
Protection Agency, have been grouped into nine series. These nine broad cate-
gories were established to facilitate further development and application of en-
vironmental technology  Elimination of traditional grouping was consciously
planned to foster technology transfer and a maximum interface in related fields.
The nine series are:

      1.   Environmental  Health Effects Research
      2.   Environmental  Protection Technology
      3.   Ecological Research
      4.   Environmental  Monitoring
      5.   Socioeconomic Environmental Studies
      6.   Scientific and Technical Assessment Reports (STAR)
      7.   Interagency  Energy-Environment Research and Development
      8.   "Special" Reports
      9.   Miscellaneous Reports

This report has been assigned to the ENVIRONMENTAL PROTECTION TECH-
NOLOGY  series. This series describes research performed to develop and dem-
onstrate instrumentation, equipment, and methodology to repair or prevent en-
vironmental degradation from point and non-point sources of pollution. This work
provides the new or improved technology required for the control and treatment
of pollution sources to meet environmental quality standards.
This document is available to the public through the National Technical Informa-
tion Service, Springfield, Virginia  22161.

-------
                                            EPA-600/2-79-140
                                            August 1979
 IMPLEMENTATION OF A MICROCOMPUTER-MODIFIED

         ELECTRICAL AEROSOL ANALYZER
                     by
             Charles W. Lewis
 Atmospheric Chemistry and Physics Division
Environmental Sciences Research Laboratory
Research Triangle Park, North Carolina 27711
 ENVIRONMENTAL SCIENCES RESEARCH LABORATORY
     OFFICE OF RESEARCH AND DEVELOPMENT
    U.S. ENVIRONMENTAL PROTECTION AGENCY
RESEARCH TRIANGLE PARK, NORTH CAROLINA 27711

-------
                                   DISCLAIMER

     This  report has  been reviewed  by the  Environmental Sciences  Research
Laboratory,   U.S.    Environmental   Protection   Agency,   and   approved   for
publication. Mention of trade names or commercial products does  not constitute
endorsement or recommendation for use.

-------
                                   ABSTRACT

     A  commercial  electrical  aerosol  analyzer  has  been  modified  through
addition of a digital voltmeter, a microcomputer and a printer.   In unattended
operation  the  system can  acquire  a differential  particle  size distribution,
print   and  plot   the  resulting   spectrum   in   any   of  three   possible
representations, and repeat the cycle at preselected intervals.

     Details of the system  assembly and  instructions  for  its operation  are
given.  The  appendices  contain a flow chart and documented  listing of Program
EAA, the microcomputer program which operates the system.

     This  reports  covers  a period from March 1978 to March  1979,  and work was
completed  as of March 31,  1979.
                                       111

-------
                                    CONTENTS


Abstract	   iii
Figures	    vi
Tables	   vii
Acknowledgements 	  viii

     1.  Introduction	     1
     2.  System Description	     2
     3.  System Assembly 	     8
     4.  Operating Instructions	    11

References	    15

Appendices

     A.  Program EAA Flow Chart	    16
     B.  Program EAA Listing	    21

-------
                                     FIGURES



Number                                                                     Page



  1       Aerosol system block diagram 	     3



  2       Result of an ambient indoor aerosol measurement	     7
                                       VI

-------
                                     TABLES


Number                                                                     Page

  1       Transformation Factors for Number, Surface and
          Volume Representation of EAA Measurements	    6

  2       Input/Output Connections 	    9

  3       Program Alterations to Change Baud 	   10

  4       Program Alterations for Case of Unconventional
          Sign Bit	10

  5       Program Alterations for Choice of Output Representation	   13

  6       Program Alteration for Choice of Output Frequency	13

  7       Program Alteration to Suppress Histogram Plotting	14
                                       vn

-------
                                ACKNOWLEDGEMENTS
     The support given to this project by Robert K.  Stevens, Chief, Inorganic
Pollutant Analysis Branch, and the superior efforts  of Ruth Barbour on a
demanding manuscript are both happily acknowledged.
                                     viii

-------
                                    SECTION 1

                                  INTRODUCTION
     The electrical aerosol analyzer (EAA) has become a popular instrument for
measuring   submicron  aerosol   size   distributions   since   its   commercial
introduction  in  1967.    By exploiting  the  known  dependence of  electrical
mobility on particle  size,  such instruments permit  the  real time measurement
of  aerosol  particle  size  over at  least  2 decades  of the  range below 1 |jm.
While the importance  of the EAA to aerosol studies is well recognized, certain
features  of the  EAA  remain  to  be improved.   Of  particular concern  in the
present commercial version  (Model 3030, TSI, Inc.) is the need for an operator
to  manually record the  sequence of electrical  currents produced  during the
instrument's measurement  cycle,  and then to perform  a  series of  arithmetical
steps which convert the currents to the  corresponding  aerosol size spectrum.

     To  solve   this   limitation  the  EAA  could   be   supplemented   with  a
minicomputer  and  related  peripherals  to perform  data input, reduction and
output  functions.   Such  a  system,  however, is  relatively  expensive  and less
portable than may be  desired.  In the following we show how the same objective
can  be  accomplished  at  much less  expense  by means  of a microcomputer-based
addition  to   the   EAA.    The  addition  consists  of  unmodified  commercial
components,   including   a   $180   microcomputer,   a  digital  voltmeter,   a
teletypewriter  or  equivalent,  and  an  optional  audio cassette recorder.   (A
well-equipped  laboratory may already possess  some  of these instruments.)  In
unattended  operation  the   resulting  system  is  able  to  (1)   acquire  a
differential  size  distribution  over 10  intervals  of equal  logarithmic size
between 0.0032 and  1  |Jm diameter; (2) print and plot the distribution directly
in  a  number,  surface  or  volume representation;  and  (3)  repeat  the  cycle
indefinitely at a selectable frequency.

     A  condensed  description  of  the  system  described  in  this  report  is
available elsewhere (Lewis  1979).  The material in Sections 3 and 4 and in the
Appendices  of  the  present report  has  not  been  published  previously,  and
contains  those  details  required  to  actually  implement  and  operate  the
microcomputer-modified system.

-------
                                   SECTION 2

                              SYSTEM DESCRIPTION
HARDWARE

     A  block  diagram  of  the  assembled  system is  shown  in  Figure  1.  The
unmodified  EAA consists of the two  components  shown within the dashed box —
the  aerosol analyzer itself and its control module.  In operation the control
module  causes  the analyzer  to generate  a fixed  time sequence  of internal
electric  fields  during a  2-min cycle.  Aerosol entering  the  analyzer first
becomes  electrically charged and then is  subjected to the particular electric
field  present  at the  time of passage.  Depending  on the magnitude  of the
electric  field,  only  those aerosol particles larger than  a minimum size are
able to  pass  through  the  analyzer  and  contribute  to a  measurable aerosol
current  ("analyzer current").  Normally the control module is the component
that measures the analyzer  current sequence  (whose values constitute the basic
data output  of  the  EAA)  and  presents the measured values visually  to the
operator.  In the modified system, however, the current measuring and recording
functions   are performed  by  the  additional  components  shown  in Figure  1
outside  the dashed box.  Each of these components is described below.

Digital Voltmeter

     The  analyzer currents, available at  an external coaxial connector on the
EAA, are fed directly to the  input of  a laboratory digital voltmeter (DVM).
(Although the signal of interest is  referred to  as a current, the EAA actually
converts  it  internally  to  a voltage.)   The  DVM  is  conventional  in  all
respects, but it must have  the following capabilities  (1) a resolution of at
least  3% digits,  with a full  scale reading of at least  ±1  volt,  and (2) a
binary coded decimal (BCD)  output, generating normal TTL positive-true voltage
levels.  The  BCD  output  is a  common  interface  type provided  by  some  DVM
manufacturers as  an option  for  their instruments.  Unfortunately, the DVM used
in the EAA  control module does  not have  this capability, resulting in the need
for  the   additional  DVM  discussed  here.   Because  of   availability,  the
particular  instrument  used  in  this study was  the  5% digit multimeter Cimron
Model DMM51  (California  Instruments, Inc.).

Microcomputer

     A  KIM-1  microcomputer  (Commodore/MOS, Inc.)  was used  to  control  the
following:  acquisition  of  analyzer  currents  from   the  DVM,  arithmetical
manipulation  of the current values, and  output of the computed aerosol

-------
                                                    —I
                       EAA
                         EAA
                       CONTROL
                       DVM
  DATA
TERMINAL
                        ]__£
                                             	I
MICROCOMPUTER
 AUDIO
CASSETTE
             Figure 1.  Aerosol system block diagram.

-------
size  distribution  spectrum.    The KIM-1  comprises  all  the  elements  of  a
full-fledged  computer  (a  central  processing unit, memory,  and input/output
Interface  circuitry),  assembled  on  a single  21- by  26-cm  printed  circuit
board. Details of the microcomputer have been described in earlier work (Lewis
and Lamothe 1978).
                             \

Data Terminal

     A  serial 20-mA  current  loop interface is an  integral  part of the KIM-1
microcomputer.  Thus,  the  most  obvious  choice  for  an  output device  is  a
conventional   teletypewriter   because  of   its    frequent   availability  in
laboratories.    However,   newer   teletypewriter   "equivalent"  devices  are
attractive  on  the  basis  of  competitive  cost,  compactness,  quietness,  and
higher  speed  operation.  (The microcomputer will  operate  up to at least  1200
baud.)   One device that has proved satisfactory in operation with the present
system  is  the Model  743 data terminal  (Texas Instruments,  Inc.).  Any  such
teletypewriter "equivalent"  device  should be  chosen with  a  "mark" parity
 (rather than either "even" or  "odd"  parity)  option for compatibility with the
KIM-1 microcomputer.

      Newer  data   terminals  are   more commonly   equipped   with an  RS-232-C
 interface rather  than the older 20-mA current loop  interface.   A data terminal
with an  RS-232-C  interface  can  also be  used in the system,  if  a current
 loop/RS-232-C converter is inserted  between  the KIM-1  and the  data terminal.
One such converter which has  been used without problems is the Model 312A  0566
TTY port interface adapter (United Data Services Company,  Inc.)

Audio Cassette Recorder

      The KIM-1 microcomputer program which operates the system of Figure  1 is
 stored  in volatile memory.  This means that  whenever the microcomputer power
is switched off  the  program  is lost  and must be reloaded  before the next  use.
The only  function of the  audio  cassette recorder is  to provide a convenient
means of  performing the load  operation.  Many inexpensive  cassette recorders
exist that are suitable  for  this use. A cassette recorder  is unnecessary, of
course,  if a  teletypewriter with   paper tape  punch and  reader is chosen  as the
data terminal,  since the program  may  then be  loaded from paper tape.

SOFTWARE

      A  flow diagram  and listing  of  the microcomputer  program (Program  EAA)
which controls the  operation of  the system are  included as  Appendices. The
program  is organized  into three  segments:   acquisition,  transformation, and
output —  each  of which is  described  below.

-------
Acquisition

     The  acquisition  segment  transfers  a DVM  reading  to the microcomputer
memory upon  command.   The EAA control module  sends the  command via its "Read"
signal, which  is received on the Interrupt Request line of the microcomputer.
This  causes  the "Data  Ready"  line  from the BCD  output of  the DVM  to be
repeatedly scanned by  the  microcomputer until the appearance  of  a signal on
this  line  indicates that a new DVM measurement value is  available.   (Typical
DVM  measurement  frequencies  are  several per second.)   Fourteen data bits,
representing 3% binary coded digits  and  algebraic  sign, are then immediately
transferred  to  the microcomputer  memory for  storage,  and the microcomputer
awaits  the  next "Read"  signal.    The  end  of the  EAA  measurement  cycle is
recognized by  the number  of "Read"  signals which have occurred.

Transformation

     Upon  completion  of  an EAA  cycle,  the  transformation  segment  of  the
program performs the same set of computations that an operator would normally
perform  to  calculate  the aerosol size  distribution.   That  is, successive
stored readings are subtracted, and the differences are  multiplied by a set of
pre-stored transformation constants.  Any one of three  sets  of constants may
be  selected,  corresponding  to  the  aerosol  size distribution  expressed  in a
number, surface, or volume representation.  The transformation constants given
in  Table  1  were  taken  from  the  (inverse)  sensitivities  for  monodisperse
aerosols  tabulated  by Liu  et  al.   (1976).   This tabulation is  a "smoothed"
version of earlier sensitivity data  given by  Liu and Pui (1975) and judged to
be  a slightly more realistic calibration than that provided  by the earlier
unadjusted data.  The values in  Table  1  and those of Liu et al. (1976) differ
by  a factor 4,  because  the quantity Alog D  is incorporated into the values of
Table  1.

      During  the subtraction step,  two  cases of  invalid  data are recognized by
the  program:  (1)  an overrange reading  from  the DVM,  and (2)  a  DVM reading
larger  than the preceding one.   In  either  case, the  content of the affected
size intervals  will be  arbitrarily set to zero  by the program.   Since the
effect  of  an  overrange  condition  on   the   BCD  output  will  vary  with the
manufacturer,   a programming change  may  be  necessary,  depending  on the DVM
used.   Similarly, some manufacturers may reverse the normal convention that a
positive  DVM  reading  sets the sign  bit  of  the positive-true BCD output. The
simple   program  modifications   which  will   accommodate  either  of  these
circumstances  are discussed  in Section  3.

Output

      The  transformed data are printed on  the teletypewriter (or equivalent) in
a table that lists  the 10 values  of average  particle diameter and  the value of
the  aerosol number,  surface,  or volume  (in  4-place, floating-point, decimal
form)  corresponding to each  diameter. The table  is preceded by a character  (N,
S,  or V)  which identifies the choice  of representation for the  aerosol  size
distribution.   A histogram  plot  can also be  printed simultaneously with the

-------
        TABLE  1.  TRANSFORMATION FACTORS FOR NUMBER, SURFACE, AND VOLUME
                       REPRESENTATION OF EAA MEASUREMENTS*
D
(1*0

0.00422
0.00750
0.0133
0.0237

0.0422

0.0750
0.133
D.237
0.422
D.750
*N = number,
AN/AlogDAv
(cm"3 volt"1)
10
0.130 x 10
0.344 x 108
0.140 x 107
0,716 x 106
f.
0.368 x 10
f.
0.189 x 10
0.972 x 105
0.496 x 105
0.255 x 105
0.131 x 105
S = surface, V =
AS/AlogDAv
(jjm2 cm'^olt"1)
S
0.720 x 10
0.608 x 104
0.780 x 103
0.127 x 104
A
0.206 x 10
A
0.334 x 10
0.540 x 104
0.880 x 104
0.143 x 105
0.231 x 105
volume, D = diameter
AV/MogDAv
(pro cm volt )
2
0.504 x 10
0.760 x 101
0.173 x 101
0.500 x 101
2
0.145 x 10
2
0.417 x 10
0.120 x 103
0.346 x 103
0.100 x 104
0.289 x 104

 numerical results as a visual  aid.   As an example, Figure 2 shows the result
 of a  volume  distribution  measurement performed  on  indoor  aerosol  in our
 laboratory.

     With a  teletypewriter operating  at  only 10  characters/sec,  a printout
 generally cannot be  completed before the first DVM  reading must be taken in
 •the  next  EAA  cycle.   The  interrupt  structure  of  the program  solves  this
 problem  automatically by temporarily  suspending output until  the DVM reading
 has been taken.

     Data  are accumulated  automatically and  continuously  from one EAA  cycle
 after another by  the microcomputer program.  The operator, however, can choose
beforehand to  print only one of every N cycles, where  N is variable between 1
and 255.   Thus, a frequency of measurement  is possible from once per 2 min to
once per 8%  h.  The means  by  which any of  the output  options may be selected
are discussed in  Section 4.

-------
 V
 .004    .0000   004
 .008    .0084   00*
 .013    .0512   004
 ,024    .5871   004
 .042    .4658   004
 .075    .3410   014444
 .133    .2332   024444444444444^4444444444
 .237    .3224   0244444444444444444444444444444444
 .422    .2307   02MWMMM4HO44444444
 .750    .1861   02MMMMMM+M4444
Figure 2. Result  of  an  ambient  indoor  aerosol  measurement,  illustrating
        tabular and histogram outputs.  The first column lists the average
        particle diameter (in |jm), while the second and third  columns give
        the corresponding volume distribution values AV/AlogD  (in |Jm /cm )
        as a fraction and power of  10, respectively.

-------
                                    SECTION 3

                                 SYSTEM ASSEMBLY
ELECTRICAL CONNECTIONS

     Details  of the connections between the KIM-1 microcomputer and the other
system components are listed in Table 2.  The microcomputer and DVM are joined
by a  16-conductor  connection  (14 data inputs for 3%  binary  coded digits and
polarity, a "data ready" input, and a ground line).  The microcomputer and EAA
control module are joined by a connection between the Interrupt Request input
of the former and the  "Read" terminal  of the latter,  in addition to a ground
connection.   (It  is  essential  that the  internal jumper  of the  EAA control
module be set to the FAL  position to  provide a negative-true logic signal at
the "Read" terminal.)   Two 4-line  connections link the data terminal and audio
cassette recorder  (optional)  to  the  appropriate  microcomputer  ports.   All
connections  are simple passive ones, since all active circuitry necessary for
the microcomputer to transfer information to and from the indicated devices is
an integral  part of the microcomputer  itself.  The only connection which does
not involve  the microcomputer is  a  coaxial  cable from the "Analyzer Current"
connector of  the EAA to the input  of the DVM.

PROGRAM MODIFICATIONS

     Up to three modifications  of Program EAA may  be required, depending on
the baud  requirement   of  the  data  terminal and  the overrange  and polarity
characteristics  of the  DVM.  Although such changes can be made each time after
the program   is  loaded  but before its execution has been  started, it is more
convenient  for  the  user  to  produce  a new  program tape  with  the changes
incorporated  permanently.   The  user should consult the documentation supplied
with the KIM-1  for  the procedures  to generate  new paper or magnetic tapes.

Data Terminal Baud

     Program  EAA causes the bit rate (baud) for the system's output device to
be  set  at the beginning of the program's execution.  In the current version of
the  program,  the baud  is set  to 300  (30  characters/sec) in  this  step.  It
should  be appreciated that any baud setting entered in addresses 17F2 and 17F3
before  program execution  has  begun will be  overwritten  at  this  time.   If a
baud setting  different  from 300 is required for a specific data terminal, the
contents of two KIM-1 addresses must be altered according to Table 3.

-------
                      TABLE 2.  INPUT/OUTPUT CONNECTIONS
Microcomputer
connector pin
I/O port
designation
I/O signal
A-A
A-14
A-4
A-3
A-2
A-5
A-6
A-7
A-8
A-9
A-10
A-11
A-12
A-13
A-16
A-15
E-4
A-R
A-S
A-T
A-U
A-l*
 A-L
 A-M
 A-N
PAD
PA1
PA2
PAS
PA4
PAS
PA6
PA7
PBO
PB1
PB2
PBS
PB4
PBS
PB7
IRQ
  BITJ
  BITJ
  BIT!
                         OPTIONAL:
+5 VDQ
1
2
4
8 BIT'
1 BIT
2 BIT
4 BIT
8 BIT
I BIT
2 BIT
4 BIT
8 BIT
1 BITS
POLARITY (DVM)
DATA READY (DVM)
READ (EAA CONTROL MODULE)
TTY KEYBOARD (+)
TTY PRINTER (+)
TTY KEYBOARD (-)
TTY PRINTER (-)
GROUND (FOR DVM, EAA READ,
AUDIO RECORDER, +5 AND +12VDC)

AUDIO IN (EARPHONE JACK)
AUDIO OUT (MICROPHONE JACK)
+12 VDC
 *A  jumper  wire  must connect pins  A-l  and  A-K.  Also  if  the teletypewriter
 keyboard,  instead of the microcomputer keyboard,  is  used  as the  input  device
 a jumper wire must connect pins A-21  and  A-V.
 tLeast significant BCD digit from DVM.
 §Most  significant BCD digit from  DVM

-------
                   TABLE 3.  PROGRAM ALTERATIONS TO CHANGE BAUD
                                     Baud

              110300*6001200240048009600
 Address
 0105          80        E9        74        38       1A          06        03
 01OA          02        00        00        00       00          00        00


 "default

       In   principle   the   KIM-1  should  be  able  to  adjust  itself  to  the
 requirements  of an arbitrary data terminal through a "RESET/RUBOUT" sequence,
 as  described  in the KIM-1 documentation. This feature has not proven reliable,
 however,  and  hence the alternative procedure given above.

 DVM Overrange

       Program  EAA  recognizes an overrange condition of the DVM by comparing the
 two  leading  digits  of  every  DVM  reading  to  a  prestored  characteristic
 overrange pattern. In the current version of the program, the pattern  is "12",
 corresponding  to  the  DVM overrange  reading,   "1.200  volts".   Other common
 overrange conditions are 1.999 and 0.000, depending  on the DVM manufacturer.
 For Program EAA  to  function correctly, the proper two  digit pattern for the
 particular DVM  must be entered at address OOE5.

 DVM Polarity

       Program  EAA assumes that a positive signal input to the DVM will set the
 sign  bit  of  its positive-true  output.   In the  unlikely event  that  the DVM
 operates  on an opposite  convention for  the sign bit,  the contents  of three
 addresses must  be altered, as given in Table 4.


        TABLE  4.   PROGRAM ALTERATIONS FOR CASE OF UNCONVENTIONAL SIGN BIT
Address             Normal Content           Altered Content


0054                     FO                        DO

0067                     DO                        FO

0089                     DO                        FO
                                       10

-------
                                    SECTION 4

                             OPERATING INSTRUCTIONS


PROCEDURE

1.   Power  on all system  components (EAA, EAA Control, DVM,  KIM-1 and Data
     Terminal).

2.   Load  Program EAA  into  KIM-1  from  paper tape  or audio  cassette tape:

     A.   Paper Tape

          1.   Set teletypewriter to LINE position.

          2.   Set teletypewriter baud  to 110 by setting KIM-1 address 17F2 =
               80 and address  17F3 = 02.

          3.   Switch from KIM-1 keyboard to teletypewriter by connecting pins
               A-21  and  A-V,  and  observe "KIM  XXXX  XX"  to  be printed  by
               teletypewriter.

          4.   Place  leader portion of  paper tape  in reader.  Type  L.  Move
               reader switch  to START position to begin reading tape.

          5.   When  the end  of the tape  is  reached,  "KIM XX XXXX"  will  be
               printed  if the  read operation has been successful.

          6.   Disconnect  pins  A-21 and  A-V  to  reactivate KIM-1  keyboard.

     B.   Audio Cassette Tape

          1.   Plug  Audio  In connector  from KIM-1  into  Earphone  socket  of
               audio  cassette recorder.  Make  certain that Microphone socket
               is unoccupied.  (Conversely, when recording,  check that Earphone
               socket   is  unoccupied.)  Rewind  and  adjust  volume  control  to
               about half scale.

          2.   Set  address OOF1  =  00  and address  17F9 = previously chosen
               identification number for the program.
                                      11

-------
          3.    Select address 1873,  and depress KIM-1 "GO" key.

s          4.    Depress  Play  button  on  recorder.   When the  KIM-1  display
               relights showing  "0000 xx," the program has  been successfully
               loaded. Disconnect recorder.

3.   For the  EAA,  adjust all  flow rates  and check Ionizer Current,  Ionizer
     Voltage and switch in Externally Programmed position.

4.   If  the  DVM  has both  auto  ranging  and  manual operation  modes,  select
     manual mode.   Select the "1 Volt  DC" scale of the  DVM and position the
     decimal point to the right of the left-most digit (i.e., X.XXX)

5.   Depress "CONT. RUN", "ALL", "CURRENT", and "RESET" buttons on EAA Control
     module.

6.   Modify the KIM-1 program according to which output features are desired.
     (See  USER OPTIONS  below.)   Make  any further  program  changes required.
     (See SYSTEM ASSEMBLY.)

7.   Select  address  0100,  and depress the KIM-1 "GO"  key to  begin  program
     execution.

8.   Depress "START/STEP" button on EAA Control module.

9.   To stop program  execution depress the KIM-1 "ST" key.

10.  To restart program execution depress "RESET" button on EAA Control module
     and repeat steps 7 and 8.
                                     12

-------
USER OPTIONS

Number, Surface and Volume Representations

     The  contents  of addresses 0022 and 0023 determine the output form of the
size  distribution,  as given  in  Table  5.   The output will  be preceded by the
letter   "V",   "N",   or
representations, respectively.
          identifying  volume,   number,  and   surface
        TABLE  5.   PROGRAM ALTERATIONS  FOR  CHOICE  OF  OUTPUT REPRESENTATION
Address
Content
Output Choice
 0022
 0023

 0022
 0023

 0022
 0023
FE
02

F6
02

06
03
vo1ume*     ,   ,
dV/DlogD, urn /cm

number        ~
dN/dlogD, I/cm

surface     2   3
dS/dlogD, urn /cm
 *default
 Output Frequency

      The frequency  of printed  output may  be  controlled by  the  content of
 address OOE4,  as given in Table  6.  Note that  the  output  frequency is specified
 as  a  hexadecimal number.   Thus  for  example  if one wishes  to  output every
 twentieth cycle, address  OOE4 should contain  14 (14..,. =  20  ).
                                      13

-------
          TABLE 6.   PROGRAM ALTERATION FOR CHOICE OF OUTPUT FREQUENCY
    Address
Content
Effect
    OOE4
                  16
               output occurs once per N-..fi EAA cycles
    ^default = 01 (output every cycle)
uppress Plotting

    Histogram  plotting  to accompany  the tabular output  of  the aerosol size
distribution may be selected or omitted, according to the content of addresses
3B4, 03B5 and 03B6, as given in Table 7.

          TABLE 7.  PROGRAM ALTERATION TO SUPRESS HISTOGRAM PLOTTING
    Address
Content
Effect
03B4
03B5
03B6
03B4
03B5
03B6
20
DO
03
EA
EA
EA
Plotting selected*


Plotting suppressed


    *default
                                    14

-------
                                   REFERENCES

Lewis, C.W.  1979.   A  Microcomputer-Modified Electrical Aerosol  Analyzer.  J.
     Aerosol Sci. (to be published).

Lewis, C.W.  and P.J.  Lamothe.  1978.  A  Microcomputer-Modified  Particle Size
     Spectrometer. J. Aerosol Sci. 9:391-397.

Liu, B.Y.H.  and D.Y.H.  Pui.   1975.   On  the Performance  of the  Electrical
     Aerosol Analyzer.  J. Aerosol Sci.  6:249-264.

Liu, B.Y.H., D.Y.H.  Pui,  and A.  Kapadia.  1976.   Electrical Aerosol Analyzer:
     History,  Principle and  Data Reduction.  Particle  Technology  Laboratory
     Publication No. 303, University of Minnesota, Minneapolis.
                                      15

-------
                           APPENDIX A

                     PROGRAM EAA FLOW CHART
                                                  PROGRAM EAA (1)
 c
MAIN
C
DEL
                      c
                     START
                       SUBROUTINE DELTA
                           COMPUTE
                    NEXT VOLTAGE DIFFERENCE
                                                  MAIN
                                                  MAIN
                                                   DEL
                                                    J
                             16

-------
                                                     PROGRAM EAA (2)
c
CHAR
>
                              ENTR2
                             PRINT "V"
c
CALL
                          MULTIPLICATION
                          INITIALIZATION
1
f

1

SUBROUTINE FPM
MULTIPLY CONTENT OF
NEXT SIZE BIN
BY VOLUMETRIC FACTOR
                                                      CALL
                         17

-------
                             SORT
                                                                         PROGRAM EAA (3)
                         SEARCH ALL SIZE
                        BINS FOR LARGEST
                           EXPONENT
C
c
 TRV
RDUCE
                             EXP =
                       LARGEST EXPONENT
                       RESET SIZE BIN INDEX
~>
                                             C      "V      )    [
                                                                                                RDUCE
                                                                                YES
                                                                 INCREMENT EXP

                                                                           OUTPUT

-------
                                                   PROGRAM EAA (4)
                       C
OUTPUT
J
                               I
                            INITIALIZE
c
                  ft
                           PRINT NEXT
                            SIZE BIN
                          AND CONTENT
                         SUBROUTINE PLOT
                        ADJUST BIN CONTENT
                      TO HAVE EXPONENT = EXP
                        ANB PLOT RESULTING
                          HI ORDER BYTE
                                                     LINE
                            19

-------
                                                     PROGRAM EAA (5)

-------
                                  APPENDIX  B
                              PROGRAM  EAA LISTING
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
0000
0002
0004
0006
0008
OOOA
OOOC
OOOE
0010
0012
0014
0016
0018
0019
001C
001E
0020
0021
0024
0027

0028
0029
002A
002B
002C
002D
002E
002F
A5 2B MAIN
C9 16
DO FA
A9 00
85 2B
C6 29
DO F2
A5 E4
85 29
AO 00
A9 ID
85 2A
F8
20 30 00 DEL
CO 14
DO F9
D8
4C FE 02
XX XX XX
XX TIMER
t
XX EXP
XX SKIP
XX CHAN
XX STEP
XX MLO
XX MHI
XX NLO
XX NHI
LDA STEP
CMP #16
BNE MAIN
LDA #00
STA STEP
DEC SKIP
BNE MAIN
LDA FREQ
•: STA SKIP
LDY #00
LDA #10
STA CHAN
SED
JSR DELTA
CPY #14
BNE DEL
CLD
JMP ENTR2











                                                    MAIN WAITING LOOP

                                                    END OF ACQUISITION CYCLE?
                                                    YES
                                                    RESET STEP = 0

                                                    CYCLE TO BE NEGLECTED?
                                                    NO
                                                    RESET SKIP = FREQ
                                                    CHAN = 291Q

                                                    COMPUTE DIFFERENCE

                                                    ALL DIFFERENCES COMPUTED?
                                                    YES, CLEAR DECIMAL MODE AND
                                                    GO TO PRINT ASCII LETTER
                                                    UNUSED
                                                    NINE TEMPORARY STORAGE
                                                    ADDRESSES
                                       21

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
0030
0031
0034
0035
0036
0038
003A
003C
003D
0040
0043
0044
0046
0048
004A
004D
004E
0051
0052
0054
0056
0058
005B
005D
005E
005F
0061
0063
0064
0065
0067
0069
0.06C

C8 DELTA
B9 IE 02
C8
C8
25 E5
C5 E5
DO 04
88
4C 90 00
B9 IE 02 NO
88
25 E5
C5 E5
DO 03
4C 90 00
88 NORMAL
B9 IE 02
88
24 E6
FO 19
A2 00
B9 IE 02 RPT
95 2C
C8
E8
EO 04
DO F5
88
88
24 E6
DO 22
20 CO 00 ADD
4C A3 00

I NY
LDA DMM, Y
INY
I NY
AND OFFSCL
CMP OFFSCL
BNE NO
DEY
JMP NUL
LDA DMM, Y
DEY
AND OFFSCL
CMP OFFSCL
BNE NORMAL
JMP NUL
DEY
LDA DMM,Y
DEY
BIT SIGN
BEQ EXCHNG
LDX #00
LDA DMM, Y
STA MLO, X
INY
INX
CPX #04
BNE RPT
DEY
DEY
BIT SIGN
BNE SUBTR
JSR SUM
JMP STORE
22
                                                   SUBTRACTION SUBROUTINE
                                                   LOAD 1ST DMM HI ORDER BYTE
                                                   1ST DMM VALUE OVERRANGE?
                                                   YES, STORE ZERO

                                                   NO, LOAD 2ND DMM HI ORDER
                                                   BYTE
                                                   2ND DMM VALUE OVERRANGE?
                                                   YES, STORE ZERO
                                                   NO, RESTORE Y
                                                   1ST DMM VALUE POSITIVE?
                                                   NO, GO TO EXCHNG
                                                   YES, LOAD 1ST DMM VALUE
                                                   INTO MLO AND MHI,
                                                   AND 2ND DMM VALUE
                                                   INTO NLO AND NHI
                                                   2ND DMM VALUE POSITIVE?
                                                   YES, GO TO SUBTR
                                                   NO, CALC. ABS(M) + ABS (N)

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
006F
0072
0074
0075
0078
007A
007B
007E
0080
0081
0084
0086
0087
0089
008B
008E
0090
0092
0094
0097
0098
009B
009C
009F
OOAO
OOA2
OOA3
OOA5
OOA7
OOAA
OOAB
OOAD
OOBO
B9 IE 02 EXCHNG
85 2E
C8
B9 IE 02
85 2F
C8
B9 IE 02
85 2C
C8
B9 IE 02
85 2D
88
24 E6
DO 05
20 Dl 00 SUBTR
BO 13
A6 2A NUL
A9 00
90 00 02
CA
90 '00 02
CA
9D 00 02
CA
86 2A
60
A6 2A STORE
A5 2D
9D 00 02
CA
A5 2C
9D 00 02
CA
LDA DMM, Y
STA NLO
INY
LDA DMM, Y
STA NHI
INY
LDA DMM, Y
STA MLO
INY
LDA DMM, Y
STA MHI
DEY
BIT SIGN
BNE NUL
JSR DIFF
BCS STORE
LDX CHAN
LDA #00
STA DMMDIF,
DEX
STA DMMDIF,
DEX
STA DMMDIF,
DEX
STX CHAN
RTS
LDX CHAN
LDA MHI
STA DMMDIF,
DEX
LDA MLO
STA DMMDIF,
DEX


















X

X

X





X


X

                                                    LOAD 1ST DMM VALUE
                                                    INTO NLO AND NHI
                                                    LOAD 2ND DMM VALUE
                                                    INTO MLO AND MHI
                                                    2ND DMM VALUE POSITIVE
                                                    YES, GO TO NUL
                                                    NO, CALC.  ABS(M)  -  ABS(N)
                                                    POSITIVE RESULT?
                                                    NO,
                                                    STORE ZERO
                                                    SUBROUTINE RETURN
                                                    YES,
                                                    STORE RESULT:
                                                    HI ORDER BYTE
                                                    LO ORDER BYTE
                                       23

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
OOB1
OOB3
OOB6
OOB7
OOB9
OOBA
OOBB
OOBE
OOBF
OOCO
OOC3
OOC4
OOC6
OOC8
OOCA
OOCC
OOCE
OODO
OOD1
OOD4
OOD5
OOD7
OOD9
OODB
OODD
OODF
OOE1
OOE2
OOE3
A9 01
9D 00 02
CA
86 2A
60
78 CR
20 2F IE
58
60
20 El 02 SUM
18
A5 2C
65 2E
85 2C
A5 2D
65 2F
85 2D
60
20 El 02 DIFF
38
A5 2C
E5 2E
85 2C
A5 2D
E5 2F
85 2D
60
XX
XX
LDA #01
STA DMMDIF
DEX
SIX CHAN
RTS
SEI
JSR CRLF
CLI
RTS
JSR MASK
CLC
LDA MLO
ADC NLO
STA MLO
LDA MHI
ADC NHI
STA MHI
RTS
JSR MASK
SEC
LDA MLO
SBC NLO
STA MLO
LDA MHI
SBC NHI
STA MHI
RTS


                                                   EXPONENT
                                                   SUBROUTINE RETURN
                                                   SUBROUTINE FOR
                                                   CARRIAGE RETURN,  LINE FEED

                                                   SUBROUTINE RETURN
                                                   SUBROUTINE TO
                                                   CALC.  ABS(M) + ABS(N)
                                                   SUBROUTINE RETURN
                                                   SUBROUTINE TO
                                                   CALC.  ABS(M) - ABS(N)
                                                   SUBROUTINE RETURN
                                                   UNUSED
                                                   UNUSED
                                      24

-------
ADDRESS  CODE
LABEL
ASSEMBLY
                                                    COMMENT
OOE4
OOE5
OOE6
OOE7
OOE8
OOE9
OOEA
OOEB
OOEC
OOED
OOEE
OOEF
OOF2
OOF5
OOFS
OOFB
OOFE
01
12
20
XX
XX
XX
02
XX
02
XX
02
XX XX XX
XX XX XX
XX XX XX
XX XX XX
XX XX XX
XX XX
FREQ
OFFSCL
SIGN
TEMPA
TEMPB
PLIERPNTL/COUNTER
PLIERPNTH
CANDPNTL
CANDPNTH
PRODPNTL
PRODPNTH






                                                    FREQUENCY OF  EAA  PRINTOUT
                                                    DMM OVERRANGE MASK
                                                    DMM SIGN BIT  MASK
                                                    TWO TEMPORARY STOKAGE
                                                    ADDRESSES
                                                    THREE POINTER ADDRESSES
                                                    FOR MULTIPLY  SUBROUTINE
                                                    ADDRESSES OOEF-
                                                    OOFF NOT AVAILABLE FOR
                                                    USER PROGRAMS
                                       25

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
0100
0101
0103
0104
0106
0109
010B
010E
0111
0114
0115
0117
011A
011D
0120
0122
0125
0127
012A
012C
012F
0131
0133
0135
0137
0138
D8 START
A2 FF
9A
A9 E9
8D F2 17
A9 00
8D F3 17
20 2F IE
20 2F IE
EA
A9 00
8D 01 17
8D 03 17
8D FA 17
A9 1C
8D FB 17
A9 AC
8D FE 17
A9 02
8D FF 17
A5 E4
85 29
A9 00
85 2B
58
4C 00 00
CLD
LDX #FF
TXS
LDA #E9
STA 17 F2
LDA #00
STA 17F3
JSR CRLF
JSR CRLF
NOP
LDA #00
STA 1701
STA 1703
STA 17FA
LDA #1C
STA 17FB
LDA #AC
STA 17FE
LDA #02
STA 17FF
LDA FREQ
STA SKIP
LDA #00
STA STEP
CLI
JMP MAIN
                                                   STARTING  ADDRESS,  CLEAR
                                                   DECIMAL MODE
                                                   INITIALIZE  STACK
                                                   SET BAUD  RATE  =  300
                                                   CARRIAGE  RETURN,  LINE  FEED
                                                   DEFINE PORTS  A & B
                                                   AS  ALL INPUTS

                                                   SET UP INTERRUPT
                                                   VECTOR FOR NMI

                                                   SET UP INTERRUPT
                                                   VECTOR FOR IRQ
                                                   INITIALIZE SKIP
                                                   SET STEP = 0
                                                   ENABLE IRQ
                                                   BEGIN DATA ACQUISITION
                                      26

-------
ADDRESS  CODE
           LABEL
             ASSEMBLY
                                                    COMMENT
013B
013C
013D
013F
0141
0143
0146
0148
014A
0140
014E
0150
0152
0154
0155
0158
 015A
 015C
 015E
 0161
 0162
 0164
 0167
 016A
 016C
 016E
 016F
 0170
 0172
0175
0178
017B
48
08
86 E7
84 E8
A9 03
8D E4 01
AO 06
A9 00
99 E7 01
88
10 FA
AO 02
Bl E9
88
99 E5  01
DO F8
AO 01
 Bl  EB
 8D  EF  01
 C8
 Bl  EB
 8D  EE  01
 AD  E5  01
 29  OF
 FO  13
 A8
 18
 A2  03
 BD  EC  01
 70 E8  01
 9D E8  01
CA
FPM
AGN
LDP
 CKPLIER
 SETX
 SUM
DECIMAL FLOATING POINT
MULTIPLY SUBROUTINE
(DECIMAL MODE
PREVIOUSLY SET)

INITIALIZE SHIFT COUNTER.
SET TO ZERO:
CANDSRH, CANDSRL,
PRODI, PROD2,
PRODS, PROD4,
CNTEXP.
LOAD PLIERH
PHA
PHP
STX TEMPA
STY TEMPB
LDA #03
STA CNTSHIFT
LDY #06
LDA #00
STA CNTEXP,Y
DEY
BPL AGN
LDY #02
LDA (PLIERPNTL).Y AND PLIERL
DEY               INTO RESIDENT
STA PLIERL,Y      STORAGE
BNE LDP
LDY #01           LOAD CANDL
LDA (CANDPNTL),Y  AND CANDH
STA CANDL         INTO"RESIDENT
INY               STORAGE
LDA (CANDPNTL).Y
STA CANDH
LDA PLIERL
AND #OF
BEQ DECCNTSHIFT
TAY
CLC
LDX #03
LDA CANDSRH,X
ADC PROD1.X
STA PRODI,X
DEX
CHECK 4 LSB'S
OF PLIERL

Y = ADDITION COUNTER
ADD ALL 4 BYTES
OF CAND TO PROD
                                       27

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
01 7C
017E
017F
0181
0184
0186
0188
018A
01 8B
018E
018F
0191
0194
0197
0198
01 9A
019C
019E
01AO
01A1
01A3
01A6
01A8
01AB
01 AD
01AF
01 BO
01B2
01B5
01B6
01 B8
01B9
01BB
10 F4
88
DO EE
CE E4 01
30 16
AO 04
A2 03
18
3E EC 01
CA
10 FA
4E E6 01
6E E5 01
88
DO EE
FO CB
AO 00
Bl E9
18
71 EB
8D E7 01
A9 FO
2C E8 01
DO IE
AO 04
18
A2 03
3E E8 01
CA
10 FA
88
DO F4
38
BPL SUM
DEY
BNE SETX
DECCNTSHIFT DEC CNTSHIFT
BMI LJD
LDY #04
NEXTDIG LDX #03
CLC
ROCAND ROL CANDSRH,X
DEX
BPL ROCAND
LSR PLIERH
ROR PLIERL
DEY
BNE NEXTDIG
BEQ CKPLIER
LJD LDY #00
ADDEXP LDA (PLIERPNTL),Y
CLC
ADC (CANDPNTL),Y
STA CNTEXP
CKMSD LDA #FO
BIT PRODI
BNE STOREXP
LDY #04.
DIGSHIFT CLC
LDX #03
BITSHIFT ROL PRODI ,X
DEX
BPL BITSHIFT
DEY
BNE DIGSHIFT
DECEXP SEC
                                                   REPEAT ADDITIONS
                                                   FOR Y TIMES.
                                                   BRANCH IF ALL 4 DIGITS
                                                   OF PLIER HAVE BEEN USED
                                                   Y = 4 BIT COUNTER
                                                   X = 4 BYTE COUNTER
                                                   SHIFT CAND
                                                   LEFT 1 BIT
                                                   REPEAT FOR ALL 4
                                                   BYTES
                                                   SHIFT PLIER
                                                   RIGHT 1 BIT
                                                   REPEAT FOR 4
                                                   BITS.
                                                   ADD EXPONENTS
                                                   OF PLIER AND
                                                   CAND

                                                   CHECK 4 MSB'S
                                                   OF PROD
                                                   BRANCH IF ^ 0
                                                   4 BITS FOR EACH BCD
                                                   DIGIT
                                                   PROD CONTAINS 4 BYTES.
                                                   SHIFT PROD LEFT
                                                   1 BIT. REPEAT FOR
                                                   ALL 4 BYTES
                                                   REPEAT FOR 4 BITS

                                                   DECREMENT EXPONENT
                                      28

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENTS
01 BC
01 BF
Old
01 C4
01 C6
01 C8
01 CB
01 CE
01 DO
01 D2
01 D5
01 D7
01 D8
01 DB
01 DD
01 DF
01E1
01 E2
01 E3
01 E4
01 E5
01E6
01 E7
01 E8
01 E9
01 EA
01 EB
01 EC
01 ED
01 EE
01EF
01 FO
01 F3
AD E7 01
E9 01
8D E7 01
DO EO
FO 03
XX XX XX
AD E7 01 STOREXP
91 ED
AO 02
AD E8 01
91 ED
88
AD E9 01
91 ED
A6 E7
A4 E8
28
68
60
XX CNTSHIFT
XX PLIERL
XX PLIERH
XX CNTEXP
XX PRODI
XX PROD2
XX PROD3
XX PROD4
XX CANDSRH
XX CANDSRL
XX CANDH
XX CANDL
XX XX XX
XX XX XX
LDA CNTEXP
SBC #01
STA CNTEXP
BNE CKMSD
BEQ STOREXP

LDA CNTEXP
STA (PRODPNTL).Y
LDY #02
LDA PRODI
STA (PRODPNTL),Y
DEY
LDA PROD2
STA (PRODPNTL).Y
LDX TEMPA
LDY TEMPB
PLP
PLA
RTS














                                                    FOR EACH DIGIT
                                                    SHIFTED
                                                    UNUSED
                                                    (Y = 0)
                                                    EXPONENT STORED AT LOWEST
                                                    ADDRESS

                                                    HI STORED AT HIGHEST ADDRESS
                                                    LO STORED AT MIDDLE ADDRESS
                                                    RETURN FROM SUBROUTINE
                                                    TWELVE TEMPORARY
                                                    STORAGE ADDRESSES
                                                    USED BY MULTIPLY
                                                    SUBROUTINE
                                                    UNUSED
                                                    UNUSED
                                       29

-------
ADDRESS  CODE       LABEL        ASSEMBLY          COMMENTS

01F6     XX XX XX                                  UNUSED
01F9     XX XX XX                                  UNUSED
01FC     XX XX                                     UNUSED
01FE     XX                                        RESERVED FOR
01FF     XX         STACK                          STACK OPERATION
                                     30

-------
ADDRESS  CODE
           LABEL
ASSEMBLY
COMMENT
0200     XX XX XX    DMMDIF
 021B
 021E
XX XX XX
XX XX      DMM
 0232
XX XX
                  ADDRESSES 0200-021D
                  CONTAIN COMPUTED
                  DIFFERENCES OF
                  SUCCESSIVE DMM READINGS
                  STORED AS 1010 THREE
                  BYTE  (EXPONENT, LO
                  ORDER, HI ORDER)
                  BCD NUMBERS.
                  ADDRESSES 021E-0233
                  CONTAIN SUCCESSIVE
                  DMM READINGS FROM
                  AN EAA CYCLE,
                  STORED AS 1110 TWO
                  BYTE  (LO ORDER, HI
                  ORDER) BCD NUMBERS.
                                        31

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
0234
0237
023A
023D
0240
0243
0246
0249
024C
024F
0252
0255
0258
025B
025E
0261
0264
0267
026A
026D
0270
0273
0276
0279
027C
027F
0282
0285
0288
028B
04 90 28
04 00 10
03 60 34
03 00 12
02 70 41
02 50 14
01 00 50
01 30 17
01 00 76
02 40 50
05 10 23
05 30 14
04 00 88
04 00 54
04 40 33
04 60 20
04 70 12
03 00 78
04 80 60
05 00 72
05 10 13
05 50 25
05 60 49
05 20 97
06 90 18
06 80 36
06 60 71
07 00 14
08 40 34
10 00 13
                    VOLUME
                    SURFACE
                    NUMBER
                               VOLUME TRANSFORMATION
                               FACTORS FOR EACH SIZE
                               BIN,  STORED IN REVERSE
                               DECIMAL FLOATING POINT
                               FORMAT.  FOR EXAMPLE,
                               THE FIRST FACTOR IS
                               0.2890 x 104
                               SURFACE TRANSFORMATION
                               FACTORS.  THE
                               FIRST FACTOR IS
                               0.2310 x 105
                               NUMBER TRANSFORMATION
                               FACTORS.   THE FIRST
                               FACTOR IS
                               0.1310 x 105
                                      32

-------
ADDRESS  CODE
           LABEL
             ASSEMBLY
COMMENT
028E
0291
0294
0297
029A
029D
02AO
02A3
02A6
02A9
30 35 37
32 32 34
37 33 32
33 33 31
35 37 30
32 34 30
34 32 30
33 31 30
38 30 30
34 30 30
TABLE
AVE. PARTICLE DIA.
(IN NANOMETERS) FOR
EACH SIZE BIN, STORED
IN REVERSE ASCII FORMAT.
FOR EXAMPLE, THE FIRST
ENTRY CORRESPONDS TO 750
WITH 30 = 0, 35 = 5, 37 = 7
                                        33

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
02AC
02AD
02AE
02AF
02B1
02B4
02B6
02B9
02BC
02BD
02CO
02C3
02C4
02C6
02C9
02CB
02CC
02CD
02CE
02CF
48 IRQ
8A
48
A6 2B
AD 02 17 EXAM
10 FB
AD 00 17
9D IE 02
E8
AD 02 17
9D IE 02
E8
A9 FF
20 DO 02
86 2B
68
AA
68
58
40
PHA
TXA
PHA
LDX STEP
LDA 1702
BPL EXAM
LDA 1700
STA DMM, X
INX
LDA 1702
STA DMM, X
INX
LDA #FF
JSR WAIT
STX STEP
PLA
TAX
PLA
CLI
RTI
                                                   INTERRUPT BY EAA READ
                                                   SAVE A
                                                   SAVE X
                                                   X = STEP

                                                   IS DMM READY?
                                                   YES, STORE 2 LSD'S
                                                   FROM DMM

                                                   STORE 2 MSD'S
                                                   FROM DMM

                                                   DELAY FOR
                                                   256 x 11.264 = 2884 MSEC.
                                                   STEP = X

                                                   RESTORE X
                                                   RESTORE A
                                                   ENABLE IRQ
                                                   INTERRUPT RETURN
                                      34

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
02DO
02D2
02D4
02D7
02DA
02DC
02DE
02EO
02E1
02E3
02E5
02E7
02E9
02EB
02ED
02EE
02EF
02F2
02F3
02F4
85 27 WAIT
A9 OA AGAIN
8D 07 17
AD 07 17 FLAG
FO FB
C6 27
DO F2
60
A5 2D MASK
29 IF
85 2D
A5 2F
29 IF
85 2F
60
78 CH
20 AO IE
58
60
XX XX
STA TIMER
LDA #OA
STA 1707
LDA 1707
BEQ FLAG
DEC TIMER
BNE AGAIN
RTS
LDA MHI
AND #1F
STA MHI
LDA NHI
AND #1F
STA NHI
RTS
SEI
JSR DUTCH
CLI
RTS

                                                    WAITING SUBROUTINE
                                                    SET CLOCK FOR
                                                    11 x 1.024 = 11.264 MSEC.
                                                    REMAIN IN SUBROUTINE
                                                    UNTIL (TIMER) X 11.264 MSEC
                                                    HAS PASSED

                                                    SUBROUTINE RETURN
                                                    MASKING SUBROUTINE
                                                    SET 3 MSB'S OF
                                                    MHI AND NHI TO
                                                    ZERO
                                                    SUBROUTINE RETURN
                                                    SUBROUTINE TO
                                                    OUTPUT CHARACTER

                                                    SUBROUTINE RETURN
                                                    UNUSED
                                        35

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
02F6
02 F8
02 FA
02FC
02FE
0300
0302
0304
0306
0308
030A
030C
030F
0312
0314
0316
0318
031A
03-1B
031E
031F
0320
0322
0325
0327
0329
032B
032D
032E
032F
0331
A9 70 ENTR1
85 E9
A9 4E
DO OE
A9 34 ENTR2
85 E9
A9 56
DO 06
A9 52 ENTR3
85 E9
A9 53
20 AO IE CHAR
20 2F IE
A9 00
85 EB
85 ED
AO OA
F8 CALL
20 3B 01
D8
88
DO 03
4C 39 03
A2 04
F6 E9 INCP
F6 E9
F6 E9
CA
CA
10 F6
30 E7
LDA #70
STA E9
LDA #4E
BNE CHAR
LDA #34
STA E9
LDA #56
BNE CHAR
LDA #52
STA E9
LDA #53
JSR DUTCH
JSR CRLF
LDA #00
STA EB
STA ED
LDY #OA
SED
JSR FPM
CLD
DEY
BNE #03
JMP SORT
LDX #04
INC E9,X
INC E9,X
INC E9.X
DEX
DEX
BPL INCP
BMI CALL
                                                   MULTIPLY ROUTINE
                                                   LOAD PLIERPNTL WITH LO ORDER
                                                   ADDRESS  OF  NUMBER
                                                   ASCII  "N"
                                                   LOAD PLIERPNTL WITH LO ORDER
                                                   ADDRESS  OF  VOLUME
                                                   ASCII  "V"

                                                   LOAD PLIERPNTL WITH LO ORDER
                                                   ADDRESS  OF  SURFACE
                                                   ASCII  "S"
                                                   PRINT  "V" OR  "S"  OR "N"
                                                   CARRIAGE RETURN,  LINE  FEED
                                                   INITIALIZE:
                                                   CANDPNTL AND
                                                   PRODPNTL
                                                   101QSIZE BINS
                                                   SET DECIMAL MODE
                                                   MULTIPLY
                                                   CLEAR  DECIMAL MODE

                                                   IF  ALL BINS DONE
                                                   GO  TO  SORT
                                                   IF  NOT DONE,
                                                   INCREMENT
                                                   PLIERPNTL,
                                                   CANDPNTL, AND
                                                   PRODPNTL
                                                   THREE  TIMES

                                                   DO  NEXT  MULTIPLICATION
                                      36

-------
ADDRESS  CODE       LABEL        ASSEMBLY           COMMENT

0333     78         SP           SEI                SUBROUTINE TO
0334     20 9E IE                JSR  OUTSP          OUTPUT SPACE
0337     58                      CLI
0338     60                      RTS                SUBROUTINE RETURN
                                       37

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
0339
033B
033D
033F
0342
0344
0346
0348
0349
034A
034B
034D
034F
0352
0354
0356
0357
0358
035B
035C
035D
035F
0361
0363
0366
0367
0368
0369
036B
036E
0371
0374
0377
A9 00 SORT
85 28
A2 IB
BD 00 02 TEST
C5 28
90 02
85 28
CA DECR
CA
CA
10 F2
A2 IB
BD 00 02 TRY
C5 28
DO 10
E8
E8
BD 00 02
CA
CA
C9 55
90 05
E6 28
4C 78 03
CA RDUCE
CA
CA
10 E4
4C 78 03
XX XX XX
XX XX XX
XX XX XX
XX
LDA #00
STA EXP
LDX #1B
LDA 0200, X
CMP EXP
BCC DECR
STA EXP
DEX
DEX
DEX
BPL TEST
LDX #1B
LDA 0200, X
CMP EXP
BNE RDUCE
INX
INX
LDA 0200, X
DEX
DEX
CMP #55
BCC RDUCE
INC .EXP
JMP OUTPUT
DEX
DEX
DEX
BPL TRY
JMP OUTPUT




ROUTINE TO FIND
LARGEST EXPONENT
1B16 = 10 BINS X 3 - 3
LOAD NEXT EXPONENT

STORE IF LARGER
THAN PREVIOUS EXP'S



DONE?
YES, RESET X
LOAD NEXT EXPONENT
EXPONENT MAXIMUM?
NO, GO TO RDUCE


YES, LOAD HI ORDER
BYTE

551Q = MAX. ORDINATE
MAX. ORDINATE EXCEEDED?
YES

NO


DONE?
YES
UNUSED
UNUSED
UNUSED
UNUSED
                                      38

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
0378
037A
037C
037E
0380
0382
0384
0386
0388
038B
038D
0390
0393
0395
0397
0399
039C
039F
D3A1
03A4
03A7
03A9
03AB
03AE
03B1
03B4
03B7
03BA
03BC
03BE
03C1
03C4
A9 00 OUTPUT
85 ED
A9 ID
85 E7
85 E8
A9 03 LINE
85 E9
A9 2E
20 EE 02
A6 E7 ASCII
BD 8E 02
20 EE 02
C6 E7
C6 E9
DO F2
20 33 03
20 33 03
A9 2E
20 EE 02
20 C4 03
A5 20
85 2F
20 C4 03
20 33 03
20 C4 03
20 DO 03
20 BA 00
A5 E8
10 C4
20 BA 00
4C 00 00
A4 E8 OUTBYT
LDA #00
STA ED
LDA #1D
STA TEMPA
STA TEMPB
LDA #03
STA COUNTER
LDA #2E
JSR CH
LDX TEMPA
LDA TABLE, X
JSR CH
DEC TEMPA
DEC COUNTER
BNE ASCII
JSR SP
JSR SP
LDA #2E
JSR CH
JSR OUTBYT
LDA MHI
STA NHI
JSR OUTBYT
JSR SP
JSR OUTBYT
JSR PLOT
JSR CR
LDA TEMPB
BPL LINE
JSR CR
JMP MAIN
LDY TEMPB
                                                    OUTPUT  ROUTINE
                                                    INITIALIZE  DATPNTL
                                                    1D16 =  2910 =
                                                    3 x NO. OF  BINS - 1
                                                    3 CHARACTER COUNTER
                                                    ASCII TABLE ADDRESS = 028E
                                                    PRINT NEXT ASCII CHARACTER
                                                    PROCEED AFTER 3 CHARACTERS

                                                    PRINT 2 SPACES
                                                    ASCII "."
                                                    PRINT"."
                                                    PRINT HI ORDER BYTE
                                                    STORE HI ORDER BYTE IN NHI

                                                    PRINT LO ORDER BYTE
                                                    PRINT SPACE
                                                    PRINT EXPONENT
                                                    PLOT HI ORDER BYTE
                                                    CARRIAGE RETURN, LINE FEED

                                                    PROCEED AFTER 1010 LINES
                                                    CARRIAGE RETURN, LINE FEED
                                                    RETURN TO MAIN WAITING LOOP
                                                    SUBROUTINE TO
                                       39

-------
ADDRESS  CODE

03C6     Bl ED
03C8     85 2D
03CA     20 FA 03
03CD     C6 E8
03CF     60
LABEL
ASSEMBLY

LDA (ED), Y
STA MHI
JSR BT
DEC TEMPB
RTS
COMMENT
                               PRINT ONE BYTE
                               SUBROUTINE RETURN
                                      40

-------
ADDRESS  CODE
LABEL
ASSEMBLY
COMMENT
03DO
03D1
03D2
03D4
03D6
03D8
03DA
03DC
03DE
Q3DF
03E1
0313
03E5
03E6
03E8
03EB
Q3EC
ose
03EF
03F1
03F3
03F5
03F8
03F9
03FA
03FB
03FE
03FF
F8 PLOT
38
A5 28
E5 2D
FO 00
85 2D
AO 04 SETY
46 2F RTSHFT
88
00 FB
C6 20
DO F5
08 ORDNAT
A9 2A
20 EE 02
F8
38
A5 2F
E9 01
30 05
85 2F
4C E5 03
08 EXIT
60
78 BT
20 3B IE
58
60
SED
SEC
LDA EXP
SBC MHI
BEQ ORDNAT
STA MHI
LDY #04
LSR NHI
DEY
BNE RTSHFT
DEC MHI
BNE SETY
CLD
LDA #2A
JSR CH
SED
SEC
LDA NHI
SBC #01
BCC EXIT
STA NHI
JMP ORONAT
CLD
RTS
SEI
JSR PRTBYT
CLI
RTS
                                                    SUBROUTINE TO PLOT
                                                    HI ORDER BYTE (NHI)
                                                    COMPARE EXPONENT
                                                    WITH MAX. VALUE
                                                    IF NON-ZERO STORE
                                                    DIFFERENCE IN MHI
                                                    SHIFT HI ORDER BYTE
                                                    4 BITS RIGHT (MHI)
                                                    TIMES
                                                     CLEAR DECIMAL MODE
                                                     ASCII "*"
                                                     PRINT "*"
                                                     SET DECIMAL MODE

                                                     DECREMENT HI ORDER
                                                     BYTE 'BY ONE
                                                     RESULT NEGATIVE?
                                                     NO, PRINT AGAIN

                                                     YES, CLEAR DECIMAL MODE
                                                     SUBROUTINE RETURN
                                                     SUBROUTINE TO
                                                     PRINT BYTE

                                                     SUBROUTINE RETURN
                                        41

-------
                                    TECHNICAL REPORT DATA
                             (Please read Instructions on the reverse before completing)
 1, REPORT NO.
    EPA-600/2-79-140
                                                            3. RECIPIENT'S ACCESSION-NO.
 4. TITLE AND SUBTITLE

   IMPLEMENTATION OF A MICROCOMPUTER-MODIFIED
   ELECTRICAL  AEROSOL ANALYZER
              5. REPORT DATE
                 August 1979
              6. PERFORMING ORGANIZATION CODE
 7. AUTHOR(S)
   C. Lewis
                                                            8. PERFORMING ORGANIZATION REPORT NO
 9. PERFORMING ORGANIZATION NAME AND ADDRESS
   Environmental  Sciences Research Laboratory -  RTP,  NC
   Office  of Research and Development
   U.S.  Environmental Protection  Agency
   Research  Triangle Park. NC   27711	
              10. PROGRAM ELEMENT NO.

                1AD712  BB-19 (FY-78)
              11. CONTRACT/GRANT NO.
 12. SPONSORING AGENCY NAME AND ADDRESS
   Environmental Sciences Research Laboratory -  RTP,  NC
   Office  of Research and Development
   U.S.  Environmental Protection  Agency
   Research Trianale Park. NC   27711	
              13. TYPE OF REPORT AND PERIOD COVERED

                 Tn—hnnco	
              14. SPONSORING AGENCY CODE
                 EPA/60Q/Q9
 15. SUPPLEMENTARY NOTES
 16. ABSTRACT
         A commercial electrical  aerosol analyzer  has  been modified  through
   addition of a digital voltmeter,  a microcomputer and a printer.   In  unattended
   operation,  the system can  acquire a differential particle size distribution,
   print and plot the resulting  spectrum in any of  three possible representa-
   tions, and  repeat the cycle at preselected intervals.

         Details of the system assembly and instructions for its operation are
   given.   The appendices contain a  flow chart and  documented listing of Pro-
   gram  EAA, the microcomputer program which operates the system.
 7.
                                KEY WORDS AND DOCUMENT ANALYSIS
                  DESCRIPTORS
b.lDENTIFIERS/OPEN ENDED TERMS  C.  COS AT I Field/Group
    Air pollution
   *Aerosols
   *Analyzers
   *Partic1e size  distribution
   *Revisions
                             13B
                             07D
                             14B
 8. DISTRIBUTION STATEMENT
   RELEASE TO  PUBLIC
                                               19. SECURITY CLASS (ThisReport)
                                                 UNCLASSIFIED
                            21. NO. OF PAGES
                               50
                                               20. SECURITY CLASS (Thispage)

                                                 UNCLASSIFIED
                           22. PRICE
EPA Form 2220-1 (9-73)
                                             42

-------