AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

111
AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE I^IASUREMENTS by STEPHEN NEIL SAJIDERSON, B.S. IN E.E. A THESIS IN ELECTRICAL ENGINEERING Submitted to the Graduate Faculty of Texas Tech University in Partial Fulfillment of the Requirement for the Degree of MASTER OF SCIENCE IN ELECTRICAL ENGINEERING Approved Accepted May, 1976

Transcript of AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

Page 1: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE I^IASUREMENTS

by

STEPHEN NEIL SAJIDERSON, B.S. IN E.E.

A THESIS

IN

ELECTRICAL ENGINEERING

Submitted to the Graduate Faculty of Texas Tech University in Partial Fulfillment of

the Requirement for the Degree of

MASTER OF SCIENCE

IN

ELECTRICAL ENGINEERING

Approved

Accepted

May, 1976

Page 2: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

mr-i'^''^

tir, 3 5

af^

ACKNOWLEDGMENTS

I would like to thank Dr. W. M. Portnoy for his encour­

agement during the initial development of this measurement

system, and Dr. D. L. Gustafson for his guidance in prepar­

ing this thesis.

Special thanks are also extended to Drs. D. L. Vines

and C. L. Burford for serving on my committee and their help­

ful suggestions.

I would also like to thank my wife, Donna, for assis­

tance in preparing this manuscript.

Finally, I would like to express my sincere appreciation

to the many other people whose words of encouragement enabled

me to complete this work.

11

Page 3: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

TABLE OF CONTENTS

ACKNOl /LEDGMENTS ii

LIST OF FIGURES iv

I. INTRODUCTION 1

II. DESIGN PHILOSOPHY 5

A. Voltmeter Design

B. Phasemeter Design

C. Frequency Control

D. Synthesis of AC Equivalent Circuit

III. HARDWARE DESIGN 15

A. D/A Conversion Mode

B. Magnitude Measurements

C. Low and Mid-Frequency Phase Measurements

D. High Frequency Phase Measurements

IV. SOFTWARE DESIGN 38

V. RESULTS 46

VI. CONCLUSION AND PROPOSED MODIFICATIONS 55

VII. REFERENCES 58

VIII. APPENDICES 59

111

Page 4: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

LIST OF FIGURES

Figure Page

1. Skin Impedance: equivalent circuits and representative Bode Plots 4

2. Phase Signal, X or Xored signals, V^ and V^ ^ 9 r s

3. Skin Impedance Detector: control modes and mode block diagram 16

4. Control Tables for Skin Impedance

Measurements 17

5. DAC Converter Circuit 19

6. AC Current Source and "zero-crossing detector" Circuit 22

7. Magnitude and High Frequency Phase

Sample Circuit 25

8. Output Register Circuit 27

9. Timing Diagram for Magnitude Measurements 28

10 . Phase Sample Circuit 32

11. Bode Plots: measured vs. ideal 51

12. Bode Plots of two subjects 52

13. Skin Parameters for four subjects 53

14. Graphic Option 4 for obtaining magnitude and phase coordinates off the Bode Plots 54

15. SID System Interface Diagram 62

IV

Page 5: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

CHAPTER I

INTRODUCTION

The electrical characteristics of the human skin

have long been of interest for the diagnosis of various

skin disorders. Earlier medical research has sought to

relate the electrical properties of the skin to thyroid

function and local skin morbidity as well as impedance

plethysmography. Much of this research about electrical

properties of the skin has been concerned with the effects

of electrode type, size, and position on the values ob­

tained from the skin measurements. For example, Lykken

discusses in detail his results concerning electrode

structure (including the electrolyte) and size on skin 2

resistance, while Kinnen reports at length his work with

different electrode positions.

Still other research studies revealed that the amount

of current passed through the skin remarkably affects

measurement of skin properties. The findings of Schwan

and Maczuk, for example, whose studies involved the

limits of impedance linearity with current, concluded

that skin impedance varied inversely with the current

applied. 1

Page 6: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

These nonlinear effects, however, can be avoided if

the magnitude of current is not allowed to exceed 200VJA.

In addition, by defining electrode size and confining

measurement sites to a particular region, skin data could

be more rigorously correlated to various changes in the

subject's mental or physical condition.

Some of the more recent studies have been in the

field of psychophysiological research, which analyzed skin

impedance variations with frequency. These studies uti­

lized a standard electrical circuit technique, known as

Bode analysis, to arrive at a three-parameter AC model

(Figure 1-A). This is a considerable improvement over

previous techniques, which fit a circuit to the imped­

ance curve.

One major factor determining diagnostic feasibility

of any measurement system is the speed by which data can

be recorded. If the execution time of the measurements

can be minimized, then more time can be spent in corre­

lating recorded data to the patient's particular charac­

teristics. This thesis concerns itself with the design

and implementation of an automated system for acquisition,

processing and display of skin impedance data. The system

effectively minimizes the time and degree of manual

control, and, consequently, provides a faster means for

further correlative research.

The following chapters discuss the design philosophyi

Page 7: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

as well as analog and digital processes associated with

the design of an automated skin impedance measurements

system. Chapter II outlines the basic design philosophy

by first treating the skin and deep tissue as a physio­

logical "black box." This black box is considered as an

electrical impedance from which a Bode plot can be ob­

tained. Secondly, methods using both digital and analog

processes are discussed for measuring the magnitude and

phase parameters of the black box. Finally, the appli­

cation of the impedance function algorithm yields a skin

impedance function which will then be used to automatically

calculate the AC model parameters of the skin. Chapter III

discusses specific electronic circuit design associated

with the skin impedance detection system (SID). Chapter IV

discusses the various computer software CALL subroutines

specifically developed for linkage purposes between the

BASIC language and the SID. Chapter V provides details of

the actual system performance. Included in Chapter VI are

suggested modifications that will more easily lend the sys­

tem to portable applications.

Page 8: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

RO

Rl S

'X

1 — c

Ox'

1

>

\

L

-O X 1 1 1

J-1 1

--hx'

(A) (B)

I

I ^

6 lO-T

s-JO-

V /0-h

10

10

\Uo)\

1^1x01

' — 5 — L >, 1 , 1 , L

(C)

10 /O 10

(D)

Figure 1. Skin Impedance: (A) AC equivalent circuit,(B) as "black box", (C)&(D) representative Bode plots.

Page 9: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

CHAPTER II

DESIGN PHILOSOPHY

The structure of the skin and deep tissue can be

viewed, electrically, as a physiological "black box";

this term implies that the impedance function of the skin

is unknown. However, by attaching one electrode to each

palm in accordance with Burton's preliminary procedures,

and passing an AC current source of different frequencies

(lOHz-lOOkHz) through this two-terminal electrical load,

the impedance function can be obtained experimentally. It

should be noted that anodized silver-silver chloride elec-

2

trodes, 2 cm in area, were used and represented a negli­

gible impedance compared to skin impedance. This can be

verified by Burton's findings. Also, the total measured

impedance represents two equivalent circuits in series

and that the individual resistive values are actually one-

half of the measured values, while the capacitor value is

twice the measured value. Restrictive circuit conditions

must also be placed on impedance measurements before any

analysis can be applied. The primary set of assumptions

is that the measured impedance must contain lumped

(non-distributive), linear, and bilateral elements. Fur­

thermore, the impedance function analysis resulting from

Page 10: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

Bode plots is good only for steady-state conditions.

Consider the hypothetical example of the following

electrical circuit. A two-terminal black box (Figure 1-B),

which represents the skin load, Z,, has an AC current

source, of magnitude T, as its input. Let the voltage, 7.

developed across the load, Z,, be measured by a phase-

sensitive voltmeter. Now suppose that the magnitude of T,

is held constant, and that the magnitude and phase of the

load voltage relative to T, are measured as the input fre­

quency, f, is varied. The impedance, Z, , is given by,

_ \ _ \^^L _ ' T" X ^ ^ = 'L < L (1)

where V is the voltage measured at the frequency, f.

The phase angle, 0., (f) , is the angle measured by the phase-

meter at that frequency. The graphs of Z, , plotted on a

logarithmic scale, and of 0 , plotted on a linear scale,

versus frequency, plotted on a logarithmic scale, are two

forms of Bode plots. Examples of these plots are illus­

trated in Figure 1-C and Figure 1-D. These two plots

illustrate the manner in which the overall skin impedance,

taken at palmar sites, varies with frequency.

Voltmeter Design

Since the relationship between the magnitude, or rms

value, and the peak value of a sinusoidal signal differ

Page 11: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

only by a constant, i.e.,

I, = ^ i ^ , and V, = -^^ (2)

then a ratio of the peak values of V, and T, Is also the

magnitude of Z,. In addition, suppose the amplitude of

the AC current source is controlled by a known voltage,

namely V. , so that the current can be expressed as

I, = KV. (3) L m ^

where K is a known constant, independent of frequency.

The total skin impedance can be expressed relative to V.

as,

^ I, < 0° I, ^ KV. ^ <^) L Lp m p

where K has the units of ohms . The magnitude of the

impedance is now expressed as a ratio of two voltages.

This greatly simplifies design considerations because it

allows the same process to be used to determine the peak

values of either V._ or V, . m L

To obtain these peak voltage levels, a peak detec­

tor circuit can be used. This type circuit utilizes the

high open-loop gain and high input impedance of an opera­

tional amplifier to obtain the peak value of its input

Page 12: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

8

voltage. A more detailed analysis of the peak detector

will be discussed in the following chapter.

Phasemeter Design

The phase measurement can be best accomplished by

digital means. It requires the use of a two-input, exclu­

sive 'or' gate (Xor). The two digital signals, V and V ,

are outputs of "zero-crossing" detectors with the sinu­

soids, V. and V, , as the inputs. The logical expression

resulting from the Xoring V and V is,

X^ = V^ . V + ? • V^ = V e V (5) r r s r s s r

This logical operation is also illustrated in Figure 2.

Note that each shaded area, or window, is proportional to

the phase difference, or with respect to one-half the

period of the input frequency,

A ^L ^L _ ^L (6) Area ^ ___ _ _ ^ ^ — —.— - — ^ ^ '

(% T)a) (% T)(27r

Therefore, if the area of the signal X can be detected,

then the phase difference can be calculated by multiplying

this area times the constant, TT .

For frequencies less than IkHz, the detection of

this area is accomplished by simply gating a clock of

known frequency with one window of X . Since the area is

Page 13: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

M

V

V

11

II II

T

y

Figure 2. Phase S i g n a l , Xj-, of Xored S igna l s , V . and V s

Page 14: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

10

a function not only of the phase difference, but of

frequency, then, the same counting process is needed to

A ratio of counts results in the

area of equation (6) equal to

count either V or V r s

# of X^ count 0,

# of V count TT (7)

For frequencies greater than 3kHz, a method is used

which takes advantage of both the higher frequency range

and the corresponding average value of signal X . The

equation for the average value relative to the period of

the input frequency is,

X ^ ( a v g ) = l/27r 2TT

X ^ ( 0 ) d 9

1/27T

\IU

0, d 0 +

7T / 2+0 ,

7r/2

0j^ + (Tr/2 -f- 0j^) - 7r/2

d 0

IT

(8)

Electrically speaking, the average value is simply the DC

component of signal X , which is directly proportional to

the phase angle of Z,.

The DC value (VT /-.) can be extracted by using a simple

low-pass filter. If the filter break-point frequency is

Page 15: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

11

on the order of 100 times less than the smallest frequency

used in this method (IkHz), then very little ripple error

is introduced to the DC component ( <1X).

Frequency Control

If impedance measurements are to be fully automated,

there must be external control of the current source fre­

quency. This is accomplished by using a voltage-controlled

generator (VCG). Depending on the type VCG used, a 1000:1

frequency range can be swept with a control voltage between

0-5V.

The VCG input voltage, in turn, can be controlled

by a digital to analog converting process (DAC). The

larger the digital word size of the DAC, the higher the

resolution in frequency.

Since all measurements techniques described above

can be converted to digital form, the phase-sensitive volt­

meter as well as the AC current source, discussed earlier,

can be considered as being a computer-controlled system

capable of rapid impedance measurements. In addition, if

there exists a graphic-display peripheral with the compu­

ter system, then Bode plot generation is available to the

operator.

Synthesis of AC Equivalent Circuit

The application of a synthesis algorithm developed

Page 16: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

12

by Burton, provides an equation for the skin impedance

of the form,

Z, (f) = K, ^ (9)

The value of K, is obtained from the Bode plots (Figure 1)

by noting that Z( «> ) = K-, . It is also to be noted that

Z(0) = K-| (f2/f-i) , that is, the upper and lower -45 degree

points are not independent; in fact,

f2 ZL(0) ZL(0)

fi H \^-^ (10)

Now letting,

jf + f. jf + f, + (f. - f.) ^ = K. ^— (11) Z, (f) = K. — = K.

L Jf + f ^ jf + f

so that,

f2 - f Z, (f) = K, + K,-^ ^ = L 1 ^ jf + f

K.(f2/fi - 1) K, + ^ ^ ^ (12) 1 1 + j f/f.

Then, (13)

ZL(f) = K^ + + jf-

K^(f2/fi - 1) K2(f2/fi - Df^

Page 17: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

13

which is just the impedance of the series combination of

a resistance and an R-C network (Figure 1), where

RQ = K^ = Z(<x>); (14)

Rl = K^(f2/fi - 1) = Z(0) - Z(oo); (15)

C = I = 1 2iTK (f2/fi - Df.^ 2,Tf (Z(0) - Z(=o))

2TTf]^Rl (16)

The circuit of Figure 1-A can simply be interpreted as the

series combination of the palmar skin impedance (R-.-C) and

a deep-tissue resistance, R^.

It is at this point that the analytical procedure

becomes particularly useful, since, if it is assumed that

the impedance function for human skin is represented by

that of equation (9), the values for the circuit elements

for any subject may be found by performing impedance

measurements at low and high frequencies and then deter­

mining either the lower or upper frequency which corres­

ponds to a phase angle of -45 degrees.

The following chapters discuss the actual hardware

implementation of a fully automated skin impedance measure

ment system. Computer software interfacing is also

included for the two peripherals of interest: the Skin

Page 18: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

14

Impedance Detector (SID) and a graphics terminal (Bode

plot display). The equations (14, 15, 16), derived from

the impedance function given by equation (9), is also

incorporated into software to provide the operator with

this option for skin parameter calculations.

t

Page 19: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

CHAPTER III

HARDWARE DESIGN

There are four basic control modes incorporated in

the system design. Each of these modes, generated by soft­

ware subroutines, is defined as a hardware command, STC| -

STC^ (Figure 3-A). Each command is generated by gating

the various combinations of the computer words bits (BO

and Bl), with the enable line from the computer (STC).

Referring to Figure 3-B, the first hardware command

discussed, STCJ, controlls the D/A voltage by supplying it

with a 12-bit word from the A-register of the HP-21MX com­

puter. When the D/A is used in the SID system, the voltage

is then used to control the VCG (Wavetek) output frequency.

This VCG output voltage then controls the current source,

located within the SID. Once the frequency is established,

then the command code, STCA, is sent to obtain magnitude

samples of V. and V . When this cycle is complete,

either the code, STCA, or STCj!, is sent to obtain phase

samples. The code, STCA, is used to obtain phase samples

V , and X , while STC| obtains the proportional phase vol­

tage, Vj .

The system's software control truth tables are shown

15

Page 20: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

16

input

STC

0

1

1

1

1

controls

BO

X

0

0

1

1 •

Bl

X

0

1

1

0

mode

0

STC^

STC3

STC2

STC J

output modes

mode description

no action taken

DAC control

magnitude measurement

digital phase measurement

analog phase measuremenl 1

(A)

STC'

d i g i t a l word

B2

STC

STC

z e r o - c r o s s i n j d e t e c t o r ( z e d ] ^

zed

s

V L

r peak detector

VT

(STC3)

(B2)

T Vr/Xr

lowpass filter

DC

A/D

(STCi)

LF/MF clock

J ^

I 12-bit word 1-

bit sign

word

sample

(B) Figure 3. Skin Impedance Detector: (A)control modes,

and (B)system block diagram.

Page 21: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

17

STC^

0

'

B2

X

X

B3

X

X

control process

no action

D/A conversion

(A) D/A controls

STC j

0

1

1

B2

X

0

1

B3

X

-X

X

control process

no action

'lnD-t°-A/D

V, -to-A/D J up J

(B) Peak Detector-Multiplexor controls

STC?

0

1

1

1

1

B2

X

0

0

1

1

B3

X

0

-1

1

0

B4

X 1

0 j

0

0

0

control process

not action

V^ © Vg-to-SPEC-to-L.F. count

Vj. e Vg-to-SPEC-to-M.F. count

1

j Y;J.-to-SPEC-to-M.F. count

V^-to-SPEC-to-L,F. count

(C) Digital Phase controls

STCJ

0

1

1

B2

X

0

1

B3

X

X

X

B4

X

1

1

control process

no action

V 6 y -to-lowpass filter-A/D ^ 5

V -to-lowpass filter-A/D

CD) Analog Phase controls

Figure 4. Control Tables for Skin Impedance Measurements. STC—enable line;B2,B3,B4—control bits from computer,

Page 22: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

18

in Figure 4. For actual hardware control, these tables

must be complemented with the exception of STC enable line.

This is due to the fact that available data to the SID is

encoded positive-false.

D/A Conversion Mode

Components making up the D/A converter board are:

2-74174N(12 latches), 1-7410 (3-input Nand Gates).

2-potentiometers (1 for gain adjust, 1 for zero adjust),

and 1-DAC-12QZ. The D/A converter schematic, along with

its timing diagram, is shown in Figure 5.

Upon receiving a high level enable bit from the

computer, and correct code word for STCJ, a clocking of a

new data word to the DAC will occur via the 2-Hex

D-Flipflops. There is no need for a flag to be generated J

in this mode. One reason is that the interval of time Z

before the next generated command code of STCJ is greater

conversion speed of the DAC (5 yisec) . The D/A output

voltage (0-5V) is used to control the generator frequency

(VCG input) of the Wavetek, which, in turn, controls the

current source.

Referring to the current source circuit shown in the

left-hand portion of Figure 6, if the input impedance of

the operational amplifier (op-amp) is assumed infinite

»

D than the combined time delay of the TTL components and the <

Page 23: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

19

—ir^ <r \£> r^ CN CN CM rsi rsi

D U

a> 4.) >-*

> c o u u <

