Interfacing an Apple II microcomputer to a UV ... - ACS Publications

my desk that describe programs or computer-based materials almost identical to ones that have appeared or are scheduled to appear in this column. Some...
0 downloads 0 Views 2MB Size
edited by

computer miw. 21

JOHN W. MOORE Eastern Michigan University, Ypsilanti, MI 48197

Bits and Pieces, 7 Most authors of Bits and Pieces are willing to make available listings and/or machine-readable versions of their programs. Please read each description carefully to determine compatibility with your own computing environment before requesting materials from any of the authors. Guidelines for authors of Bits and Pieces appeared in the April 1980 issue of the Journal.

puters in chemistry instruction in subsequent Bits and Pieces columns.

Interfacing an Apple II Microcomputer to a UV-Vlsible Spectrophotometer G. Scoff Owen, Deborah Travis, and Terry Green

Atlanta University Atlanta, GA 30314

Editor's Note

The prohlem of duplication of effort or "reinventing the wheel" is so common that it has become a clichb. It is nevertheless real and no less challenging simply because it has been around for a decade or more. I am continuallv reminded of this as manuscripts cross my desk that describe programs or computer-based materials almost identical to ones that have appeared or are scheduled to appear in this column. Sometimes this involves very similar programs that run on different computer systems, in which case an effort is made to fit a hrief description of each into the limited space available. More often even the hardware and programming language are nearly the same, and publication cannot be justified. The Computer Series in general, and Bits and Pieces in particular, represent one attempt at dealing with the duplication-of-effort problem. Another approach is being taken by the ACS DivCHED Task Force on Computers in Chemical Education whose workshops and newly revived newsletter provide much information about who is doing what. (For more details contact TFCCE Chairman, G. Scott Owen, Atlanta University.) Under NSF sponsorship CONDUIT (Iowa City, Iowa) is taking a third approach-marketing instructional software for chemistry as well as other disciplines, and there are many private software suppliers, ranging from individual authors up to manufacturers of personal microcomputers. Unfortunately it is very difficult to keep track of all these sources, and it is impossible to keep up-to-date on their offerings, or even their continued existence, given the long lead times for publication in this and other print media. I t seems to me that we ought to be able to adapt modern information-processing and communications technology to solve this problem. There currently exist two nationwide, inexpensive, commercial communication networks, The Source and Compuserve, that are designed to link users of microcomputers equipped with modems, or for that matter anyone with a time-sharing terminal, with centralized databases or with each other. It should he possihle to use these services to store a list of available software, keep the list current, and make it available anywhere in the US., essentially instantaneously, via a local telephone call. In addition, reviews of software bv Dersons who had actuallv used the Droprams in their classes; comments on, corrections to, and ext&ion of existing Droarams, and the latest information about tricks . . ll' thr I ~ > : N ~ ~ I I I I thr.tqhlx~~ > i, ;tl~.>w! 1,111 H?,wherea~i n ~ n m h h LMIT it i: , ~ h ~ m11t Kh, !'I he .\ 1 ) conversion time is 70 ps)

The Computer Series anempts to delineate the current state of the art of computer usage in chemical education while accornmidating the needs and background Of readers who have link or no computer expertise. In addition to full-length articles. short descriotions ot s~ecificaolaboratories are published as "Bits and Pieces.'' so that readers who have appropriate computer systems can obtsin and use the programs described. The editor's intention is that the Computer Series be understandable for beginners but at the %me time interestino for exoerts. John W. Moore rGeived his ABfrom Franklin and Marshall Colleae and his PhD from Northwestern University, concentrating in physical inorganic chemishy. Following NSF-sponsored postdoctoral work at the University of Copenhagen he has taught at Indiana University and Eastern Michiqan University. He is co-author of "Environmental Chemistrv." "Chekstiy," and ihe saon-to-appear third edition of "Kinetics and

..

"

Environmental Review Board. Dr. Moore has produced numerous

2 ) Real Time Clock (RTC). The RTC is used topruvide timing for the AID conversions. Our RTC is made bv Mountain Hardware. lnc.

interval as small as 0.1 ms.

3) Parallel Printer Interface Board (made by Apple, Inc.). This board is used to interface to our system printer. 4 ) High Speed Serial Interface Board (made by Apple, lne.). This board can be used as a printer interface for serial terminals, e.g., an LA-120 Decwriter, or printers. It can also be used fur high speed (9600 R a l ~ d dntn l tmnifer.

..

data analysis, e.g., curve deconvolution. fi) IDS 440 i"Paoer . . Tiger") Printer. This orinter allows us to make &gram andlor data listings,bur printer also has the graphics option with which we can make a cmnplete copy of the graphics screen, thus giving us a hard copy of our acquired spectra. 7) Black and white monitor used for graphics and program display. 8 ) Apple Graphics Tablet. The Graphics Tablet is used todigitize spectra from instruments not directly interfaced to the LDS. This allows us to easily enter data into the computer for further manipulation. The tablet is also used for preparing slides. The LDS was interfaced to an Hitachi UV-Visible spectrophotometer via the recorder outputs of the Hitachi. The voltage output from the Hitachi is linear with absorbance in the range 0-2.0, i.e., 1.0 V corresponds to a 1.0 absorbance. The ADC input range is 0-5.0 V, i.e. 0 V = 0 and 5.0 V = 255. Therefore, the spectrometer output had to be amplified, via an operational amplifier circuit, to match the input requirements of the ADC. The AID conversions are accomplished (in BASIC) by a two instruction sequence. First, the particular AID channel number is put into the appropriate memory location via a POKE statement. This initiates the analog to digital conversion wrocess. Then the resultant value is read from another memory location using a PEEK statement. Because of the slow execution time of the POKE statement (10-15 ms.) the AID conversion process is finished by the time the PEEK statement is executed. The sampling rate of the ADC board is timed by using the RTC. There are several ways to accomd i s h this timing. The sim~lestmethod is to read the RTC and determine if it;s time totake a sample. This method is slow and is useful only for a low sampling rate ( ~ + 0 D and O ore the donor and +

m m

mih

(1,

(2) (3) respectlvrly.

Figure I. A ponion of a poster prepared on the 9872A plofter.Printing, including all special characters. was done with a single pass. Volume 58

Number 9

September 1981

69 1