(U

3 00

ft

r

0 <

00 c 6

CJ __ O ^ <N en ^

c n P Q M m M p q (Q PQ p q p q p Q p Q n c Q p Q p q

B H »n o w

O <N

PQ

cr

Page 24: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

20

along with the open-loop voltage gain, the current source

value can be expressed as the following:

I, = V. X 2_j4 ( 7)

^1^2^4 " L^^2^4 ~ ^1^3^

The particular op-amp chosen is a HA-2625 wide band, high

impedance, high gain, operational amplifier. The input

impedance is specified at 500 KQ with a mid-frequency gain

of 100 dB (100,000) and a high-frequency gain of at least

60 dB (1000). If one other condition is met, i.e., R-, = R/

and R2 = Ro, then equation (17) reduces to:

\ = Vi„/Ri • (18)

3 Consequently, the value of the current is simply the value

of the input voltage multiplied by the constant, 1/R-i .

Note that T, is in phase with V.^. For this reason, V.^ '

can be used as the reference phasor. The voltage V can 0

be expressed as

\ = W = (in/' l L • (19)

Solving for the load impedance Z, results in

inp

This equation can be related to equation (3), where

Page 25: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

21

K = 1/R^. By detecting the magnitudes, V, and V^ , the

magnitude of Z, can be calculated by using equation (20).

In order to determine R,, the range of actual skin

impedance had to be determined. In Burton's report on

skin impedance measurements, the magnitude of skin imped­

ance, Z,, of his measurements is within the range,

470fi < \ < 212 kfi . (21)

In order to provide a higher magnitude measurement

capability, the higher range value was, at that time,

increased to twice that of Burton's findings, or

^Lmax = ^24 k« . (22)

Noting that Z, occurs when V^ = V^^^^ = 15 V; then.

To satisfy slew-rate conditions of the zero-crossing

detectors at the higher frequencies (f > 50 kHz),

VT . = 50 mV (24) Lmin

Substituting this value into the equation.

^Lmin = Rl(Vin/^in) = ^l^^O -"V/V,^) = 470« .(25)

ft

H ^Lmax = '^l(Vax/Vin) = ^l^^^V/V.^) = 424 k« . (23) ,

0

Page 26: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

9 )

U vO JO

V)

o 4-1 o (U

4-1

00 c

• H CO

o (J I o

N

^ .^-v (U

^ ^ t « CO

N_«

4-1 •H D U U

•H U

(U O U

o o w 4J

c 0) »4

^ 3

u «

o <:

-a >. Cfl u a'

T: c a> 4.) X (U

(. 4J •T3 •H :* 1 OJ CO

1—1

3 c •o c CO

VO

0) V4 3 00

>

a <

Page 27: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

23

In order to satisfy equations 23 and 25, while keeping R^

constant,

^inl = ^ ^ /^24 kn )R^ , and, (26)

^in2 = ^^^ mV/470fi )R^ . (27)

Choosing R^ = 90 kfi , equations 26 and 27 become,

^inl = 3.18 V , and, (28)

Vi^2 = 9.6 V (29)

These voltages values correspond to the Wavetek

attenuation setting of -10 dB, and 0 dB, respectively. In

addition, the maximum current ly is given by 5

Lmax = V^^ niax/ 1 = ^-^ ^/^^ k = 107 pA . (30)

>

This value of maximum load current is well within the limits J

for skin impedance linearity.

Another consideration that had to be made was the

value for R« = R^. Using the above mentioned assumptions

placed on the circuit equations, the op-amp output voltage

equation is given by,

Z, (R« + R,) Vnn = V. ^ ^^ ^ - (31) op in pz

Page 28: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

To insure non-saturated conditions for V , then, op'

V r. - 15V, or op *

(Rp + 90 kfi ) • 3V(424 kn ) < ^3 ^ ^32) (90 kfi )^

Solving for R2,

R2 - 5.5 kfi . (33)

However, to satisfy output current limitations, R2 was set

equal to 18 kfi . This effectively decreases Z, to

375 kfi , which is still well within the range of Burton's

recordings.

Magnitude Measurements ft

The basic method used to obtain the necessary routing 3

of DC information to the analog-to-digital converter uses ^

a multiplexed peak detector and a multiplexed, ramp- » 0

driven comparator. These devices are shown in Figure 7.

The. actual analog to digital conversion involves two

steps. The first step requires conversion of the sampled

amplitude into a pulse-width modulated signal. This pulse

width corresponds to the time interval necessary for a

ramp generator to rise to the value of the sampled ampli­

tude. This pulse width is then used to gate a precision

crystal controlled oscillator (256kg Hz clock, kg = 1024)

Page 29: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

u B B CO .H U 4J

CM C M ,

y <• Q U

O

6 CO

u

y\.

u o u CO u <u c <u 00

3 3 P4 O

> o

-'W^h Fv/^H' > O

?=r

u >

- m H CO

u 0) CO

e o

A

o H (O

CQ

A

l> In o

>

3

u a

E CO

(U CO t3

J= P^

>% u c <u 3 cr <D U

l^

oo

c CO

0) 'O 3 4J .H

& CO

a; 3 00

-rt

• I I I • I I I • I I I

at

»

0

Page 30: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

26

to the 12-bit counter register in Figure 8.

As stated above, three analog signals are digitized:

the two peak values of V^^ and V, , and the high frequency

phase DC level, Vj^^. The multiplexor consists of CMOS

analog switches: 1-HI-201 Quad analog switch and 1-HI-

1800A four-channel switch. Also included in Figure 7

is a 6 millisecond delay to allow for the ramp generation

and proper analog-digital conversion before a "flag" is

sent to the computer to indicate that the conversion is

complete.

For the frequency range less than 100 Hz, a problem

existed in that insufficient time was allowed to insure a

true peak value on the input of the peak detector. Refer­

ring to Figure 9, if the command, STCA, is given by the

computer immediately after the peak of V, or V. has been *

reached, then a time of 1/f may elapse before the next ''

peak occurs. Consequently, with no time delay, the A/D 0

level of the peak detector would probably be in error.

In order to insure a positive peak reaching the peak

detector, a frequency-dependent time delay (FDD) circuit

was designed and is shown in upper left-hand portion of

Figure 7. A digital circuit operating with V^ (output of

"zero-crossing" detector for V^^ in Figure 6) as its

input waits for two negative-going edges of V^ before gen­

erating a signal to start action (G) for the analog to

digital conversion.

Page 31: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

11

27 H N i Ii

a 00 CO

« * o CN —•

c od

• H CO

PQ 1

CM

Q O

ca 1 1

CM U or

PQ 1

CM pa or

G 1

CM < O

I >"

v£)L PQ 1

O c o

t o PQ 1

o CJ or

•<T 03 1

O pa o-

r04 PQ 1

O < or

^-^ pa to -3 N w ^

I

CO >

rH O

C/3

00 CO

o o H H CO CO

O 0) w e

CO

A

u I -ri

m CM

0)

3 C S o o

3

u

0) 4J CO

Ti 00 <u

OS

4J 3 CL 4J 3

o 0 0

0)

3 00

• • • • • • • I I

to

»

0 c:

CO PQ

N

0 0

NO

N

H

Page 32: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

28

•2 I

STC

11 I

I

/VL / N I

I N 1

/

ramp

PWM out

PWM

flag

(6 msec) L

"window" ZSi^A

LJI'

N.

\

:ti

Figure 9. Timing Diagram for Magnitude Measurements.

Page 33: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

29

This above method would be sufficient for all frequencies

were it not for the inherent rise time of the peak detec­

tor (T = RpC = 15 milliseconds). Consequently, for

frequencies greater than 100 Hz, a constant time delay of

(5T = 75 milliseconds) is needed to guarantee accurate

peak levels to the A/D converter. This time delay was

later increased to 100 msec to also allow sufficient time

for the high-frequency phase measurement process discussed

in the next section.

A typical timing diagram for the magnitude measure­

ment mode is shown in Figure 9. Since the measurement

process for V is essentially the same as that of V. ,

then the following timing discussion can be applied to

either.

At time T^, the hardware command STC^ is given.

This, in turn, multiplexes either V. or V, (depending on

• • • • •

tti

»

B2) into the input of the peak detector, and also triggers 0

either the 100 msec time delay (f >lOOHz) or enables the

FDD (f <lOOHz). The case of f <lOOHz is illustrated

because of the interesting timing characteristics. Note

that at time T-, , the sinusoid has a value less than its

peak value. Allowing time for two negative edges of sig­

nal V also allows time for the sinusoid to swing through

its peak value (T^ - T2).

Upon the arrival of the second trailing edge (T2) of

V , the first JK flip-flop of the FDD is reset; its

Page 34: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

30

Q-output then clocks the Q-output of the second JK flip-

flop (G) to a high level. This high level then starts

the ramp generation and clocks the 6 msec delay (ramp

timer). Once the ramp reaches the value of the peak

value (at time T ), the output of the PWM comparator

output goes low which disables the 256kg clock to the 12-

bit counter in Figure 8. At time T-, (T^ > T ), the 6 msec

delay goes low which sets a flag to the computer. Once

data has been transferred to the 21^K, then the hardware

command, STC^, goes low (time T/) which clears all flip-

flops and discharges the capacitors, C and C .

Low and Mid-Frequency Phase Measurements

For frequency measurements less than 3 kHz, two IV

other control bits B2 and B^ are introduced. The two ?

signals of interest are the "zero-crossing" detector out- ^

put signals, V and V . f r s

0

In order to determine a particular frequency of <

operation by measurement, the following analysis is pre­

sented. A clock of frequency, f , when "Anded" to the

signal V of frequency f (or period T^), yields a pulse

train of frequency f modulated by signal V . The

number of counts (N ) within each modulated "window" is

given by.

Page 35: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

31

Solving for the frequency f of the signal V^, then,

results in

fr = ^c' 2Nc • (35)

By knowing the count number, and clock frequency, the

operating frequency can then be determined.

Due to the unavailability of a 36-pin connector for

the SID-21MX interfacing, the word size output register

had to be limited to a 12-bit word, and a 1-bit sign.

12 Therefore, by knowing the maximum count (2 - 1) at the

lowest operating frequency of 10 Hz, the only unknown, f ,

can be found by using equation 35, or,

f , <2N f_. = 2(2^^ - 1)(10 Hz) 'v2^^ Hz (36) 3 cL — cmax rmin ^ / \ / \ / ^

Therefore, to insure no overflow will occur, f , is (T

1 5 * chosen at 2 Hz or 32kg Hz. Similarly, the mid-frequency [' clock, f , was chosen at 256kQ Hz. The implementation of cm o

a second clock was to increase accuracy over the mid-

frequency range, 100 Hz - 3 kHz.

Since a one degree of resolution of phase measurement

could be attained on either of the above ranges, 10 - 100 Hz,

100 Hz - 3 kHz, then no averaging of measurements was neces­

sary. This means that only one cycle of V^ is needed to

gate the clock to the 12-bit counter. This is accomplished

by the sequential logic circuit shown in Figure 10. It is

t)

Page 36: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

CM

32

- m H en

CO

e o o

3 Vl (U g

vH 4J

i H

u H CO

o 60 M cd a. r-l W tn

3 U

.H

o o C

C3 cn

o CO CO

Oi

a M 3 00 •ri

• • • • l!

•••

0

! , i

i i I j i

(0 >

Wi >

o PQ

O H CO

.—t

PQ CM

a

^^ CO

>

"">.. u

>

Page 37: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

33

termed a "single-pulse-emitting circuit" (SPEC). Upon a

command sent by the computer and a correct command code of

STC2, the SPEC will allow one complete, % cycle of fre­

quency signal V^, to gate the clock to the 12-bit output

register. This results in only one count per command sent.

Another feature is the flag generated from the second JK

flip-flop of the SPEC when all action is complete (Flag 2).

At this point, the data word has been loaded into the out­

put register of the SID and is available to the computer

for processing.

The above circuit can be expanded to include phase

measurements by introducing another control bit, B2, for

routing either V or X to the SPEC. By using equation 7,

a ratio of X to V taken and multiplied by 180 gives the

phase angle of the load impedance, Z, .

However, this phase angle is insufficient because of

the lack of sign specifying a leading or lagging phase

angle. An arrangement as shown in Figure 8 using a

D-Flipflop completes the phase measurement by specifying

the sign. If the signal V^ (resulting from V ) , is leading

or lagging the signal V^ (resulting from ?^^), then the

output sign bit of the D-Flipflop to the computer is a

logical '1' or '0', respectively.

For the lower frequency range (<100Hz), a compensation

network had to be devised to eliminate unwanted digital

"noise" from the SPEC input. This noise is attributed to

the low slew rates of V. and V, (at lower frequencies) x n J-i

Page 38: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

into the zero-crossing detectors of Figure 6. Supposin;.', tnc

magnitude of V^at 20Kz is 10 V, or in the time domain,

V^(t) = 10 sin(2Tr 20t) . (37)

Then the instantaneous slope at V = OV(t=0), is:

d(VL(t))

dt t=0

= 4 0 0 — ^ = 1.27- ^ ^ ! — (38) sec psec

For normal operation, the input slew rate of 72311 should

not fall below the value of 20 mV/psec.

Since this condition is not met for low frequencies,

output oscillations of 2 MHz occur until the input is out

of the threshold range of - 5 mV. The compensation network

(Figure 6), labelled as pulse-width extender (P\^), con-

s s a minute pulse-width extension to compensate for the

J !

sists of a dual-edge detector and a retriggerable mono- [)'

stable multivibrator. Its operation is as follows: "^^

If a change in the level of the signal, V , occurs, c,

this will trigger the monostable multivibrator via the

dual-edge detector. The multivibrator, being retriggerable

in nature, continues to indicate a high output level condi­

tion (signal V,) until there is an interval of time, greater

than its set delay time (3 jusec), when no change in input

occurs. The "Oring" of signals V^ and the delayed signal

V results in a composite signal V'. The total effect is

Page 39: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

35

leading or trailing signal noise of the original signal,

This particular scheme is used only for sinusoidal

frequencies where the slew rate is less than the minimum

acceptable slew rate ( < 100 Hz). Also, since the pulse-

extension interval is on the order of microseconds, and

the highest used frequency has a period on the order of

milliseconds, very little error is introduced into the

digital phase measurements ( < .2%). The total compensa­

tion network incorporates two PWE circuits to accomodate

both Vg and V^. The control bit, B4, determines whether

signals V and V are to be modified to V and V , before s r s r

gating the SPEC. The value of B4 is, again, dependent on

the particular frequency of operation.

High Frequency Phase Measurements

For the frequency range of 3 kHz - 100 kHz, another

means of phase measurement was undertaken. Referring to

the above discussion concerning the Xoring of the two

signals, V and V , a pulse train with duty cycle, 0^/180

is generated. This particular duty cycle also has a

unique DC level which can be expressed as

Vj ^ = % duty X 15 V . (39)

The 15 volts comes from the higher level logic signal of

the buffer transistor (Figure 10). This effectively

o

Page 40: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

3u

triples the phase measurement accuracy. The high-

frequency phase circuit uses a simple RC, low-pass filter,

with a break-point frequency of 80 Hz, to extract the DC

component of the signal X^. This minimizes the ripple

factor to 37o at 3 kHz. Since the rise time of this filter

is approximately the product of the R^C combination, then

5T = 100 msec must be allowed for steady-state conditions

to prevail. After the 100 msec delay, the DC phase voltage

is sampled in a similar manner as that discussed in the

previous section on magnitude measurements, starting at

time T2.

The control software necessary to generate the dif­

ferent modes of operation for the SID is discussed in the

next chapter. The first subroutine discussed, LSKIN, is rv

used for low frequencies which enables the PWE, FDD, and

the low frequency clock (32kg Hz). The subroutine, MSKIN,

disables the above circuit functions and enables the con­

stant time delay (100 msec) and the 256kg Hz clock. The

third subroutine, HSKIN, implements the analog phase

method for frequencies greater than 3 kHz. However, it

can be used for frequencies as low as 600 Hz. This is due

to the large phase angles at these frequencies which

results in negligible AC ripple content.

For frequency control, the subroutine, DAC, was

written which converts a frequency specified in the BASIC

program to a corresponding digital voltage word that is

Page 41: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

37

sent to the D/A converter in the SID. However, the DAC

subroutine is not limited to operation with skin impedance

measurements. An available output from the D/A is

located on the front panel of SID for other laboratory

applications.

Page 42: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

CHAPTER IV

SOFTWARE DESIGN

There are eight assembly language subroutines used

in conjunction with the SID BASIC language program. Five

of these subroutines can be used independently for other

laboratory applications. The other three subroutines,

LSKIN, MSKIN, and HSKIN, were specifically written to

process the frequency, magnitude and phase measurements

associated with the SID system. These SID subroutines i <

will be discussed first to maintain continuity with the 3

previous section. A brief discussion of the other five 1?

subroutines will be included to familiarize the operator

with the graphic and D/A capabilities for other laboratory

applications.

The BASIC CALL subroutine, LSKIN, was written to

obtain low frequency (F <100 Hz), magnitude, and phase

parameters. Its CALL statement has the following format:

10 CALL (2,F,P,M)

The first parameter, F, is the sample count obtained by

the "ANDing" of signal V of frequency f , to the low

38

M

Page 43: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

39

frequency clock value of 32kgHz. However, to arrive at

the correct frequency value, the parameter, F, must be

multiplied by 8 in the BASIC program. The second param­

eter, P, is the ratio of X^ count to V count. In order

to determine the phase, the value of P must be multiplied

by 180 in the BASIC program. The third parameter, M, is

the ratio of V ^ to V^ To determine the magnitude, Z^

the value of M must be multiplied by R, = 90kfi in the

BASIC program.

The CALL statement for the subroutine, MSKIN, has

the same parameter format as LSKIN, or:

10 CALL (3,F,P,M)

The three parameters must be algebraically modified in

the same manner as that described for the CALL subroutine,

LSKIN.

The BASIC CALL subroutine for the range 3kHz -

lOOkHz, is labelled HSKIN. Its statement format consists

of only two parameters:

10 CALL (4,M,P)

Page 44: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

41

The parameter, M, also serves as the ratio, V, /V. Lp inp

while the parameter, P, is the data sample obtained by

the ratio Vj /15V. Again, to determine the phase, the

value of P must be multiplied by 180° in BASIC software

The CALL statement for the subroutine, DAC, has

the following form:

10 CALL (l,V/5)

To send the value of voltage, V, to the D/A converter

with output range of 0 - 5V, the parameter, V, must be

divided by 5. This fraction, in turn, is multiplied by

an all "I's" 12-bit register which is then sent to the D/A

converter.

The last four subroutines, used in the development

of SID, control all mode operations directed to the 4010

graphics terminal.

Subroutine 5, the Graphics mode, allows the operator

to plot either lines or points. The CALL statement format

for the graphics mode is:

10 CALL(5,I,X,Y)

Page 45: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

42

Either a point, dark vector, or light vector can be plotted

depending upon the value of the intensity parameter, I = -1,

0, +1, respectively. The X-Y parameters are variables

whose values determine coordinate location where the origin

(0,0) is located at the lower left-hand portion of the

screen. These parameters should remain positive and less

than the graphics terminal maximum visible array coordi­

nates (1000, 800).

The Erase subroutine, SUB6, offers the capability

of independently erasing the graphics terminal screen.

This prevents screen clutter for programs having the need

of multiple diagrams. Since there are no parameters, SUB6

has the following CALL statement format:

10 CALL (6)

Subroutine 7, the Alpha Cursor mode, is very useful

in moving the Alpha cursor anjrwhere on the screen for any

type of character output. Its BASIC CALL statement format

is :

CALL (7,X,Y,C)

i

ti

Where the X-Y parameters, again, define a particular

Page 46: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

43

coordinate on the screen for an ASCII character print-out

of the parameter C. For character print-out of more than

one ASCII character, e.g., data print-out, axis labelling,

et cetera, the following format is used:

10 CALL (7,X,Y,0)

15 PRINT' 'ASCII string of characters"; variable field

This particular format establishes desired alpha-cursor

location and remains in the Alpha mode and same location

for characters to be printed. It is important to note

that once the Alpha-cursor reaches an end of line, it 3:

returns to one of the two margins incorporated within the

screen of the 4010 graphics terminal. Hence, in order to t"

write more than one line at coordinate X,Y, with margin at

X, the programmer must allow for additional CALL subroutine

7 statements which reset the Alpha-cursor to the margin at

parameter X.

The CURSI subroutine gives the operator flexibility

in directly determining various coordinates upon the termi­

nal screen by manual adjustment of the illuminated cursor.

The BASIC CALL statement format takes the following form:

Page 47: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

44

CALL (8,C,X,Y)

The parameter X and Y are screen coordinates sent to the

computer to establish the cursor position. The parameter C,

is the ASCII code of the key-board character used to trans­

mit the coordinates X and Y.

The four graphic subroutines can be used indepen­

dently of the SID system. It is necessary, though, to

load two object paper tapes into memory. The first object

tape contains only the SID subroutines (1-4) for mode

control to the SID, but has the subroutine table listed.

The second tape contains only the graphic subroutines f

(5 - 8) and lacks the format necessary to be linked inde-•• »

pendently with BASIC. The SID subroutine, DAC, can be «»

useful for other laboratory applications by simply addres- ^

sing Subroutine 1 with the correct voltage parameter and

then taking the D/A output from the SID. A listing of all

subroutines is located in Appendices F and G.

The BASIC program for the SID control is listed in

Appendix D along with a program description. This program

should be loaded after loading the object tapes containing

the system's software CALL subroutines. Otherwise, the

program tape will not be accepted correctly, and error

codes will be generated due to the CALL statements not

Page 48: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

45

being properly defined.

The following chapter discusses measurement results

and the degree of accuracy that can be attained from the

SID system. Also included are the various illustrative

options available in the BASIC program.

r

ti

Page 49: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

CHAPTER V

RESULTS

Upon the completion of all hardware and software

interfacing, the Skin Impedance Detection System was tested

for measurement accuracy. In order to compare magnitude

and phase errors to that predicted during design analysis,

a known impedance load, consisting of the three basic cir­

cuit elements was used to represent the skin impedance. d

These values, RQ, R-., and C, were chosen according to the i

4 • mean values for the six subjects measured by Burton. The i circuit values were

RQ = 1 kohm.

f

{I

R^ = 180 kohm, and ;' n

C = .0085 microFarads. <;

The magnitude and phase values were then measured

over the frequency range, 10 Hz - 100 kHz, and stored in

computer memory. The Bode plot, obtained from the load

impedance is shown in Figure 11-A. The equivalent element

values were then calculated by computer algorithm. The

calculated circuit values were:

46

Page 50: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

47

RQ = 1.037 kohms

R[ = 179.3 kohms

C = .00829 microFarads.

The corresponding Bode plot for these values was then

generated and is shown in Figure 11-B. The mean error

for the measured values is 2.2%.

A somewhat more significant error occurs in the phase

measurement at frequencies greater than 50 kHz (6%). This

can be attributed to the loss of high frequency components

of the "zero-crossing" detectors' outputs. This causes

the waveforms, V and V , to have rounded corners rather

than sharp corners, resulting in the loss of DC information

proportional to the phase. To compensate for this problem, I'

comparators with higher frequency responses could be used. i »-

Either way, this error at the higher frequencies does not !!

affect the AC circuit element calculations taken from palm-

to-palm measurements.

The speed at which measurements are taken is limited

to the acquisition times between the SID and the computer.

From the instant the frequency is sent to the SID, the

cycle-time for each skin impedance measurement, consisting

of four to six data samples from the SID, is roughly

800 msec. This time also includes the print-out of each

skin impedance parameter. The effective completion time

for impedance measurements, considering 40 frequency

t

I'

Page 51: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

49

samples, is 32 seconds. For Bode plot generation and AC

model synthesis, an additional 30 seconds is needed. All

skin impedance information is available to the operator

one minute after beginning the measurements.

Since subject-data correlation was not the primary

interest of this thesis, no extensive research will be

considered at this time. However, for illustrative pur­

poses, a sample set of skin impedance Bode plots are inclu­

ded in Figure 12 of two hiiman subjects. Figure 12-A serves

to illustrate the degree of conformity between an actual

skin impedance Bode plot and the three-element AC model

Bode plot. Figure 13 lists the parameters obtained from

the four other human subjects.

Other graphical aids have also been incorporated

into the system software, depending upon the operator's

intentions. The operator may be interested only in obtain­

ing curve values, possible because of unusual characteris­

tics measured at sites other than the palmar regions. If

this is the case, the operator positions a cross-hair

cursor on the desired curve values, depresses either the

M or P keyboard character (magnitude and phase, respec­

tively) , and the coordinate values will be referenced and

listed to the left of the graph (Figure 14).

The operator can also choose the manner in which he

wants the AC model to be synthesized, i.e., whether he

wishes to enter the graphical coordinates for circuit

I

(

' tJUS TCCM UB«^«^

Page 52: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

50

element calculations either manually or automatically.

For example, if several phase points are within a few

degrees of the -45 phase crossings, the operator could

visually enter the exact -45° point off the curve to

obtain a better curve fit between the measured and ideal

Bode plots. Otherwise, a computer algorithm furnishes

the element values automatically. In addition, hard

copies of the graphical information are available in the

SID system and make it possible to generate subject-data

files.

.;

Page 53: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

(.-.0 sooaSsp UT «oxSuu ascqd 51

^-^

Gil • r - l

«_i.'

T-(3UTx PTTos) smqo ux 'epnqxuSBra.

( . ) Eoo jaop uT *^\%\re asEi^d

e^ Li« • « - l

\

*5i' C-i 1

Q h? 1

f^» lj~.! O ni- -y u"« } I 1

O '-.0 1

I T I

r -i

iFj CO

i 1

*'.- >! 1 ^ I * i

f-O H; >

Q -

fv. K) J S n-S

}1 (5) 01

r.o n re o

• ' . } • ' 0 CO o f^ •*-<

» ' . -» Ql

0^ O <£ C:' o: l i -•

C?! ijj • 1

I-U u-« tA m 05 i\l

• • It

u u

M -*r

1^-C3 •*-*

W y-\

\n -.•*•

\

9 fj-i

.*—• •\y

• C?i U-

^ \\\\

1 *> I * i ' in*

N

U c a 3 C* o

5C

&

a 3 o U

m » " ? » ) ? ? » • « ' « » -LLL M i ! 1

V , ' - ?

rri

( a u j x PTTOS") snnio ux ' apnqx i iSca

u -a

c E

(A XJ O

O

O PQ

O U

60 •H

1

Page 54: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

52

Re= le.?? Fri= ? i 8 8 i

OHt'-S OHMS

1 ri jT* C= 2.56197E~88 FARADS ..T;^:

C FQ.CiST -45>= 86 H2 ,^:''::1 0

'10

- • ^ 0

•a I

•IC ^>

Cfl 0) 0) u ta o

rH u c O W

- , - U c

r s i l e ^ lei-' 10"^ 1 9 ^

0)

1 M . 1

Re= 1788 OHMS . Kl= 26S333. OHMS C= 1.31728E-08 FARADS ..-FQ.<1ST -45>= 44 HZ •'—

o m.

o

leSKs-

G

20

- 3 9

• 10 K

•a d •H C 00

8

0) a o u o

o r-l eo c d

« CO

• I 'gl i.q!2 iv33 104 i g S

frequency, in Hz

Figure 12- Bode Plots of 2 subjects: (A)inale-age 23, (B)female-age 50

Page 55: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

53

I' I n I

R8= J351 OHMS Rl= 136681, OHMS C= i.72939E-88 FARADS FQ.<1ST - 4 5 >= e? HZ

G^l^male-age 23

4 i

>0= 1 4 7 3 OHMS

R l = 2 3 6 6 4 5 . OHMS C= X.2917SE-SS FARADS FQ.<1ST - 4 5 ) = 42 HZ

CB) male-age 20 I • • I (

m= 7U3 OHMS R i ~ 42333. OHMS C= l..611i34E-08 FARADS FQ.<iST -45>= 233 HZ

CC) female-age A

R0= 1663 OHMS Rl= 116.305. OHMS C= 2.7930SE-08 FARADS FQ.<iST -45?= 48 HZ

(D) male-age 23

Figure 1 3 . Skin Parameters for four human subjects

Page 56: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

5. C.) sasaSsp ux 'Djguc ssuqd

»S) C ' CD «;x«''" 'ZD CIJ 'Z' Q G» ^ C'i r\i "yr^ij:« £» r - co

{ ( I I I 1 t I i ir»

3

1 •vX^ N..-' •-..-• ^ . . ' - ^

(3UXX p'pIos)smno u j 'spn^xuS^ra

M X^IO

*

X o

«M -r-«

CO r':« - ^ Cu OJ -w

'O i • tj:? c o ^

\^^ 4

fSf f-OO'l ^ I f l

r -j X

#

u ^ ' - ^ '.i>i?i

CO "!=** m^^

X o

• ^

CO'X 01 T-fCC* C*J"r-!

•»-< rs:> v:» ii~'—' ' ^

ti r - Vl ' - r - { •

e- ' 3 l i - HlJL

-

U < ! : ' tT'

^£tl» r.» • 1 G

•r^rv •

eg 11 TT ' 1 GI

1} Lt- It U . Ld o:« <i: X

UJ CO <r X

^ '^cvj Ci-ro a . ' ^

«

K» i - «

G J t - C

II •

•J? <r X

N X

U c (U 3 cr (U

* j

C •H T3 >-i O C O

0) (A ra

c r:

o 3

c • H

<TJ 4J . Q • O (A VJ O

O »H

« * o

O PQ

a j =

O *J

3 CO

•H

Page 57: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

CHAPTER VI

CONCLUSIONS AND PROPOSED MODIFICATIONS

In summary, this thesis concerns itself with the

extension of the Bode analysis techniques used by Burton

to encompass an automated system for acquisition, proces­

sing, and display of skin impedance data. Following data

acquisition, the data is processed by a computer, and a

Bode plot of the data can be graphically generated on a

display terminal. From this plot, the AC model parameters

of the skin can be automatically calculated using the re­

lated equations of the skin impedance function furnished

by Burton. This Skin Impedance Detection System (SID)

essentially eliminates the time-consuming problem encoun­

tered with a manually controlled system. Hence, more time

can be spent in finding possible future correlative infor­

mation between a person's mental or physical condition and

his skin impedance parameters.

Depending on the success of further research, the

overall Skin Impedance Detection System can be modified

into a self-contained unit and possible even a portable

unit. With the advent of a voltage-controlled sinewave

generator on a single integrated circuit (IC) chip, the

multi-waveform generator contained in the SID system could

55

Page 58: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

1 11

56

be completely replaced. This reduces the SID system to a

single measuring unit but still requires the control of a

general-purpose computer system. This elaborate system

can be further reduced in size by incorporating a micro­

processor control system with only two I/O ports: one

port to control the various modes associated with SID, and

the second port for a micro-programmed display of the skin

impedance data.

Also, a complete unit, consisting of a VCG and

calculator IC chip, with no more than five memory loca­

tions and a minimiam amount of control hardware, could be

portably used in clinical applications. The patient's

parameters could then be viewed on an LED display. This

vast simplification is due to the fact that only three

points of the Bode plot are needed to determine the three-

parameter model: the high-frequency magnitude asymptote

(obtainable at 200 kHz), the DC resistance, and the lower

frequency at which the measured phase angle is -45 (less

than 2 kHz).

Since it is known that a person's anxiety levels

remarkably affects his skin impedance values, the portable

unit could be further modified to monitor either the phase

or magnitude at a pre-determined frequency. This frequency

could correspond to the first -45° crossing of the patient's

phase angle. By monitoring at this frequency, any change in

the value of -45° could be correlated to the degree of

Page 59: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

II

57

stress placed on the patient during examination.

Although the total capabilities of skin impedance

measurements are not yet known, it is a procedure that has

features of being quick and non-invasive. As a result,

this procedure lends itself more easily to the application

in diagnosis and prognosis of many pathological and psycho­

physiological states.

Page 60: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

REFERENCES

Lykken, D. T. Properties of Electrodes Used in Elec-trodermal Measurements. Journal of Comparative & Physiological Psychology. 1959. 527 629-634.

Kinnen, E. Electrical Impedance of Human Skin. Medical 6e Biological Engineering. 1965, 3, 67-70.

Schwan, Herman P., & Maczuk, Juriz G. Electrode Polarization Impedance: Limits of Linearity. Engineering in Medicine & Biology, 1965.

Burton, Charles E., David, Robert M., Portnoy, Wm.M., & Akers, Lex A. The Application of Bode Analysis to Skin Impedance. Psychophysiology, 1974, 2, 517-524.

Cole, K. S. Electrical Conductance of Biological Systems. Cold Spring Harb Biology, l TT 1', lOl-TTET

A Pocket Guide to the Hewlett-Packard 2100A Computer, Hewlett-Packard Co., Palo-Alto, California, TT7

Systems. Cold Spring Harbor Symposium on Qualitative

53

Page 61: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

Appendix A;

Appendix B;

Appendix C

Appendix D

Appendix E

Appendix F

Ai;Dendix G

APPENDICES

Interfacing Procedures 60

Program Initialization 69

BASIC Program Operation 73

BASIC Program Listing 80

Connector-pin Assignments for Data Flow between SID and 21MX 89

SID Assembled Listings 92

Graphics Assembled Listings 100

59

Page 62: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

APPENDIX A

Interfacing Procedures

60

Page 63: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

61

Before operating procedures can be discussed, an

overview of the system and general description must be

presented. A block diagram of the total system is shown

in Figure 15. First, a discussion of the interaction

between the HP-21MX system and the Skin Impedance Detec­

tor (SID) will be presented. This overall impedance-

measurement system includes both the Tektronix Graphics

Terminal (operator interface) and the Versatec Printer/

Plotter (permanent listing of program and data). This

discussion will be followed by a description of the

interaction between SID, the Wavetek waveform generator,

and the subject whose skin impedance will be measured.

Computer Peripherals

There are three computer interfaces in the total SID

system: the temporary 21MX-2100 interface, the 21MX-SID

interface, and the 21MX-Graphics Terminal interface.

The 21MX-2100 and the 21MX-SID interfaces require

the use of the Hewlett-Packard 12566A Microcircuit Inter­

face Card (MCR). The MCR provides the link between SID

and the 21MX computer. For skin impedance measurements,

the select code for the MCR is octal 11. The interface

card permits bidirectional information flow: 16 bits of

parallel input and 16 bits of parallel output, to or from

the computer. The MCR also has two lines of control: the

enable line, which sends a command from the 21 MX to start

t

I

I I

Page 64: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

62

> o

to j - i CO

Q

to C CO

•H (0

00 o

f - l CO

c <

A- f

i

u >< 0)

^ 3 <^ p.

6 04 o

0) O M C O

C ttf XJ

^ 0) <U CO CU *J

4J 3 O

>

o o > - >

4J 3 o

Q) >

M 0) 4J 0) > CO :s

CO

M

es O CO

U-l M Q) 0) > C CO 0) :s t>o

1 5 —1 . / - s <U • • o* <u c o <u ^ •H o n e u) o U4 cd

r - l u

to

00 CO

o CO

u 0)

c

<u

CO

Q M CO

i n

0)

u 3 00

Page 65: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

action, and the flag line, which accepts an action-

complete status from the I/O device. Data signals are

encoded as ground-true and positive-false. Hence, any data

word, W, output from the MX's A/B registers, is available

as W to the I/O device. In addition, the enable line has

the option of being either encoded in positive or nega­

tive logic. The flag line can also be set to either

positive or negative-edge triggering. For operation with

SID or the 2100, the flag set jumper should be set to

positive-going edge triggering and the enable line jumper

should be set to positive-true.

Before the 21MX and SID can be physically inter­

faced by cable, a memory transfer must be implemented

between the 2100 located in the Computer Lab and the 211»DC

located in the Biomedical Systems Lab. This is necessary

because of the lack of read and write peripherals being

situated locally with the 21MX. Consequently, all perti­

nent memory for the SID system must be loaded in the 2100

via magnetic tape and paper tape. A short machine instruc­

tion program entered into each computer allows memory

transfer from the 2100 to the 21MX.

This communication linkage is bidirectional, e.g.,

if the paper tape piinch is needed following BASIC program

modification in the Biomedical System Lab. Two important

distinctions must be kept in mind if this particular

process is to be used. First of all, the select code for

Page 66: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

/ ' IL.

the 2100's MCR is octal 14, and the select code used wiih

BASIC in the 2100 system is octal 20. The respective

select codes for the 2lMX's MCR and BASIC drivers are

octal 11 and 10. Hence, this modification must be kept

in mind when the operator is programming computers. A

more detailed set of instructions is located in Appendix

B. Once the memory transfer is complete, the interface

cable between the 21I4X MCR and the SID is connected.

During program execution, an OTA SID instruction

followed by a STC SID instruction initiates data flow from

the 21MX to the SID via the MCR. Depending on the word

output from the computer, one of three basic data proces­

ses will be actuated: frequency change, magnitude measure­

ment, or phase measurement. The latter two processes, when

complete, will generate a flag signal back to the 21MX.

Once this flag is received by the computer, a return to

the system's BASIC program will be initiated following

software formatting of the data obtained from the SID.

The' 21Mx - Graphics Terminal interface requires a

HP-12531C high-speed interface card. Its particular slot

ninnber in the 21MX is select code 10. The Graphics Ter­

minal 4010 has several modes of operation which will be

used in skin impedance measurements. First, in the Alpha

mode, the Terminal is used to display any of the charac­

ters on the keyboard. A non-storing Alpha cursor is

displayed on the screen to indicate the next writing

Page 67: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

65

position. This is the Alphanumeric or Alpha cursor.

The display screen allows up to thirty-five lines of

information with a maximum of seventy-four characters in

each line. There are left and right margins with an

automatic carriage return and line feed at the right

margin. When first turned on, the 4010 will automati­

cally reset to the Alpha Mode.

The second mode of operation is the graphic plot

mode (graph). In the Graphic Plot Mode, the 4010 uses

1024 addressable points on each axis. Only 780 of these

points are visible on the vertical (Y) axis. The addres­

sable points are obtained by sending data in groups of

four bytes. An ASCII GS character gets the 4010 into the

Graphic Plot Mode. Depending on the value of the inten­

sity parameter sent from the computer, either a vector or

a point will be plotted.

Thirdly, by using the Graphic Input Mode and soft­

ware, the computer can request the following graphic in­

put information: the Alpha cursor coordinates location,

or the Cross-hair cursor intersection coordinate location

For Cross-hair cursor operation, the cursor is enabled

from the computer. The operator must change the Cross­

hair controls to the desired intersection point. When

the operator strikes a keyboard character, the character

and the coordinate location are sent to the computer.

The fourth mode of operation, Hard Copy Mode, is

Page 68: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

between the 4010 and the Versetec Printer/Plotter.

Although the Versatec P/P is not directly interfaced to

the 21MX (Figure 16) in this thesis, it does have this

capability. The primary interest of the P/P in this

system is for a hard copy print-out of the data obtained

from the Graphics Terminal screen. This is easily accom­

plished by depressing the "copy" switch on the Graphics

Terminal front panel.

Description of Wavetek-SID Interface

The Wavetek's waveform generator is used in the total

SID system for sinusoidal frequency generation and for

indirect magnitude control of the AC current source located

within the SID in performing skin impedance measurements

on the subject. The frequency actuation is accomplished

by using the voltage controlled generator (VCG) input to

the Wavetek. This connector allows external control of

the frequency. With 0 volt in, the basic generator fre­

quency (50 ohm out) is determined by the frequency range

selected and the frequency dial setting on the front panel.

A positive VCG voltage will increase this frequency, and

a negative voltage will decrease the frequency. Up to a

1000:1 frequency change can be controlled by supplying an

input voltage range of 0 - 5 volts.

The output attenuation knob of the Wavetek provides

the capability of indirectly changing the amplitude of

the AC voltage controlled current source (VCG) located

Page 69: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

67

within SID. A zero attenuation level (cw vernier and Odb).

corresponds to the VCC having a current amplitude of

126 ;iA. Knob adjustments of -lOdB, -20dB, et cetera have

the effect of decreasing the VCI' s amplitude by (l26yiA) x

(10 2) = 40;iA, 12.6MA, et cetera. For normal operation

(skin impedance range), the -lOdB (cw vernier) setting

should be chosen. This setting best suits the range in

which the magnitude of the skin impedance lies. Also, for

the most efficient operation, only two manual range adjust­

ments have to be made during system operation. These

range settings should be Xlk and XlOOk (counterclockwise

(ccw) range vernier, clockwise (cw) range dial) for fre­

quency ranges of lOHz - IkHz and IkHz - lOOkHz, respec­

tively.

The analog voltage to the VCG is supplied by the D/A

converter output incorporated in the design of the SID.

The D/A converter, a DAC-12QZ, is a binary complement

coded, 12-bit converter with optional output voltage range

and a coriversion speed of 5;jsec (see spec, sheet). The

converter operates from -15 source, and +5 source. There­

fore, jumper connections provide 5 output ranges: -2.5V,

tsv, ^lOV, 0 to +5V, 0 to +10V. By selecting the 0 to 5V

range (compatible with the Wavetek VCG input) a frequency

resolution of .24% of the range setting can be obtained.

The input impedance of the VCG of the Wavetek (5kQ) proved

adequate so that no buffering is needed. Because of these

Page 70: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

68

different operating ranges, the DAC-12QZ can be useful in

other laboratory applications that require the use of a

programmable D/A converter. It is important to note that

the outgoing data word (W) from the computer via the MCR

is encoded W to the binary-complement D/A converter.

Hence, no word coding between devices needs to be intro­

duced.

Subject-SID Interface

The subject should be connected via a coaxial cable

to the SID connector designated as "constant AC current

out." Note that since this is a current source, this out­

put should be shorted when not in operation. Safety can

be accomplished simply by keeping the Wavetek off between

measurements.

There are three possibilities for a measurement

protocol:

1. Most desirable - wipe off the palmar areas with methanol. Place a good (not scratched or otherwise damaged) silver-silver chloride (NASA) electrode, filled with NASA yellow electrodermal paste on each palm and perform the measurement. Clean and refill the electrodes between each subject.

2. Next desirable - if there is no electrodermal paste, use NASA blue electrocardiography paste. Place one elec­trode on the inside of each forearm, halfway between the wrist and the elbow, after wiping the area with methanol. Clean and refill the electrodes between subjects.

3. Least desirable - if there is no paste at all, use NDM long or short-term disposable monitoring electrodes, Place the electrodes on the inside of each forearm, as in protocol 2; clean the electrode areas with methanol first. Use new electrodes for each subject.

Page 71: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

APPENDIX B

Program Initialization

69

Page 72: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

70

Since operations between the 21MX and the 210G are

not straightforv/ard to the unexperienced operator, a list

of program initialization instructions have been included.

These instructions apply even though skin impedance measure

ments are not taken, e.g., if another lab experiment

requires the use of BASIC. By following this list of step

by step procedures, the operator can transfer memory

bidirectionally between computers, to obtain a paper-

tape print-out of his program. There are five listings

of information needed to complete memory transfer:

1) A magnetic tape which includes BASIC,

2) The SID subroutines (both tapes are needed if operator is going to use graphic subroutines associated with the SID subroutines),

3) The two machine instruction programs: A) Dumper program B) Dijmpee program,

4) BASIC program used by operator, if any, (e.g., the BASIC program for SID), and

5) Listing of memory locations renumbering I/O select code (SC) instructions in BASIC.

An instructional flow chart is included for the

operator's convenience. The first flow chart is diagrammed

to show memory transfer from the 2100 to the 21MX. The

second flow chart outlines a similar procedure for memory

transfer from the 21MX to the 2100:

Page 73: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

To Transfer Memory fror: 2100-to-2i::

71

Load BASIC via

Mag. tape.

Halt 2100

Load SID Subs.(2)

no

2100: P-15000.

run. 3F

Load 037710 = 000007

P-lOOs' run.

Load BASIC tape(Ptape)

Halt 2100

Load Dumper Program SA-lSOOOs,

via 2100 display

register (SC-lAg)

P-15000ft. run.

Load Dumpee Program SA-37000g,

via 2JMX display

register (SC-llg)

P-37700R. run.

Wait 5 seconds. (21MX will not

Halt an fOmaM-ran y^

Halt 21MX

Dump 210C

M 15000 15001 15002 " " 3 •••»4 " " 5 "•'6 " " 7 15010 15011 " " 2 " " 3 ••"4 " " 5 " " 6

>er Program l-to-21MX

T 10311A 10231A 027001 10671A 067016 057015 02701A 037015 163015 102614 10371A 027001 102077 000007 037677

yes

Dumpee Program 2100-to-21MX

37000 37701 37702 f I I I o

» • » » 4 I I I f r

I f f 1 ^

37710

1067JJ_ 1037j_l_ 1023n_ 027702 1025n_ 037710 027700 000007

Page 74: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

?->

Good Memory Transfer. 2100 will indicate Halt 77

Change BASIC I/O instructions

to SC-lOg for 21MX

To address 4010 Graphics Terminal:

P-2025g(BASIC prog, in memory), or,

P-100g(No prog, in memory)

IE For Skin Impedance

Measurements: Disconnect 2100-

21MX cable 6. connect the SID cable to 21MX

run.

To Transfer Memory from 21MX-to-2100

Load Dumper Program into

21MX (SC-llg)

Make sure 2100-21MX cable connection intact.

T P-15000ft, run

Load Dumpee Program into

2100 (SC-14p) 3K

P-377008, run.

If 037710 = 037677, good

memory transfer. t U - ^

Change BASIC I/O instr. to 20Q(CRT),22ft(TTY).

Page 75: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

APPENDIX C

BASIC Program Operation

73

Page 76: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

a-The higher level language used in conjunction wit';.

the SID is the BASIC language which controls all communi­

cation between the computer and the operator via the Tek­

tronix Graphics Terminal. Once the Program Initialization

instructions have been completed (Appendix B) , the 21M::

program pointer has been set at 2025g and the computer set

in run condition, the computer will address the graphics

terminal with the status condition,

READY

At this time, the operator types the following BASIC

command,

RUN

followed by the return key. This sets the BASIC program

(listing in Appendix D) into operation by first blanking

the screen with the graphics subroutine. Erase. Since

there are no parameters needed to execute an erase, the

subroutine has the following format:

4 CALL (6)

An erase of the screen can also be performed by the opera

tor by depressing the Page key on the terminal keyboard.

When all frequency measurements from 10 Hz to 1 kHz are

complete, the program addresses the operator with the

instruction.

Page 77: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

75

"Change frequency range to XlOOk, set output attenuation 0 dB."

These setting changes on the Wavetek are necessary for

the frequency range 1 kHz to 100 kHz to provide a sensi­

tive enough output level to record low magnitude values.

Once again the calibration method described above for the

frequency, 500 Hz, is used for frequency calibration at

1.5 kHz (steps 203 - 206).

If the calibration has been completed, then measure

ments commence for this higher frequency range (steps 208

225). Again, all data measurements are stored in array

variables via BASIC subroutine 251 until the highest fre­

quency has been reached. Once all impedance measurements

have been processed and stored in array variables, then

control is returned to the operator for graphic display

procedures.

Graphic Options

There are five options listed by the BASIC program

for graphic display (step 290):

1) Graph and AC model,

2) Graph, cursor derived AC model,

3) AC model only,

4) Graph, cursor, or

5) No graphic operation; End Program.

For options 1 and 3, a computer algorithm is employed to

locate the Bode Plot break-points and generate the AC

Page 78: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

76

equivalent model parameters RQ, R^, and C (steps 700 -

742). Option 2 allows the operator to "visually" obtain

the break-points from the Bode Plot (steps 800 - 827).

These points are obtained using the cursor and the thumb­

wheel dials on the graphics terminal key-board. Option U

generates a Bode Plot with no algorithm. The cursor is

used here to obtain values off the magnitude and phase

plots (steps 585 - 680). Option 5 is chosen to terminate

the program.

If an option is chosen whereby a graph is generated,

the program answers the operator's option with:

"Desired coordinates for graph's origin." (step 300)

By typing in two coordinate locations, the operator has the

option of making the graph any size he wishes. For optimum

graph size, the coordinate values for the horizontal axis

should remain between 100 and 500, while for the vertical

axis, the value should remain between 100 and 400. In all

cases, the graph, which is right-justified on the screen,

will generate a frequency axis (horizontal scale) between

10 Hz and 100 Hz and two vertical scales. The left-most

vertical axis is for magnitude plotting between 100 fi -

1 Mfi and the right-most vertical axis is for phase plot­

ting between 0 - (-90) degrees. This particular phase

range was chosen because skin impedance measurements are

capacitive in nature.

Once the graph has been drawn and labelled, the

Page 79: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

77

array values for frequency, magnitude, and phase are

instantaneously plotted. The magnitude curve is indicated

by a solid line while the phase plot is indicated by a

dotted line. At this point, the program returns control

to the operator depending on the option previously chosen.

Options 1 and ^

In the case of option 1 or 3, the program returns

control to the operator once the AC model algorithm has

generated the model parameters. If the particular curve

did not conform to the equivalent AC model used (R,C

parallel combination in series with RQ) then an error

condition is generated and the program generates an audible

tone followed by the word 'Error' printed on the screen.

If no error is generated, the control return is indicated

by the cursor illuminated on the screen. This cursor

simply allows the operator to choose any location on the

screen for printing the AC model parameters.

Option 2 '

If option 2 is chosen, then immediately following

the plotting routine, the cursor, followed by screen in­

structions, is illuminated on the screen. The program

waits for four sets of coordinates that are entered by

the operator. The operator enters the four coordinates by

depressing any key (preferably the space-bar). After each

entry, the cursor will momentarily disappear to store that

Page 80: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

78

particular coordinate and then reappear when ready for

the next coordinate.

Coordinate 1 can actually be entered by using only

the horizontal part of the cursor. This particular coor­

dinate is the magnitude asymptote, which corresponds to

the low frequency range (< 30 Hz). If this portion of

the magnitude curve is not close to being horizontal, then

the operator must judge the placement of the cursor to

best suit the value of the asymptote.

The second coordinate is the positioning of the

cursor on the Z(«') magnitude curve. Similarly, the third

coordinate should be positioned on the first -45° phase

crossing. Coordinate four is the location where the AC

parameters will be printed on the screen. Coordinate four

should be entered by the S-key if the operator wishes the

ideal plot to be superimposed onto the measured plot.

Ideal Bode Plot

Immediately after entering the position where the AC

parameters are to be printed, in either Option 1, 2, or 3,

the parameters RQ, R^, and C, along with the frequencies

at which the phase crossed through -45 , will be listed.

At this point, exclusive of Option 3, control will be re­

turned to the program which, in turn, calculates the im­

pedance function using the calculated values of RQ, R ^ , C

in Options 1 and 2 (step 235). Then, a Bode Plot of this

Page 81: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

7P

"idealized" model is plotted and can be superimposed o:.

the original curve by depressing the S-key. During this

plot, the magnitude will again be a solid line, but the

phase will be plotted with the symbol "*" to help distin­

guish between curves. This curve graphically depicts how

close the actual measurements came to approximating the

three-element AC equivalent model. The termination of the

program is indicated by the BASIC command,

"Ready".

Option 4

As with Options 1 and 2, the measured impedance

function is plotted. Upon the termination of the plot,

the cursor will appear to be used to obtain particular

curve values. If a certain magnitude coordinate is de­

sired, the operator positions the cursor at the inter­

section of the desired coordinate. By depressing the

M-key, the particular coordinate will be referenced with

the number 1 and the corresponding value of magnitude and

frequency will be indexed by a 1 and listed on the left

side of the screen. Similarly, for phase coordinates, by

positioning the cursor on the phase plot and depressing

the P-key, the particular coordinate will be referenced

and indexed in the same manner as described above.

Depressing the 0 (zero) key terminates the program by the

printing of the BASIC command,

"Ready".

Page 82: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

APPENDIX D

BASIC Program Listing

80

Page 83: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

81

5 7 «

1 1 1 2 I 5 1 7 1«

1 9 2 0 2 1 2 2 2 3 2 5 2 7 3H 31 3 3 3 4 3 5 37 3 9 A\ A2 4 3 4 4 4 5 46 47 48 49 59 61 6 3 6 7 6 8 6 9 70 7 1 7 2 7 3 7 4 7 5 7 6 7 9 8 1 8 2 8 3 8 4 8 5

CALL < 6 )

PR INT - I S THE USER F A M I L I A R P R I N T - l y P E K Y E S ) , INPUT 0

5 7 9

OCi'J^) H T H OP ERA T I NO

A.> D I HEM K£TUKi>i'* PROCEDURES?

IF Q>1 THEN IF Q=l THEN CALL < 6) PRINT "THIS WAIT C251MH) CALL (6) PRINT "THERE

PROGRAM INVOLVES SKIM IMPEUA.XCE KEASUK EML.M IS .

PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT PRINT INPUT CALL

ARE THREE NECESSARY P E R I P H E A L b : " ! • THE WAVETEK WAVEFORM G E . N E K A I O R * "

2 . S K I N IMPEDANCE DETECTOR(SID)bELOw 3 - A SUBJECT (UK UUMwr L u A L ) ) . "

HP-2li'iA Cu.*JPuTt.K'

t(

»•(

OPERATING PROCEDURES ( A L L P E K I P H L K A L S Or^\'i'* I.SET FREQUENCY RANGE TU •10K."

A. TURN FREQUENCr UIAL i-JLLr CLUCKW. 1 SEC C w ) .'* B. TURN FREQUENCY VERNIER (DIAL I.sSIUt. FRLV,'. K A N G E "

KNOB) 3/4*S TURN C0UNTEr\CLOC/\v, 1 S£( CC».) • InE " FREUUENCr CAN LATER BE ADJUSTED IN TrtE P K J G K A M ^U^ "

CALIBRATION." SET OUTPUT ATTENUATION KNOB TO -10 (Ub)." A. TURN ITS VERNIER FULLY Cw. THIS -ILL C J K K E S P O V U "

TO A PEAK CURRENT VALUE UF 34 MICROAMPS THROuGrt" SUBJECT. CTHIS PARTICULAR SETTING IS OpTlrtJrt FOh" SKIN IMPEDANCE MEASUREMENTS <1 Kunh- 200 KOri.*<>." FOR MORE SE.MSITIVE MEASUREMENTS C<1 KJrtM>*lrtE" AMPLITUUATTENUATION KNOB CAN BE SET TU 0 <Ub)" FOR RANGE OF 100 OHMS-70 KOHMS. L1KcwlSE*rOR" HIGHER RESISTANCE MEASUREMENTS* THE A I I E.vjA I 1 «j v" CAN BE SET AT -20 FOR A RANGE OF 3 KOriMS-'/0OKUriM. J'

OrnER WAVETEK KNOB SETTINGS" A. SYMMETRY IN OFF POSITION." B. WAVEFORM ON SINEwAvE POSITION."

' D- TRIG/START/STOP ON 0 DEGREE POSITION." E. SWEEP/STEP TIME IN OFF POSITION." F- SWEEP MODE (IRRELEVANT)." G. GEN MODE ON CONT."

"4.SID--WAVETEK CONNECTIONS" " A.CONNECT D/A OUTUT FROM SID TO VCG INPJT OF wAVETEK." "B.CONNECT WAVETEK 50 OHM OUT TO S1D'INPUT *-C . CONNECT SUoJ.

ELECTRODES--TO SID'LOAD*#D. 1 UKN Oi^ SiU A.MU W A V E T E K . "

"IF ABOVE COMPLETE#TYPE 1-RETURN."; 0 ( 6)

••

PRINT ''THE NEXT INSTRUCTION IS FOR FREU. CALIBRATION." PRINT "CALIBRATION FREU IS 500 HZ." PRINT "WHEN INSTRUCTION IS COMPLETE* TYPE I-RETURN." LET V=! LET Fl=.5/.63/5

Page 84: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

8 6 WAIT ( ? « M t l > 82 8 7 CALL ( W F l ) 8 9 CALL ( 3 # F # P , M ) 9 0 P R I N T F*B

9 1 I F A B S C ( F * 8 - 5 0 0 ) / 5 0 0 ) < 5 . 0 0 0 v ^ . l E - O 2 TH£.>* 1 0 9 9 2 WAIT <100 '5> 9 3 L E T E l = F * 8 - 5 0 0 9 5 IF E1<0 THEN 103 97 PRINT "TURN FREQ.RANGE ^/ER.MIER CCu A FEW DEGREES." 9 9 I N P U T Q 1 0 0 I F V = 1 0 0 THEN 2 0 3 1 0 1 GOTO 8 7 103 PRINT "TURN FKEQ.RANGE VERNIER C K A f bL^ DEGREtS." 1 0 5 INPUT 0 106 IF V=100 THEN 203 I 07 GOTO 87 1 0 9 P R I N T " F R E Q . I S NOW C A L I B R A T E u TO w i F r t i i ^ b>4 M C C U K A L r . " ; " " 1 1 3 P R I N T "WHEN O P E K A T O R I S READY TO S I A « 1 MLAS JnEJ^Jt..^ I b* i i P E l - n c . i Uf^^ 1 1 5 I N P U T Q 1 1 7 CALL C 6 ) 1 1 8 I F V = 1 0 0 THEN 1 2 9 1 2 1 P R I N T " 1 0 H Z TO I K H Z . i.HEN ' B L E E P ' STOPS* 1 JR.v T K E ^ . "

1 2 2 P R I N T " S E T T I N G TO • 1 0 0 K # S E T OUTPUT A T T . TO 0 ( L)h > * I n L , \ " 1 2 3 P R I N T " T Y P E 1 - R E T U R N . " 1 2 4 WAIT < 3 0 0 0 ) 1 2 5 CALL ( 6 ) 1 2 6 P R I N T "DATA " # " C O M P U T E R " * " A C T U A L " * " M A G N I T U D E " # " P H A S E " 1 2 7 P R I N T " P 0 I N T S " * " F R E U . ( H 2 ) " * " F R E U . ( H Z ) " * " ( I N O H M S ) " * " < I N D E G K E E b ) " 1 2 8 I F V # I 0 0 THEN 1 3 5 1 2 9 P R I N T "DATA P T . " * "COMPUTER"* "CAL 1 B R A T l O.s"* " M A U N . " > " P h A S t " 1 3 0 P R I N T " " # " F R E Q . " * " F R E U . = " * " ( I N 0 H M S ) " * " ( 1 N U E L / X E L S )

1 31 L E T F = F * 3 1 3 2 I F V = 1 0 0 THEN 2 0 8 1 3 5 D I M F C 2 0 0 J # Z C 2 0 0 J * P C 2 0 0 3 1 3 6 DIM G C 2 0 0 3 1 3 7 L E T N = l 1 3 8 L E T W=l 1 40 FOR X = l TO 2 1 4 2 L E T 1 2 = 1 . 0 0 0 0 0 E - 0 2 * C X = 1 ) > . l * ( A = 2 ) 1 4 3 L E T 1 3 = 1 . 0 0 0 0 0 E - 0 2 * ( X = 1 )•»•. I * < X = 2 ) 1 4 4 L E T I 4 = . 1 * ( X = 1 ) • ! • < X = 2 > 1 4 5 FOR F 1 = I 3 TO 14 STEP 1 2 1 50 L E T F 2 = F l / . 6 3 / 5 1 5 4 CALL i1*F2)

••

1 58 I F F l > . I THE>J 1 61 1 5 9 CALL C 2 # F , P , M ) 1 6 0 GOTO 1 8 3 1 6 1 CALL ( 4# K , P )

1 6 2 L E T F = W * F l * 1 0 0 0 / 8 1 8 3 GOSUB 2 5 1 I 8 9 L E T N = N * 1

Page 85: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

83

1 9 0 NEXT F l 1 9 5 NEXT X 1 9 9 LET V = 100 2 0 « P R I N T "CHANGE SETTING Tu • 1 0 0 K FOR MEASURING RANGE OF" 2 0 1 PR INT " I K H Z TO 100KHZ*SET TU 0DH OUlPJ l ATTEN*THEN 1 - K E T U K M " ; 2 0 2 INPUT Q 2 0 3 CALL ( 1 * 1 . 5 0 0 0 0 E - 0 2 / . 7 3 / 5 ) 2 0 4 CALL C 3 * F * P , M ) 2 0 5 P R I N T F*8#"MEASURED FOR 1500 HL*'* 2 0 6 LET F = F / 3 2 0 7 GOTO 91 2 0 8 FOR X = l TO 2 2 0 9 LET 12=1 • 0 0 0 0 0 E - O 2 * ( X = 1 ) • . 1 • ( X = 2 ) 2 1 0 LET I 3 = 2 . 0 0 0 0 0 E - 0 2 * C X = 1 ) * . 1 • ( X = 2 ) 2 1 1 LET I 4 = 9 . 9 0 0 0 0 E - 0 2 * ( X = 1 ) • ! • ( X = 2 ) 2 1 2 FOR F 1 = I 3 TO 14 STEP 12 2 1 3 LET F 2 = F l / . 6 3 / 5 2 14 LET w=100 2 2 4 CALL C 1 * F 2 ) 2 2 5 CALL ( 4 * M * P ) 2 2 7 G03UB 251 2 2 9 LET N=N-i-l 2 3 1 NEXT F l 2 33 NEXT X 2 3 4 GOTO 2 9 0 2 3 5 LET N=N-1 2 36 FOR N 1 = 1 TO N 2 3 7 LET X 1 = X 0 - K X 2 - X 0 ) / 4 * L O G ( F L N 1 J * l 0 t ( - 1 ) )/LOGC 1 v ) 2 3 8 LET Y1 = Y 0 ^ < r 2 - Y 0 ) / 4 * L O G ( Z [ M l J * 1 0 T ( - 2 ) ) / L O G ( 1 0 ) 2 39 I F N l # l THEN 2 4? 2 4 0 CALL < 5 * 0 * X 1 * Y 1 ) 2 4 1 GOTO 2 4 3 2 42 CALL ( 5* W X l #Y1 ) 2 4 3 LET Y 3 = Y 0 * < Y 2 - Y 0 ) / 9 0 * ( 9 0 * P C N I J ) 2 4 4 I F U = l THEN 2 4 6 2 4 5 CALL C 7 # X 1 * Y 3 * 4 2 ) 2 46 CALL < 5 # - l * X l # Y 3 ) 2 4 7 CALL ( 5 * 0 * X 1 # Y 1 ) 2 48 NEXT N l 2 49 I F Q 9 = 4 THEN 585 2 50 GOTO 790 2 5 1 LET F C N J = W * F 1 * 1 0 0 0 2 5 2 LET P C N 3 = P * 1 8 0 2 5 3 LET R = 9 0 0 0 0 . * M 2 5 4 LET GCN3=F«8 2 5 5 I F ABSCPCN) )>90 THEN 2 5 7 2 5 6 I F PCN3<0 THEN 2 5 9 2 5 7 LET N = N-1 2 58 GOTO 2 6 5 2 59 I F R > 5 0 0 THEN 261 2 60 OOTO 2 5 7

Page 86: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

8^

2 6 1 P R I N T • • " ; N ,

2 6 2 L E T R 9 = 3 . O 0 0 0 0 E * 0 6 2 6 3 L E T Z C N J = R * R 9 / ( R 9 - R ) 2 6 4 P R I N T F C N J * G L N J * Z t N J * P L N J 2 6 5 RETURN 2 6 6 STOP 2 9 0 P R I N T " F O R GRAPH* AND AC MODEL* i T r L 1 - K f c . l U R N . " ; 2 9 1 P R I N T "FOr. GRAPH*CURSOK D E R I V L O AC MODEL* T t P t . ^ - i< 1.1 J/v.^. " ; 2 9 ? P K I N T "FOR AC MODEL O N L V * T i P E 3-K'E T OK.V. • " 2 9 3 P R I N T " G R A P H - C U i \ S O R ONLY* i i -R ETUKN . -.x j . \ ti ^f i-i r. Ar . v :L* D - . . c i OK >. • 2 9 4 I N P U T OV 2 9 b CALL ( 6 ) 2 9 6 I F u 9 > D THEN 2 9 . i ? 9 7 I F U V = 5 THEN 9v^' ? 9 f t I F U 9 = 3 THEN 6 9 9 2 9 9 L E T C 2 = 0 3^.0 P R I N T " D E S I R E D C O O K D I N A I L S F O K G r j A P n ' S U K 1 b I .N. . " 3.-11 P R I N T " S C R E E N ARRAY I S i e . n 0 BV - 0 ( i . ( r i J r ^ bT V E K T . ) "

3 0 ? P R I N T " O K l G l N COORDS. MUST HE C R L A T C K InA.x. / ^ W b " 3 0 3 L E T U=1 3 0 5 I N P U T X 0 * Y 0 3 0 6 CALL ( 6 ) 3!:*, 7 L E T X 2 = 9 0 0 3 0 8 LET Y 2 = 7 5 0 3 0 9 I F X 0 < 7 5 T H E N 3 0 0 3 1 0 I F Y 0 < 7 5 THEN 3 0 0 3 1 1 CALL ( 5 * 0 * X 0 * Y 0 )

3 1 5 FOR W0=1 TO 4 3 1 6 L E T N 2 = 1 3 2 0 FOR F 0 = 1 TO 10 3 2 5 L E T X 1 = X 0 - « ' C X 2 - X 0 ) / 4 * L O G ( F O * 1 0 t C k.0-1 ) ) /L.OGC 1 0 ) 3 3 0 CALL C 5 * W X W Y 0 ) 3 3 5 I F F 0 # 1 0 THEN 3 5 0 3 40 CALL ( 5 * 1 * X 1 * Y 0 * 2 0 ) 3 4 5 CALL < 5 * 1 * X 1 * Y 0 ) 3 5 0 CALL ( 5 * i ^ X l , Y 0 * 1 0 ) 3 5 5 CALL C 5 * 1 > X 1 # Y 0 ) 3 5 6 I F N 2 # l T H E N 3 7 0 3 6 0 CALL ( 7 * X l - 2 0 * Y 0 - 3 0 # 0 ) 3 6 5 PRINT " 1 0 " 3 6 6 CALL C 7 , X l - 5 * Y 0 - 2 5 * 0 > 3 6 7 P R I N T W0 3 7 0 CALL C 5 * 0 * X 1 * Y 0 ) 3 7 1 L E T N 2 = N 2 + 1 3 7 5 N E X T F 0 380 NEXT W0 381 CALL (7*Xl-20*Y0-30*0) 382 PRI'- T "10" 383 CALL <7*Xl*10*Y0-25*0) 384 PRI'' T "5" 335 CALL <5*0*X3*Y0)

Page 87: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

85

390 FOR W0=0 TO 3 395 FOR R0=1 TO 10 400 LET Yl = Y0-..(Y2-Y0)/4*LOG<R0*I0f (w0))/LOG(I0) 40 5 CALL ( 5* 1*X0*Y1 > 410 IF R0#10 THEN 425 415 CALL ( 5« 1 *X0-*-20* Yl ) 420 CALL (5*1*X0*Y1) 425 CALL < 5* 1*X0'»-|0, Y1 ) 430 CALL < 5* 1*X0* Yl ) 431 IF R0#l THEN 450 432 CALL C7#X0-75*n-10*0) 433 PRINT R0*10t(W0-l) 434 CALL < 7#X0-1 5* Yl-1 0*0) 435 PRINT "K" 445 CALL (5*0*X0*Yl> 450 NEXT R0 4 55 NEXT W0 456 CALL C7*X0-75*Yl-10*0) 457 PRINT "I M" 460 CALL (5*0*X2*r0) 461 LET N2=0 4 7 0 FOR P 0 = 0 TO 9 0 STEP 5 ^:?4 L£T->l2sjl2.- i-- l __ . . 4 7 5 L E I Y l=Y0'»-( r 2 - i ' 0 ) / y t ) * P 0 4 9 0 CALL ( 5* 1 * X 2 * Y l ) 4 9 1 I F P 0 # 4 5 THEN 4 9 9 4 9 2 CALL ( 5* l * X 2 - 5 0 * Y l ) -^93 CALL < 5 * 1 * X 2 * Y 1 ) 4 9 4 CALL ( 7 * X 2 + 1 5 * Y 1 - 1 0 * 0 ) 4 9 5 P R I N T " - 4 5 " 4 9 6 CALL C 5 # 0 * X 2 * Y l ) 4 9 9 I F N 2 # 3 THEN 5 1 0 5 0 0 CALL < 5 > l * X 2 - 2 0 * Y l ) 5 9 5 CALL < 5 # 1 * X 2 # Y 1 > 5 0 6 L E T N 2 = l . 5 0 7 CALL C 7 # X 2 * 1 5 * Y l - 1 0 # 0 > 5 0 8 P R I N T P 0 - 9 0 5 0 9 CALL ( 5 * 0 * X 2 # Y 1 ) 510 CALL (5*1#X2-10*Y1) 515 CALL (5*l*X2*Yl) 5 40 NEXT P0 5 45 GOTO 235 5 50 END 551 CALL (7*300*40*0) 5 52 PRINT "TO FIND GRAPH VALUE* POSITION CURSOR*" 585 CALL (7*300*20*0) 587 PRINT. "TYPE:M(MAGN.)*P(PHASE)*0(END)" 600 LET N6=l 602 LET Y5=0 605 CALL (8*C*X4*Y4) 610 LET W4=(X4-X0)/(X2-X0)*4*LOG(10)

Page 88: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

86 6 1 5 L E I F b= EAf ' ( ;./i> / 1 / . t { - J ) . 6 ? n I F C = 7 7 THEN 6 2 8 6 2 ? I F C = 8 0 THEN 6 4 r 6 2 4 I F C = 4 8 THEN 9 0 0 6 2 6 GOTO 6 0 5 6 2 8 C A L L < 7 * X 4 * Y ^ ' ^ 5 * 0 ) 6 30 P R I N T N 6 6 32 C A L L ( 7 * : l * 7 5 0 - Y 5 * 0 ) 6 3 4 L E T w 5 = ( Y 4 - Y 0 ) / ( Y 2 - Y 0 ) * / i « L O G ( 1 0 ) 6 3 6 L E T Z 0 = E X P ( ' . . 5 ) / H 1 t ( - 2 ) 6 3 B P R I N T N 6 ; " F U . = " ; F S ; " H Z " 6 40 P R I N T " M A G . = " ; Z 0 ; " O H M S " 6 4? L E T N 6 = N 6 + 1 6 4 4 L E T Y 5 = i r 5 + 4 0 6 46 GOTO 6'^5 6 4R CALL ( 7 * X / i * f / i + b * 0 ) 6 50 P R I N T N 6 6 52 CALL ( 7 * 0 * 7 5 i i - Y 5 * ^ ) 6 5 4 L E T W6=( Y 4 - Y 0 ) / ( Y ? - Y n ) * 9 f ^ 6 56 L E T P 5 = W 6 - 9 ; ! 6 5R P R I N T N 6 ; " F 0 . = " ; F 5 6 6 0 P R I N T " P H A S E = " ; P 5 6 6? L E T N 6 = N 6 + 1 6 6 4 L E T Y 5 = Y 5 - ^ 4 0 6 6 6 GOTO 6 0 5 6 8 0 I F 0 9 = 2 THEN 8 0 0 6 8 1 GOTO 7 0 0 6 9 9 L E T N = N - 1 7 0 0 L E T N l = 2 7 0 2 I F ABSC ( Z t N l 3 -ZC 1 J ) / Z L n ) < 9 . 0 0 ( ' ^ 0 0 E - 0 2 T H E N 7 1 6 7 0 4 L E T Z 3 = 0 7 0 6 FOR N 2 = l TO N l - 1 7 0 8 L E T Z 3 = Z 3 + Z t N 2 J 7 10 N E X T N2 7 1 2 L E T R 1 = Z 3 / ( N 1 - 1 ) 7 1 4 GOTO 7 2 1 7 16 L E T N 1 = N 1 + 1 7 18 I F N 1 = N V I - T ^ € N - 7 ^ 2 7 2 0 GOTO 7 0 2 7 21 L E T N 4 = 2 7 2 2 L E T N l = 1 7 2 3 L E T R 0 = Z C N 3 7 2 4 L E T R 1 = R 1 - R 0 7 2 5 L E T N l = l 7 2 6 I F A B S ( P C N 1 3 ) < 4 5 THEN 7 3 4 7 2 8 L E T L l = F [ N l - l J + ( F t N l J - F C N l - 1 3 ) * ( P t N l - l J * 4 5 ) / ( P L N l - U - f t N l J ) 7 3 0 L E T C = l / ( 2 * 3 . 1 4 1 5 9 * L 1 • R l ) 7 3 2 GOTO 7 7 0 7 3 4 L E T N l = N l - i . l 7 3 6 I F N 1 # N + 1 THEN 7 2 6 7 A\ CALL ( 7 * 0 * 3 0 0 * 0 ) 7 4 2 P R I ' ^ T " E R R O R ! ! "

Page 89: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

1 1

a: 7 4 3 END 7 7 0 CALL C 7 * 0 * 2 0 * 0 ) 7 7 1 P R I N T " P L A C E CURSOR F OK AC READOUT ( S - K L t F o,. SUP^K I N P J S E u ) " 7 7 2 CALL ( B * C 2 * X 8 * Y 8 ) 7 7 3 I F C2 = 8 3 THEN 7 7 5 7 7 4 CALL ( 6 ) 7 7 5 CALL ( 7 * X 8 * Y 8 * 0 ) 7 7 6 P R I N T " R 0 = " M N T < R 0 ) ; " O H M S " 7 7 7 CALL ( 7 * X 8 * Y 8 - 3 0 * 0 ) 7 78 P R I N T " R l = " ; INT( i - , 1 ) ; " O H M S "

7 7 9 CALL ( 7 * X 8 * Y 8 - 6 0 * 0 ) 7 8 0 P R I N T " C = " l C ; " F A R A D S " 7 8 1 CALL ( 7 * X 8 * Y 8 - 9 0 * 0 ) 7 8 2 P R I N T " F Q . ( 1ST - 4 5 ) = " ; I N T ( L 1 ) ; " r i Z " 1^1 CALL ( 7*XP,* Y H - 1 ? 0 * 0 ) 7 8 5 I F U 9 = 3 THEN 9 0 0 7 8 6 GOTO 8 2 8 7 9 0 I F U = 2 THEN 9 0 0 7 91 I F 0 9 = 1 THEN 70C1 8 0 0 CALL ( 7 * 0 * 7 0 * 0 ) 8 0 2 P R I N T " A F T E R P O S I T I O N I N G C O K S O K ON FOLLOWING p r s . * P K t . b : j M.MJ r .c i 8 0 3 P R I N T " l . D C MAGN. A S Y M P T O T E . 3 . 1ST - 4 5 DEOREE ChOSS 1 . ^ i - . " 8 0 4 P R I N T " 2 . Z C I N F I N I T Y 3 A S M P T T . 4 . L O C A T I O N F Ofi AC MoDLL r c r l M U U O l . " 8 0 5 P R I N T " ( F O R S U P E K I M P O S E D G/sApn* I Y P E S - K E Y r u n i-I . 4 ) 8 0 6 CALL ( 8 * C 2 * X 4 * Y 4 ) . 8 0 8 L E T W 5 = ( Y 4 - Y 0 ) / ( Y ? - Y 0 ) * 4 * L U G ( 1 0 ) 8 1 0 L E T R 1 = E X P ( W 5 ) / 1 0 » ( - 2 ) 8 1 2 CALL ( 8 * C 2 * X 4 * Y 4 ) 8 1 4 L E T W 5 = ( Y 4 - Y 0 ) / ( Y 2 - Y 0 ) * 4 * L O G ( 1 0 ) 8 1 6 L E T R 0 = E X P ( W 5 ) / 1 0 » ( - 2 ) 8 1 8 L E T R 1 = R 1 - R 0 8 2 0 CALL ( 8 * C 2 * X 4 * Y 4 ) 8 2 2 L E T W 4 = ( X 4 - X 0 ) / ( X 2 - X 0 ) * 4 * L U G ( 1 ; i ) 8 2 4 L E T L l = E X P ( W 4 ) / 1 0 t ( - l ) 8 2 6 L E T C = l / ( 2 * 3 . 1 4 1 5 9 * L 1 * R 1 ) 8 2 7 GOTO 7 7 2 8 2 8 L E T N = l -8 3 0 FOR W0=1 TO 4 8 3 2 FOR F 0 = 1 TO 9 8 3 4 L E T F = F 0 * 1 0 t ( W 0 ) 8 3 6 L E T A = R 1 * C * 1 • S . 1 4 1 5 9 * F 8 37 L E T A = A « 2 8 3 8 L E T M 1 = S Q R ( A T 2 * 1 ) 8 4 0 L E T P 1 = - A T N ( A )

8 4 2 L E T R 2 = R 0 + R 1 / M 1 * C O S ( P 1 ) 8 4 4 L E T 1 2 = R 1 / M * S 1 N ( P 1 > 8 4 6 L E T M 2 = S Q R ( R 2 t 2 + I 2 t 2 ) 8 4 8 L E T P 2 = A T N ( I 2 / R 2 ) * 1 8 0 / 3 * l 4 1 5 9 8 5 0 L E T Z C N 3 = M 2

Page 90: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

APPENDIX E

Connector-pin Assignments for Data

Flow from SID to 21 DC

89

Page 91: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

90

CONNECTOR-PIN ASSIGNMENTS FOR:

Data Flow from SID to 21MX

Signal Designation

BO (Bit 0)

Bl

B2

B3

B4

B5

B6

B7

B8

B9

BIO

Bll

B12

B13

B14

B15

Flag

ground

From SID

4

5

6

7

8

9

10

11

12

13

14

15

16

1

2

To 21 DC

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

23AA

24

Via Cable

40

41

42

43

44

45

52

53

54

55

56

57

58

59

60

63

32

82

Page 92: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

APPENDIX F

SID Assembled Listings

92

Page 93: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

93

PAGE 0 0 0 1

0 0 0 1 • 5 DAC S I D COMSB DACN DACNl DATA0 DATA l ENDTB E X I T HFCTL HFPCL HFVR HFVS HSKIN LCLSB LCMSB L F C T L LFPCL LFVR L F V S L S K I N MASK0 MCLSB MCMSB . IFCTL •rFPCL

M I N1 MSKIN PARAO SBTBL TEMP TEMPI TEMP 2 TEMP 3 TEMP 4 TEMPS TJi:MP6 T ' - :MP7

TEMP8 TEMP 9 V. A I T v. A I T l '.V A I T2 U A I T3 * M J 0

0 1 6 2 1 2 0 1 6 0 3 0 0 0 0 0 1 1 0 1 6 2 1 6 0 1 6 0 6 1 0 1 6 0 6 2 0 1 6 2 7 2 0 1 6 3 1 0 0 1 6 0 3 0 0 1 6 0 5 5 0 1 6 2 1 4 0 1 6 2 1 5 0 1 61 53 0 1 6 1 5 4 0 1 6 1 5 5 0 1 6 1 2 4 0 1 6 1 2 3 0 1 6 1 0 6 :5l 6122 0 1 6 1 2 5 0 1 6 1 2 6 0 1 6 0 6 6 0 1 6 3 0 7 0 16152 0 1 6 1 5 1 0 1 6 1 4 7 0 1 61 50 0 1 6 1 2 1 0 1 6 1 2 7 0 1 6 2 5 2 3 1 6 U 0 n 0 1 6 1 0 7 0 1 6 1 1 0 0 1 61 1 1 ^ l 6 1 1 2 0 1 6 1 1 3 0 1 6 1 1 4 0 1 6 1 1 5 ^ 1 61 1 6 0 1 6 1 1 7 0 1 6 1 2 0 0 1 6 0 4 4 0 1 6 0 6 3 0 1 6 0 6 4 0 1 6 0 6 5

ERRORS*

ASMB* A*B# T * L

Page 94: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

9U

0 0 0 2 * 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0 7 0 0 0 8 0 0 0 9 0 0 10 0 0 1 1 0 0 1 2 0 0 13 0 0 1 4 * 0 0 15 0 0 1 6 0 0 1 7

0 0 1 8

0 0 19 0 O 2 i : 0 0 2 1 0 0 2 2 0 0 2 3 0 0 2 4 0 0 2 5 0 0 2 6 0 0 2 7 0 0 2 8 0 0 2 9 0 0 3 0 0 0 3 1 0 0 3 2 0 0 3 3 0 0 3 4 0 0 3 5 0 0 3 6 0 0 3 7 0 0 3 8 0 0 3 9 0 0 40 OflAl •-0 0 42 0 0 43 0 0 4 4 * 0 0 4 5 * 0 0 4 6 * 0 0 4 7 * 0 0 4 8 *

3 U B R 0 U T I N E S - - S 1 6 0 0 0 1 6 0 0 0 1 6 0 0 1 1 6 0 0 2 1 6 0 0 3 1 6 0 0 4 1 6 0 0 5 1 6 0 0 6 1 6 0 0 7 1 6 0 1 0 1 6 0 3 0

• D A C - - D / A

A S M b * A* b* 1 * L ELECT CODE F u r

O R G

I D I S i n .

0 0 0 4 0 1 01 6 0 3 0 0 0 1 4 0 2 0 1 6 0 6 6 0 0 1 4 0 3 0 1 6 1 2 7 0 0 1 0 0 / 0 1 6 1 5 5 0 0 0 0 0 0

VOLT

1 6^30 mrn^r 1 6 0 3 1 1 6 0 3 2 1 6 3 3 3 1 6 0 3 4 1 6 0 3 5 1 6 0 3 6 1 60 3 7 1 6 0 40 1 6 0 4 1 1 6 0 42 1 6 0 43 1 6 0 4 4 1 6 0 4 5 1 6 0 4 6 1 6 0 47 1 6 0 5 0 1 6 0 5 1 1 6 0 5 2 1 6 0 5 3 1 6 0 5 4 1 6 0 5 5 1 6 0 5 6 1 6 0 5 7 1 6 0 6 0 1 6 0 6 1 1 6 0 6 2 1 6 0 6 3

0 1 6 2 5 2 1 0 /rC>00

1 1 61 10 1 0 50 40 0 1 6 0 61 1 0 5 1 0 0 0 1 2 0 6 1 0 0 1 2 0 0 1 0 2 6 1 1 1 0 2 7 1 1 0 2 6 0 5 5 0 0 0 0 0 0 0 7 6 0 6 5 0 6 6 0 6 4 0 7 6 0 6 3 0 3 6 0 6 3 0 2 6 0 5 0 0 6 6 0 6 5 0 0 0 0 0 0 1 2 6 0 4 4 0 0 0 0 0 0 1 0 7 7 1 1 0 0 0 0 0 0 12 6 0 3 0 0 7 7 7 7 0 0 0 0 0 3 6 0 0 0 0 0 0

1 6 ' U V SBTBL OCT 4 0 1

DEF DAC OCT 1 4 0 2 DEF L S K I N OCT 1 4 0 3 DEF M S K I . \ OCT 1 IV '^ DEF HSKI.M BSS 1 6

ENDTb EUU * AGE P A K . = D E S 1 K E D

DAC NOP J S B P A R A D

OLD TEMPI * I

FMP DACN

V O L T A b E / b V . L A L L C l * s / / : )

W A I T

E X I T

DACN DACNl W A I T l W A I T 2

F I X AND RAL OTA STC JMP NOP STB LDB STB I S Z JMP LDB NOP JMP NOP CLC NOP JMP OCT OCT BSS OCT

DACN

S l u S I D E X I T

lr .AlT3 W A I T ? W A I T l

W A I T l

* - 1 W A I T 3

W A I T * 1

S I D * C

DAC* 1 7 7 7 7 0 3 6 1

_L451j0£»0.

EXTRA NOP

. i tQhAJLAmSiSL 0 0 0 1 1 :>! D EoU 1 1B 1 6 0 6 5 0 0 0 0 0 0 W A I T 3 BSS 1

L S K I N O B T A I N S LOW F R E Q . * AND P H A S E * M A G . * R A T I O S • C A L L ( 2 * F # P * M )

Page 95: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

0 0 49 * 0 0 50 0 0 5 1 0 0 52 0 0 5 3 0 0 5 4 0 0 5 5

1 60 6 6 1 6 0 6 7 1 6 0 7 0 1 6 0 7 1 1 6 0 7 2 1 60 7 3

0 0 0 0 0 0 0 1 6 2 5 2 0 6 2 1 0 6 0 7 2 1 1 3 0 6 2 1 2 2 0 7 2 1 1 4

L S K I N NOP JSB LDA STA LDA STA

PARAD LFCTL TEMP 4 LFPCL TEMPS

W)

STORES ADuncSS /-AnA.-'iL 1 c.n. L O U fiALuUEi^Clf Cvji-ir.A.^ Cuui.

Ow REUUENCy PHSE COMKA.'^u COu

PAGE 0 0 0 3 #01

0 0 5 6 0 0 5 7 0 0 58 0 0 59 0 0 6 0 0 0 6 1 0 0 62 0 0 6 3 0 0 6 4 0 0 6 5 0 0 6 6 0 0 6 7 0 0 68 0 0 6 9 0 0 7 0 0 0 7 1 0 0 7 2 0 0 7 3 0 0 7 4 0 0 7 5 0 0 7 6 0 0 7 7 0 0 7 8

0 7 9 0 0 8 0 0 0 8 1 0 0 8 2 0 0 8 3 * 0 0 8 4 * 0 0 8 5 * M

0 0 8 6 * * 0 0 8 7 * 0 0 8 8 * 0 0 8 9 0 0 90

1 6 0 7 4 1 6 0 7 5 1 6 0 7 6 1 6 0 7 7 1 6 1 0 0 1 6 1 0 1 1 6 1 0 2 1 6 1 0 3 1 6 1 0 4 1 6 1 0 5 1 6 1 0 6 1 6 1 0 7 1 61 10 161 1 1 161 12 161 13 1 6 1 1 4 161 1 5 161 1 6 161 17 1 6 1 2 0 1 6 1 2 1 1 6 1 2 2 1 6 1 2 3 1 6 1 2 4 1 6 1 2 5 1 6 1 2 6

0 6 2 1 2 3 0 6 6 1 2 4 0 7 2 1 1 5 0 7 6 1 1 6 0 6 2 1 2 5 0 7 2 1 1 7 0 6 2 1 2 6 0 7 2 1 2 0 0 1 6 2 1 6 1 2 6 0 6 6 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ^ 7 7 7 7 7 0 0 0 0 0 3 0 4 0 0 0 0 0 0 0 0 3 6 0 0 0 0 1 2 0 ,00016

LFCTL TEMP TEMPI TEMP2 TEMPS TEMP4 TEMPS TEMP 6 TEMP 7 TEMP8 TEMP 9 M I N I LFPCL LCMSB LCLSB LFVR LFVS

LDA LDB STA STB LDA STA LDA STA JSB JMP OCT BSS BSS BSS BSS BSS BSS BSS BSS BSS BSS DEC OCT OCT OCT OCT OCT

LCMSB LCLSB TEMP6 TEMP7 LFVR TEMPS LFVS TEMP 9 COMSB L S K I N * 1 7 1 1 1 1 1 1 1 1 1 1 - 1 3 4 0 0 0 0 3 6 12 16

LOADS I N L . F ULUUK- 2 ; > 6 » 2 / 2

LOW FRE . CURRENT CODE

LOk* F R E J . CODE FOR S K l N - 1

JUMPS TO COM * ' :N SUBROUTiNc l u LA j K

S K I N OBTAINS M I D - F R E Q . * AND PHASE*MAGNITUDE RATIOS C A L L ( 3 * F * P , M >

1 6 1 2 7 0 0 0 0 0 0 1 6 1 3 0 0 1 6 2 5 2

MSKIN NOP JSB PARAD STORES ADDRESS PARAMETERS

Page 96: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

ht

0 0 91 0 0 9 2 0 0 9 3 0 0 9 4 0 0 9 5 0 0 9 6 0 0 97 0 0 9 8 0 0 9 9 G 1 0 0 0 1 0 1 0 1 0 2 0 1 0 3 0 1 0 4 0 1 0 5 0 1 0 6 0 1 0 7 0 1 0 8 C 1 0 9 0 1 1 0 0 1 1 1 * 0 1 1 2 *

1 6 1 3 1 1 6 1 3 2 1 6 1 3 3 1 6 1 3 4 1 6 1 3 5 1 6 1 3 6 1 6 1 3 7 1 61 4^ 1 61 41 1 61 42 1 61 43 1 61 4 4 161 45 1 61 46 1 61 47 1 6 1 5 0 161 51 1 6 1 5 2 1 61 53 1 6 1 5 4

0 6^1 47 0 7 2 1 1 3 0 621 50 0 7 2 1 1 4 0 6 2 1 51 0 6 6 1 5 2 0 7 2 1 1 5 0 7 6 1 1 6 0 6 2 1 5 3 0 6 6 1 5 4 '^721 1 7 0 7 6127. 0 1 6 2 1 6 1 2 6 1 2 7 0 0;30 1 7 0 0 0 0 1 3 0 40 0 0 0 iT00r3 44 0 0 0 0 0 2 0 0 0 0 0 6

r-'iFCTL MFPCL MCMSB l iCLSB H F v i . HFVS

LDA STA LDA STA LDA LDB STA S T B LDA LDB STA STB J S B JMP OCT OCT OCT OCT OCT OCT

ff r C 1 L

T E-..-'/ MFPCL TEMPS MCMSB MCLSB TEMP 6 IZ'/itl

riF V,' -HFVS TEMpr-TEM-^^.' COMS." M S K I N * 1 '/ 13 A-'^':':" •:•

AA C

6

i . 1 I ' - r ; . L -J,

LOADS I N M.F . C L O C K - S I L'»

i'< . F . C LJ A r. c I * I G \J L :

i'i • h • : K 1 . . V O L 1 H \ L. U 0 L

PAGE 0 0 0 4 #01

0 1 1 3 * H S K I N OBTAINS 0 1 1 4 * * C A L L ( 4 * M , P ) 0 1 1 5 *

H IGH FQ. MAG. AND PHASE R A T I O S - 2 PAR

0 1 1 6 * 0 1 17 0 1 18 0 1 19 0 1 2 0 0 1 2 1

0 1 2 2 0 1 2 3 0 1 2 4 0 1 2 5

0 1 2 6

0 1 2 7 0 1 2 8

1 6 1 5 5 1 6 1 5 6 1 6 1 5 7 1 6 1 6 0 1 6 1 6 1 1 6 1 6 2 1 6 1 6 3 1 6 1 6 4 1 6 1 6 5 1 6 1 6 6 1 6 1 6 7 1 6 1 7 0 1 6 1 7 1 1 6 1 7 2 1 6 1 7 3

0 0 0 0 0 0 0 * 1 6 2 5 2 0 6 2 2 1 4 0 1 6 2 7 2 10 4 4 0 0 1 1 6 1 1 0 0 0 0 0 0 0 0 6 2 2 1 5 0 1 6 3 1 0 10 4 2 0 0 0 1 6 2 1 2 10 50 40 1 1 6 1 1 1 0 0 0 0 0 0 1 0 4 4 0 0

H S K I N NOP J S B LDA J S B D S T

NOP LDA J S B DLD

FMP

NOP DST

PARAD H F C T L DATA0 T E M P I * I

H F P C L D A T A l . 5

T E M P 2 * I

T E M P 2 * I

H I G H F R E U . C O D E SEND CODE AND O B T A I N

EXTRA NOP W*?• P H A S E CODE

T E M P 2 * I

Page 97: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

0 1 2 9 0 130 01 31

0 1 32 0 133 0 1 34 0 135

0 1 36

0 137 0 138 0 139

16174 16175 16176 16177 16200 16201 16202 1 6203 1620 4 1620 5 1620 6 16207 16210 1621 1 16212 16213 1621 4 1 6215

116111 0 6 2 1 5 3 0 1 6 2 7 2 104400 1 161 10 0 1 6 0 4 4 0 6 2 1 5 4 0 1 6 2 7 2 10 50 60 116110 10 4400 116110 0 1 6 0 44 1 2 6 1 5 5 0 40000 0 0 0 0 0 0 0 0 0 0 2 5 000021

LDA HF\/M JSB DATAr* DST T E M P I * I

JSB V.AIT LDA HFVS JSB DATAO FDV TEMPI * I

DST TEMPI*I

JSB WAIT JMP H S K I N * !

5 DEC . 5

97

ti ' t • L U / \ / \ t - » l L J t . L

HFCTL OCT 25 HFPCL OCT 21

0 1 40 01 41 0 1 42* 0 1 43* 0 144*COMSB COMMON SUBROUTINE USED F O K OBTAINING DATA I -KUM :> i i 0 1 45* 0 1 46* 01 47 0 1 48 0 1 49 0 1 50

01 51 0 1 52 0 1 53 0 1 54 0 1 5 5 0 156

0 1 57

0 1 58

T 6 2 r 6 1621 7 16220 16221 16222 16223 16224 1622 5 1622 6 16227 16230 16231 16232 16233 16234

0 6 2 1 1 3 0 1 6 2 7 2 104400 116110 0 0 0 0 0 0 0 6 2 1 1 4 0 16310 0 6 2 1 1 5 0 6 6 1 1 6 10 50 60 116110 10 4400 116110 0 0 0 0 0 0

i^ -LDA iEMP/. JSB DATA(5 DST T E M P I * I

NOP LDA TEMPS JSB DATAl LDA TEMP6 LDB TEMP7 FDV T E M P I * 1

DST TEMPI*I

NOP

EXTRA NUK

TEMPI*I

PAGE 0 0 0 5 #01

0 159 0 1 60 0 1 6 1

16235 16236 16237

062117 0 1 6 2 7 2 10 4400

LDA TEMP8 JSB DATA0 DST T E M P 3 * I

Page 98: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

Ci '8

0 1 62 0 1 6 3 0 1 6 4 0 1 6 5

0 1 6 6

0 1 67 0 1 68 0 1 69 0 1 70 0 1 71 0 1 7 2 0 1 7 3 0 1 7 4 0 1 7 5 0 1 7 6 0 1 77 0 1 78 0 1 7 9 0 18f 0 181 0 I 8 2 0 1 8 3 0 1 8 4 0 1 8 5 0 1 8 6 0 187 0 1 8 8 0 1 8 9 0 1 90 0 1 91 0 1 92 0 1 9 3 0 1 9 4 0 1 9 5 0 1 9 6 0 1 97 0 198 0 1 9 9 0 2 0 0 0 201 0 2 0 2 0 2 0 3 0 2 0 4 0 2 0 5 0 2 0 6 0 2 0 7 0 2 0 8

6?43 6241 62 42 6 2 4 3 6 2 4 4 6 2 4 5 6 2 4 6 6 2 4 7 6 2 5 0 62 51 6 2 5 2 6253 6254 6255 6 2 5 6 6 2 5 7 6 2 6 0 6 2 6 1 6 2 6 2 6 2 6 3 6 2 6 4 62 6 5 6 2 6 6 6 2 6 7 6 2 7 0 6 2 7 1 6 2 7 2 6 2 7 3 6 2 7 4 6 2 7 5 6 2 7 6 6 2 7 7 6 3 3 0 6 3 0 1 6 3 0 2 6 3 0 3 6 3 0 4 6 3 0 5 6 3 0 6 6 3 0 7 6 3 1 0 631 1 6 3 1 2 6 3 1 3 6 3 1 4 631 5 6 3 1 6 6 3 1 7 6 3 2 0 6321

1 1 61 1 r.' 0 1 61'. 44 0 6 2 1 2 0 0 1 6 2 7 2 1 0 5 0 6 0 1 1 61 12 1 0/1400 1 1 61 12 0 0 0 0 0 0 1 2 6 2 1 6 0 0 0 0 0 0 0 0 0 0 0 0 0 7 2 1 0 7 1 6 2 1 0 7 0 7 2 1 1 0 0 6 2 1 0 7 0 421 2 1 0 7 2 1 0 7 1 6 2 1 0 7 0 7 2 1 1 1 0 6 2 1 0 7 0 4 2 1 2 1 0 7 210 7 1 6 2 1 0 7 072112 126252 000000 102611 10271 1 102311 026275 000000 102511 003000 012061 10 5120 107711 01 60 4 4 126272 000007 000000 102611 000000 102711 102311 026314 102511 002020 026324 003000

PAHAD

DATAO

MASK0 DATAl

JSa v>AlT LDA TEMP9 JSB DATAB FDV TEMP3*1

DST TEMP3*1

NOP JMP NOP NOP STA LDA STA LDA ADA STA LDA STA LDA ADA STA LDA STA JMP NOP OTA STC SFS JMP NOP LIA CMA AND FLT CLC JSB JMP OCT NOP OTA NOP STC SFS JMP LIA SSA JMP CMA

COMLB* I

TEMP TEMP, I TEMPI TEMP MINI TEr .P TEi-iP* I TEMP2 TEMP M I .\' 1 TEMh TEMP*I TEMP3 PARAD*1

SID SID SID *-l

SID

DACN

S1D*C WAIT DATA0*1 7

SID

SID SID *-l SID

• 1-4

EXTRA .\0P

LOADS DATA CHECKS FOK NEG. yuA,\TlTY

Page 99: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

r 2 0 9 1 6 3 2 2 0 1 2 0 6 1 0 2 1 0 1 6 3 2 3 0 2 6 3 2 6 0 2 1 1 1 6 3 2 4 0 3 2 3 0 7 0 2 1 2 1 6 3 2 5 0 0 2 0 0 4

A N D D-^o.'. j M p ».-»-3 l O R MASK2 I N A

99

PAGE 0 0 0 6 # 0 1

0 2 1 3 0 2 1 4

0 2 1 5

0 2 1 6 0 2 1 7 0 2 1 5 0 2 1 ? * « r.

1 6 3 2 6 1 0 5 1 2 0 1 6 3 2 7 1 0 5 0 6 0 1 6 3 3 0 1 1 6 1 1 0 1 6 3 3 1 1 0 4 4 0 3 1 6 3 3 2 1 1 6 1 1 1 1 6 3 3 3 1 0 7 7 1 1 I 6 3 3 4 0 1 6 3 4 4 1 6 3 3 5 1 2 6 3 1 0

3 ERRORS«

FLT FDv

DST

CLC J S B JMP END

TEr-'.Pl * 1

TEMP2*I

SID*C WAIT DATAl* I

Page 100: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

APPENDIX G

Graphics Assembly Listing

100

Page 101: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

i-'X 101

r ,• J 1

/*, •' 1 L /r-*'/, AS(-<h* A> B , 1 * L

i

mv t.. J u

i ..'

I J C F F

G o

ri u ' L/^

L 1' 1 •

f.' I

\ ' 1 ••

.\' r-

*j \

f~ . -

V • • .

'. r;CiAL;

.-: 1 7 7

P 3 7 6 ' -^7 7

C 0 ^ : -

C 0 : J V

C ON c' u

C 0 u:vi T

C U R S I DAf^K

E L A P S

E N D T B

E R A S E

E X P T H E R E

I N S T L

I N S T R L C H I N

L C H O T

L O O P

L S T w D

P L O T

P O I R R

> 0 I F E

r 0 1 NT

PPS..

R EMP SAV1:;X

S r O ' i -

« 1 6 7 2 4 '<• 1 6 7 . -3

''• 1 6 6 ^ S

•') 1 6 '. 7 ,

0 1 r' /. 7 )

• ' ] 6 ^ , 7 ?

•' 1 t> C (. 7 r- ] 6 7 : - s

••'• 1 A 7 -. ,

r 1 6 7 0 / "I67P-

" 1 6 6 7 /

- 1 / . 6 7 7 n 1 6 7 r,'. f ' " - : n '•

r 1 6 6 7:- • ' ' I 6 6 7^'

" 1 6 / 2 r • 'j 1 6 7 . 1 / ;

' \ (- 7 1 5 r. 1 6 7 1 : '

i" J o V>; 1

-'• 1 6 6 r r

{' 1 6 6 4 i

I 1 6 7 : 1 2 ; 1 6 ^ , " 7

' •1 6-3 5 2

n 1 6 6 7 6

0 1 6C0 32I

0 1 6 4 7 3

0 1 6 7 ^ 6

0 1 6 5 0 6

•^' 1 6 7 1 3 ! ' J 6 / 1 ^

0 1 6 57 6 0 1 6 6 1 0 H 1 6 -5^P

0 1 6 7 3 2 [• 1 6 5 4 7

•/ 6 3 5 7

0 1 6 3 5 6

'^ 1 6 3 5 4

n 1 6 7 3 1 ;) 1 6 7 1 7

n i 6 7 2 7 '.^ \ 6 " " ' ' n

Page 102: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

102

SH.F IL 1 6 u 6 S H I F T 0 1 6 6 3 7 SUR7 0 1 6 5 0 1 TEKiP 0 1 6 7 30 T I M E 0 1 6 7 2 1 TOTAL 0 1 6 7 1 6 TPLOT 0 1 6 3 3 6 TYPB 0 1 6 7 1 1

TYRB 0 1 6 7 1 2 PAGE 0 0 0 2

VALUE 0 1 6 7 2 5 * * NO ERRORS*^

Page 103: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

PAGE 0 0 0 3 ^01

103

0 0 0 1 0 0 0 2 0 0 0 3 0 0 0 4 0 0 0 5 0 0 0 6 0 0 0 7 0 0 0 8 0 0 0 9 0 0 1 0 0 0 1 1 0 0 1 2 0 0 1 3 0 0 1 4 0 0 1 5 0 0 1 6 * 0 0 1 7 * 0 0 1 8 * * 0 0 1 9 * * 0 0 2 0 * * 0 0 2 1 * * 0 0 2 2 * * 0 0 2 3 * * 0 0 2 4* 0 0 2 5 0 0 2 6 0 0 2 7 0 0 2 8 0 0 2 9 0 0 30 0 0 3 1 0 0 32 0 0 3 3 0 0 3 4 0 0 3 5 0 0 3 6 0 0 3 7 0 0 38 0 0 3 9 0 0 40 0 0 4 1 0 0 42 0 0 43 0 0 4 4 0 0 4 5 0 0 46 0 0 47 0 0 48

1 6 0 0 0 1 6 0 0 0 1 6 0 1 0 1 6 0 1 0 1 60 1 1 1 6 0 1 2 1 6 0 1 3 1 6 0 1 4 1 601 5 1601 6 1601 7 1 6 0 3 0 1 6 0 3 0 1 6 3 3 6

000401

001 40 5 016336 000006 016473 001407 016501 001410 016407

ASMB* A* B* ORG

SBTBL OCT ORG OCT DEF OCT DEF OCT DEF OCT DEF ORG

ENDTB EQU OnG

T*L 16000B 401 16010B 1 40 5 TPLOT 0006 ERASE 1 40 7 SUB 7 \ A\Q

CURSI 16030B

163 3 6B

SUB#1 - TPLOT CAN PLOT N O N - I N T E N S l F I ED VECTORS* I N T L N S l r l L U VECTORS* OR POINTS DEPEiMDii>JG UN Int. V A L U L Ur 1

CALL( 5* I * X * Y) I < 0 P O I N T PLOT 1=0 DARK VECTOR I>0 BRIGHT VECTOR

6336 6337 6340 6341 6342 6343 6344 6345 6346 6347 6350 6351 6352 6352 6353 6354 6354 6355 6356 6356 6357 6357 6360 6361

000000 072722 162722 072730 1627 30 002020 026354 036730 142730 002003 026352 026357

062667 026356

0 6 2 6 6 7 0 7 2 7 31

0 1 6 6 1 0

062720 042722 072722

TPLOT NOP STA LDA STA LDA SSA JMP ISZ ADA SZA* JMP JMP

DARK EOU LDA JMP

POINT EOU LDA STA

POIFE EOU JSB

POIBR EQU LDA ADA STA

ARGAD ARGAD*1 TEMP TEMP*I

POINT TEMP TEMP*I RSS DARK POIBR * GS POIFE *

GS PPSw

LCHOT

Nl ARGAD ARGAD

SET UP J-01.><TEKO GET T H E FlRSl A K G U E M L N I

SKIP IF b^lGHI Oh DAnK vcCiurN CASE 3* 1<0 ADD Bul r i wURDS OF TrlE A R G U E M E N T

CHECK FOR C A S E l * 1=0 C A S E I * 1=0 CASE 2 * I > 0

GET THE CODE F O K v tCTUn MUDE AND ENTER POINT PLOT

GET THE CODE FOR POINT PLOT SET P O I N T PLOT S»^lTCri

AND OJTPUl I 1

MUvE AKGUEMENT PJ INTER

I*

Page 104: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

Data Flow from 21MX to SID

91

Signal Designation

From 21MX To SID Via Cable

BO (Bit 0)

Bl

B2

B3

B4

B5

B6

B7

B8

B9

BIO

Bll

B12

B13 •

B14

B15

STC enable line

er-rrtUnd

A

B

C

D

E

F

K

J

K

L

M

N

P

R

S

T

22-Z

BB

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

3

2

1

2

3

4

5

7

15

16

17

18

20

21

28

29

30

31

33

82

^¥. •

Page 105: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

.;'./. 7

;K'-5('

0051 0 0 52 0053 0054 0 0 55 0 0 56 0057

1 6.'<6'>

1 6363 1 6364 1 6365 1 6366 1 6367 1 6370 1 6371 1 637 f'

1 O l?> 0 7 27 3:' 162 7 3^ 0 16622 ^72723 0 627 20 0 42 7 ? P 072722 162 7 22

LU^

STA LDA JSB STA LDA ADA STA LDA

Mn.UH^* 1

TEi'if TEMP* i

C UN V

X Nl

ARGAD ARGAD AKGAU*I

u L 1 .'. 104

U O N V E K T A 1 U b l s ^ i - r i . - i L U : . ! -SAVE X L J C A L L r MOvE TO i ^EX l A n G u r . i ' i c ^ i

GET Y

r ' nGE iAl\^'iA ft.^\

i1 'A 'SR

f'»0 59 0.T60 <^''61 0 0 6 2 0 0 63 0 0 6 4 0 0 6 5 0 0 6 6 0 0 6 7 0 0 6 8 0 0 6 9 0 0 7 0 * 0 0 7 1 * 0 0 7 2 * 0 0 7 3 * 0 0 7 4* 0 0 7 5* 0 0 7 6 * 0 0 7 7 0 0 7 8 0 0 7 9 0 0 8 0 0 0 8 1 0 0 8 2 0 0 8 3 0 0 8 4 0 0 8 5 * 0 0 8 6 0 0 8 7 0 0 8 8 0 0 8 9 0J0 90

1 637 3 1 6 3 7 / . 1 6 3 7 5 1 6 3 7 6 1 6 3 7 7 1 6 4 0 0 1 6401 1 6 4 0 2 1 6 4 0 3 1 6 4 0 4 1 6 40 5 1 6 40 6

0 7 27 30 1 6 2 7 3'^ ^M 66^ *i

0 7 2 7 2 4 0 1 65-67 0 6 2 7 2 7 0 6 6 7 3 1 0 0 6 0 0 2 0 1 6 6 1 0 0 0 2 4 0 0 0 7 2 7 3 1 1 2 6 3 3 6

STA LDA JSB STA JSB LDA LDB SZB JSB CLA STA JMP

I EMP 1 E.'nr* J

UUNv r PLOT SAVEX PPSw

LCHOT

PPSW TPLOT*I

CONVERT r 1 ^ m.-r-oNY i i ^ iTcOLr

NUW l-'LOT T H I S P U l i M L O A D LOW ORDEK X L O A D P O I N T PLOT S W i T C r l S K I P I F NOT P O I N T PLOT MuuE OUT PUT LGv. ORDER A

RESET POINT PLOT SWITCH RETURN

*SUB10--CURSI ENABLES THE GRAPHICS CURSOR. THE USL^ * POSITIONS THE CURSOR AND THEN PRESSES A KEY. * THE ASCII VALUE OF THAT KEY AND THE CURSUr^ * COORDINATE INFORMATION IS SENT TO THE C U M P U T E K

*CALL(8*C*X*Y)

16407 16410 1641 1 1 6412 16413 1 641 4 16415 1 641 6

16417 1 6420 1 6421 16422 16423

000000 072722 062670 016610 062671 016610 062672 016610

016576 012704 016641 166722 0 7 67 30

CURSI NOP STA LDA JSB LDA JSB LDA JSB

JSB AND JSB LOB STB

ARGAD US LCHOT ESC LCHOT SUB LCHOT

LCHIN Bl 77 CONVO ARGAD*I TEMP

SET UP THE POINTERS GET THE CODE FOR ALPHA huuE

AND OUTPUT IT GET THE CODE TO ENABLE G A A P H I C

AND OUTPUT IT

WAIT FOR THE FIRST INPuT

CONVERT TO FLOATING POlNl bl^

STOKE FIRST INPUT AT C O K R E C T '

Page 106: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

0 T; 9 1

0092 0093 0094 0095 0096 0097 0098* 0099 0 1 00 0 101 0 1 02 0 103 0 104 0 1 05 0 106 0 1 07 0 1 08 0 109 0 110 0 111 0 112 0 113 0114

1 6424 1 6 42 5 16426 1 6427 1 6430 1 6431 1 6432

1 6433 1 6434 I 6435 1 6436 1 6437 1 6 440 1 6441 16442 1 6443 I b^AA

1 6445 1 6446 1 6- 47 1 6450 1 6451 16452

1 7P7 3'/ 0 367 30 066726 176730 062720 042722 072722

016576 012703 001722 072723 016576 012703 0327P3 016641 166722 0 7 67 30 172730 036730 066726 176730 062720 042722

^ T M

ISZ LDB STB LDA ADA STA

JSB AND ALh i STA JSB AND lOR JSb LDB STB STA ISZ LDB STR LDA ADA

1 c;-'.p/ :

TEi-ir"

EXr I TEMP* 1 Nl ARGAD ARGAD

LCHIN P37 K'AL X LCH IN B37 /

CU.^ V u ARGAD*I TLMr-TEMP*I TEMP EXPT TEMP*1 Nl A K G A D

'-\r. L M u i . 1(»5

MOvE THE P U l i V l L f v TO N E A T A jxOut .

ADDr \ESS

( J L T T H E . ^ E X T I N P U T CHAKACTcfN • ASK I T TO yj\\^\ »• 1 V t. r 1 I o r u o l T I u . N . r J V t. t : l l : > UVt-r.

A,«iD S A v L THEM \.c^ X GET THE . \EXT C H A R A C T E K

A N D M A S K 1 U »• 1 V L b l I «

HLUL 1 NJ P'.bb C U . J V E J N T A T O r i - u A i l i ^ L r \ n i .MH

S T J K E F l r c S T V.OKD U^ A V A L - J C

STORE 2ND w-URD Ur r L O A I l N u PU V A L U E OF X

.^OvE Tr iE P u l i \ IL.-N I J ivLA I ^r\^^U

PAGE 0 0 0 5 # 0 1

0115 0116 0 117 01 18 01 19 0 120 0121 0 1 22 0 123 0 1 24 0 125 0 126 0 127 0 128 0 129 0 1 3^ 0 131*

1 6453 1 6454 1 6455 16456 16457 1 6460 1 6461 1 6462 1 6463 1 6464 1 6465 1 6466 16467 1 64/.^ 1 647 1 1 6472

072722 016576 012703 Q017 22 072724 016576 012703 032724 01 6641 166722 076730 172730 036730 0 667 26 176730 126407

0 13?**SUB6-ERASE ERASES

STA JSB AND ALFi STA JSB AND I OR JSB LDB STB STA ISZ LDB STB JMP

THE

ARGAD LCHIN B37 -RAL Y LCH I N B37 Y CONVD ARGAD*1 T EMi-TEMP* I TEMP EXPT TEMP* 1 CURSI* I

SCREEN(

FETCH T H E N L X T G H A R A C T E K

AND MASK I T TO F l V L b I T S MOVE F I V E I - L A C E S 10 i H t L t r T

AND SAVE THEM I N y GET THE L A S T G H A R A C T E K

AND MASK I T OFF TO Ut>aLt ^ 1 ^ t. PLUG I N MSB

C o N v t r N T Y TO F L U A I l N b P U I N T b

STORE F I R S T ^(it^ii ut t wALUE

STORE 2ND wORD uf t v A u u - -RETURN

THE SAME

Page 107: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

4 r r" i J ; L i 1 L r"-L L r 1 ) IU6

f* 1 liA* A 0 1 3 5 * 0 1 3 6 0 1 37 •

0 1 38 0 1 3 9 n 1 4^^ 0 1 41 '• 1 / ' - •

( . ' i L L t 6 )

1 6 4 7 3 1 6 47 iS

1 6 4 7 5 1 6 4 7 6 ! 6 4 7 7 1 6 5 O 0

•1 1 Z i T * * 5ut<7 - .

0 0'" -O ' ' 0 6 2 6 7 1 0 1 6 6 1 0 0 6 2 ' 7 3 0 1 6 6 1 0 1 2 6 ^ 7 3

- - P R 1 \ T :

0 1 2 i z . * * C A L L ( 7 * X* Y * C ) 0 1 4 5 * * 0 1 4 6 + 0 1 -«7 i) 1 4d 0 1 4 9 (^ 1 50 0 1 51 •7! 1 50 +

0 1 5 3 * 0 1 5 ^ * 0 1 5 5 fl 1 5 6 0 1 57 0 1 58 0 1 59 0 1 60 0 1 61 0 1 6 2 0 1 6 3 0 1 6 4 0 1 6 5 0 1 6 6 0 1 67 0 1 6 8 0 1 6 9 0 1 7 0 0 1 71

16 501 1 6 5:^2 1 6 5 0 3 1 6 5 0 4 1 6 50 5

0 0 0 0 0 ? 0 7 2 7 P P 0 6 2 7 2 0 0 6 ^ 6 7 2 0 2 6 50 6

F I R S T A DARK

1 6 50 6 1 6 5 0 7

1 6 5 1 0 1 6 5 1 1 1 6 5 1 2 1 6 5 1 3 1 651 4 I 651 5 1 6 5 1 6 1 6 5 1 7 1 6 5 2 0 1 6 5 2 1 1 6 5 2 2 1 6 5 2 3 1 6 5 2 4 1 6 5 2 5 1 6 5 2 6

0 7 2 7 0 2 0 7 6 7 0 1 0 6 2 6 6 7 0 1 6 6 1 0 1 6 2 7 2 2 0 7 2 7 3 0 1 6 2 7 3 0 0 1 6 6 2 2 0 7 2 7 2 3 0 6 2 7 2 0 0 4 2 7 2 2 0 7 2 7 2 2 1 6 2 7 2 2 0 7 2 7 3 0 1 6 2 7 3 0 ( ^ ' 16622 0 7 2 7 2 4

ERASE NOP L D A

J S P LDA J l ) H JMP

L S L LCHOT FF L C H O T

E R A S E * 1

OUT ONE CHARACTER ^

SUB 7

A.

NOP STA LDA L D B JMP

VECTOR I S

HERE STA S T B L D A J S B L D A STA L D A J S B S T A L D A ADA S T A L D A S T A L D A J S B S T A

M " S 1 1 V

ARGAD N l SUB HERE

DRAv.N TO

COUNT COMp

GS L C H O T A R G A D * 1 TEMP T E M P * I CONV A

N l A R G A D ARGAD A R G A D * 1 TEMP T E M P * I CONV Y

• • 1 -/ L' I 1

' - r . A C T L j

P O S l T 1 I

J w \ ( I )

m

PAGE 0 0 0 6 *01

0 1 7 2 1 6 5 2 7 0 1 6 5 4 7 J S B PLOT

0 1 7 3 * 0 j 7 4 # GET I N ALPHA MODE AND OUTPUT TO THE TERMINAL THE

Page 108: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

(*. 1 7 S • 0 1 7 6* 0 177 0 1 78 0 1 79 0 180 0 181 0 182 0 183 0 1 R /J 0 1 .S S 0 1 86 0 187 r 1 BR n 189 0 1 90 0 1 91 0 1 92 + 0 1 9 3 * f> 1 9 4 * 0 1 9 5 * 0 1 9 6 fl 197 0 1 98 0 1 99 0 2 0 0 0 2 0 1 0 2 0 2 0 2 0 3 0 2 0 4 0 2 0 5 0 2 0 6 0 2 0 7 0 2 0 8 0 2 0 9 0 2 1 0 0 2 1 1 0 2 1 2 0 2 1 3 0 2 1 4 0 2 1 5 0 2 1 6 0 2 1 7 0 2 1 8 0 2 1 9 * 0 2 2 0 * 0 2 2 1 * 0222* 0223 0224 0225

i : : i I (• '.••'«(: 1F 1 /. i : . t ' 10,

1 6 530 1 6 5 3 1 1 6 5 3 2 1 6 5 3 3 1 6 5 3 4 1 6 5 3 5 1 6 5 3 6 1 6 S 3 7 1 6 54r. 1 6541 1 6 542 1 6 5 4 3 1 6 5 4 4 1 6 5 4 5 1 6 5 4 6

06267r>, 0 1 661 ? 0 6 2 7 2 0 0 4 2 7 2 2 0 7 2 7 2 2 1 6 2 7 2 2 0 7 2 7 3 0 162 7 30 0 1 6 6 2 2 0 1 6 6 1 0 0 3 6 7 0 2 0 2 6 5 3 2 0 66 7 11 056672 126501

LOOP

LDA JSB LDA ADA STA LDA STA LDA JSB JSB ISZ JMP LDB CPB JMP

US LCHOT Nl ARGAD ARGAD ARbAD.1 I EMr-TEMP*1 Cu.» V LCHOI COUNT LOOP COMP bUtn SUB7* I

* PLOT CONVEfNTS THE A AND Y COuRDINATE VALJE., 1 i i U * FOUR CHARACTERS AND OUTPUTS THEM TO THE TEKMIPJAL

1 6547 1 65 50 1 6551 1 6552 1 6553 1 6554 1 6555 1 6556 1 6557 1 6560 1 6561 1 6562 16563 1 6564 16565 16566 1 6567 1 6570 16571 1 6572 1 6573 16574 16575

000000 06272/. 0017 27 00 17 23 012703 032705 816610 0 627 2 4 012703 032 7 07 016610 062723 001727 001723 012703 03270 5 016610 062723 012703 032706 072727 016610 126547

PLOT NOP LDA ALFi ALFi AND I OR JSB LDA AND IOK

JSB LDA ALFi ALFi AND I OR JSB LDA AND I OR STA JSB JMP

Y ALF K A K

B3 7 HOB LCHOT Y B3 7 LYb LCHOT X .ALF RAR B37 HOB LCHOT X B3 7 LXB SAVEX LCHOT PLOT*I

GET THE 1 V A L U ^

DISCAKD TME RIGHTMOST F 1 V E BI T b

MASK Tu UNL-Y ^lvt. blTS PLUL IN K E U U I K E U B I T S

AND UJTPUT THE CHARACTER GET BACK TrtE Y vAbUL

AND MASK IT TO ONLY J= 1 vt. Bl PLUG IN REuUlKLD blTS AND uUTPuT THE CHARAClt.r\

NOW GET TnE X VALUE DISCARD T H E KlbHlMuSI

FIVE BITS

PLUG IN THE REQUIRED BlTb AND OUTPUT THE CHARACTER

GET BACK THE X VALUE AND LEAVE ONLY LOw O R U E K

PLUG IN THE REQUIRED bllS SAvE LOW ORDER X BITS

AND OUTPUT THE C H A R A C I L R RETURN

I'

i • ^ . ^

Fl

41 LCHIN INPUTS A « AND PUTS IT IN

CHARACTER FROM THE A REGISTER

THE TERMINAL

16576 000000 16577 062712 ]6600 102610

LCHIN NOP LDA TYRB OTA SC

GET THE TTY INPUT BITS AND OUTPUT TO THE iNTErvFACt

Page 109: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

0 2 2 6 :^227 0 228

16 601 n*371." 1 66.'>P l.' 'Y,7i: 16603 102310

•J I C L' L » G

C L c L . SFS SC r. A 1 T r \ji\ j j . ' < c »^L.»iU'^

PAGE 0007 *01

0 2 2 9 0 2 3 0 0231 0 2 3 2 0 2 3 3 * 0 2 3 4 * 0 2 3 5 * 0 2 3 6 * 0 237 0 2 3 8 0 2 3 9 0 2 40 0241 0 2 42 0 2 4 3 0 2 4 4 0 2 4 5 0 2-66 0 2 47* 0 2 4 8 * 0 2 4 9 * 0 2 5 0 * 0251 0 2 5 2 0 2 5 3 0 2 5 - 6 0 2 5 5 0 2 5 6 0 2 57 0 2 5 8 0259 0 2 6 0 0261 0 2 6 2 0 2 6 3 0 2 6 4 0 2 6 5 0 2 6 6 * 0 2 6 7 *

16604 0266^.3 16605 102510 16606 012710 16607 126S7 6

JMP •-! LIA SC A N D b3 7/ JMP LCHIN,I

* LCHOT OUTPUTS THE CHARACTER * TO THE GRAPHICS TERMINAL

1 6610 1 661 1 1 6612 1 661 3 1 661 4 1 661 5 I 661 6 1 6617 1 6620 1 6621

000000 012710 066711 106610 102610 103710 106710 102310 026617 126610

LCHOT

OET T H L Gn ' ^nACTEn A.JD i-.A:>f\ I T u r F

I N THE A R E G I S T E R

JMOP

AND LDB 0TB OTA STC CLC SFS JMP JMP

B3V7 I YPb SC SC sc*c SC SC * -1 LCHOT*I

MASK THE G n A , \ ' i C l h . K l u S i Z c L.ET THE T T r u U T r U T b l l L

AND T E L L T H L i N l E K f A L t - buAr \ r J T THE CHAh•ACIL^^ OUT S I A K I I M E O U T P J l PREvEiXT AN I N T E K R U P T

WAIT r U K T H C U U T P U I

TO P i . > * i o n K E T <JnM

* CONV CONVERTS A FLUAliNL PUINT BINARY NUMbER * TO A BINARY INTEGER

16622 1 6623 16624 1 6625 1 6626 1 6627 1 6630 1 6631 1 6632 1 6633 1 6634 1 6635 1 6636 1 6637 1 6640

000000 006400 072717 036730 162730 012715 001100 003004 042716 032714 072637 0t'6400 062717 030v?00 126622

CONV

SHIFT

• CONVD CONVERTS A

NOP CLB STA ISZ LDA AND ARS CMA J ADA I OR STA CLB LDA NOP JMP

REMP TEMP TEMP* 1 B3 7 6

INA TOTAL INSTR SHIFT

REMP

CONV* I

I NARY INTEGER

t'u. •:-i

INFO A FLOATING

Page 110: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

r 7 6^, • 0269* 0270* 0271* 0272* 0273* 0274 0275 0276 0277 0278 0279 0280 0281 0282 0283 0284 0285

>'0\ ij hl.viA-.Y .\U--,bt.,x

THE FIRST WORD OF THE l-LUAll.vb PT NUMDE.N IN THE A REGISTER. THE SECOND WORD THE EXPONENT IS STORED AT EXPT.

10^

l b r u l C Ui^ 1 A I iv 1 .- c

1 6641 16642 1 6643 1 6644 1 6645 1 6646 1 6 6 4 7 1 6 6 5 0 1 6 6 5 1 1 6 6 5 2 16653 1 6654

000000 072725 006400 002003 026665 006004 001100 002002 026646 07 6/26 062726 00300 4

CONVD NOP STA VALUE CLB SZA* K S S JMP E.^u INB ARS SZA JMP *-3 STB EXh-I LDA EXPT CMA*INA

PAGE 0 00 8 #0 1

0 2 8 6 0 2 8 7 0 288 0 2 8 9 0 2 9 0 0 2 9 1 0 2 9 2 0 2 9 3 0 2 9 4 0 2 9 5 0 2 9 6 * 0 2 9 7 *

1 6 6 5 5 1 6 6 5 6 1 6 6 5 7 1 6 6 6 0 1 6661 1 6 6 6 2 1 6 6 6 3 1 6 6 6 4 1 6 6 6 5 1 6 6 6 6

0 2 9 8 * * * * * * * 0 2 9 9 * 0 300 0 301 0 3 0 2 0 3 0 3 0 3 0 4 0 30 5 0 3 0 6 0 307 0 3 0 8 0 3 0 9

0 0 0 1 0 1 6 6 6 7 1 6 6 7 0 1 6671 1 6 6 7 2 1 6 6 7 3 1 6 6 7 4 I 6 6 7 5 1 6 6 7 6 1 6 6 7 7

0 4 2 7 1 6 0 3 2 7 1 3 0 7 2 6 6 2 0 0 6 4 0 0 0 6 2 7 2 5 0 0 0 0 0 0 0 6 6 7 2 6 0 0 5 0 0 0 0 7 6 7 2 6 1 2 6 6 4 1

SHFTL

END

ADA I OR STA CLB LDA NOP LDB BLS STB JMP

,

TOTAL INSTL SHFTL

VALUE

EXPT

EXPT CONVD* I

PARAMETERS AND STORAGE * • » * • • • • • » • * • » • » * • » * » • *

0 0 0 0 3 5 0 0 0 0 3 7 0 0 0 0 3 3 0 0 0 0 3 2 0 0 0 0 1 4 1 7 7 7 6 6 0 0 0 0 0 5 0 0 0 0 0 2 1 7 7 7 7 6

SC GS US ESC SUB FF N10 ENQ ELAPS N2

EQU OCT OCT OCT OCT OCT DEC OCT OCT DEC

10B 3 5 3 7 3 3 3 2 1 4 - 1 0 0 5 0 2 - 2

C H A K A C T E K 10 SET VECTOR MOuE CHARACTER TO SET ALPHA MODE ESC • SUB ENABLE GrxAPrtlCS

CURSOR ESC • ff ERASE THE SCr<tE>.

Page 111: AUTOr^ATED SYSTEM DESIGN FOR SKIN IMPEDANCE …

r 31 ?. 031 1 0312 0313 031 4 031 5 0 316 0 31 7 0318 0 319 0 320 0 321 0 322 0 323 0 32ii

0 32 5 0 32 6 0 327 0 328 0 329 0 330 0 331 0 332 0333 0334 0335 0336* 0337 0 338 0 339 0 3 40 0341 0 3 42

1 67r^:l

1 6701 1 6702 16703 1 6704 1 6705 1 6706 1 6707 1 6710 1 67 1 1 1 67 12 1 671 3 1 67 1 4 1671 5 1 671 6 16 7 17 1 6720 1 6721 1 6722 16723 1 6724 1 6725 16726 1 6727 167 30 16731

1 6732 001 1 0 001 10 00121 00121 00122

1 7 7 7 7 3

Ov'^aOOO

003000 000037 000 17 7 0000 40 000 100 000140 000377 120000 160000 1 000 40 1 0 I 0 4:1 000376 0 000 17 000000 177777 000000 000000 000000 000000 0M'?nno 000000 000000 000000 000000

016732

016000 0160 30

• ' 1)

CUMP COUNT B37 B177 HOB LXB LYB B37 7 TYPB TYRB INSTL I N S T K

B376 TOTAL R Ei'U' Nl TIME

ARGAD A

Y VALUE EXPT SAVEX TEMP PPSW

LSTWD

DLL PSS BSS OCT UGT OCT OCT OCT OCT OCT OCT OCT OCT OCT OCT BSS DEC BSS BSS BSis BSS BSS BSS BSS BSS OCT

EQU ORG DEF ORG DEF D^^

— !">

1 1 3 /

1 n A-^

1 00 1 40 3 77 1 200 0 ^ 1 6000.' 100040 1 0 1 0 40 376 1 7 1 -1 1 1 1 1 1 1 1 1 0

»

1 10B LSTuD 121B SBTBL ENDTb

110 i

TTY U U T r U T n I T o T I y i .NPul t 1 1 i>

P O I N T r L U T MODE S w I T G H

PAGE 0009 #01

0 3 4 3 * * NO ERRORS*

END