instrument interfacing course

in TSlOnn machine rwdahle form on cassette taDe for $10. One-Semester Microcomputer/lnstrument. Interfacing Course. Richard Soltero and Arthur T. Poul...
9 downloads 0 Views 2MB Size
Table 2.

Table 3. Interfacing Course Syllabus

Data and Calculated Results. Ag-Hg Amalgam Cell

Temperature (KI

EMF (Vl

Time Required (wk)

AG(kca1lmoie) Topic

284.42 290.08 295.39 301.35

(f0.03) (f0.031 (i0.03) (i0.03)

Temperature (K) 289.80 295.61 Temperature (K) 289.91 295.72

0.84426 fiO.000051 0.84691 fi0.000051 0.84833 (i0.000051 0.84980 (i0.00008)

81.460(1-0.005) 81.716 (iO.0051 81.853 ffO.005) 81.995 (f 00051

AH(kcailmo1e) 71.278 (i0.378) 74.539 (4~0.3281

AS (callK-mole) -35.8 (i0.7) -24.8 (i0.7)

could be incorporated to realize a fully automatic data collection svstem. Somedata and resultzohtained frum our rell are presented ~ t tt~ in Tnhle 2. Drviation from ~rnndardvalues is d ~ msinlg the non-unity activity coefficients of the solid phase components. Our cell was prepared with approximately 2% and 5% silver-mercury and cadmium-mercury amalgams, respectively. The emphasis of this experiment is to insure that the student can perform the calcul&ms on real data, rather than reproducing textbook data. In an experiment such as the determination of the activity coefficients from cell measurements, the emphasis will he shifted towards the accuracy reproducibility of the data. The measurement system described above will, of course, work equally well in the latter experiment. The system can he adapted to a variety of other experiments in a variety of environments. For example, in one of the many standard undergraduate acid-base related experiments the only additional necessary components are a pH electrode and a high impedance buffer amplifier, or pH meter with chart recorder outnut. A BASIC listing of the program used in the experiment is available from the authors upon request. Please include $1 to cover costs of copy and postage. The program is also available in TSlOnn machine rwdahle form on cassette taDe for $10.

One-Semester Microcomputer/lnstrument Interfacing Course Richard Soltero and Arthur T. Poulos Berlex Laboratories, Inc. 110 East Avenue Cedar Knolls, NJ 07927

an over

We describe here a one-semester . graduate course in microcomputer interfacing currently heing taught in the Chemistrv.Deoartment of Rutgers University. Our objective . was to teach hardware and software aspects to students having some proficiency in programmmg and a good background in chemical instrumentation. The course differs from others reported in the literature (6-10) by attempting, in one semester (42 hr), to bring students to a level of competency which would enable them to interface most common lahoratory devices. This highly compressed course was designed to quickly give our graduate population the expertise to computerize the data collection procedures required in their thesis research or in their work in the chemical industry. T h e main thrust of the course was to teach enough of the programming languages (RASIC and assembly), electronics, and interfacing to complete a project within the semester. Since the Chemistry Department did not have microcomputers before this course was developed, a fully-equipped 170

Journal of Chemical Education

1

I, introduction A. Background Evaluation 8. Course Description C. introduction to Microcomputers D. FTojeCt Orientation 11. FioiCharting ill, introduction to BASIC iV. Eleclronics A. DC Circuits B. integratedCircuits C. DP-AMPS V. Number Systems A. Binary Numbers B. BCD C. Hexadecimal D. Boolean Algebra Vi. AIM-65 A. Memory Map 6 . Versatile intalface Adapter C . Machine Commands D. Microprocessor Architecture Vii. lnnod~ctionto Assembly A. 6502 Registers B. lnstru~tionSet C. Open and Addressing Modes VIIi. Analog to Digital Convertors A. Programming in Assembly B. Programming in BASIC C. Digital-to-Analog Convertors IX. Assembly A. Text Editer 8. Assembler C. Subroutines D. Jump Commands E. Interrupts X. Project Demonstrations

1 1 2

1

1

1

2

2

2

microcom~uterroom was established. Initially, three Rockwell ~ 1 ~ - 6 5 ' i ' w epurrhast*& re and installrd ill rnom whirh was Also, analogldigital convprted into ;I computer latw~rat~rry. ( A D ) and digital/analbg (DIA) conve&rs were necessary for many of the projects. A unit, available from Excert, Inc.," contains an 8-channel, 8-bit A/D converter and two 8-bit DIA converters. Three of these units were purchased for student use. In addition, three peripheral hoards were built for lahoratory exercises. Each board contained 8 LED's which were connected to Port A of the 6522 VIA (Versatile Interface Adapter). Eight dip switches were connected to Port B. By the proper manipulation of machine codes or PEEK or POKE commands, the students could present digital data on the LED's or read the digital data represented by the switch positions. Several texts were used to cover BASIC programming, assembler programming, and an overview of the field of microcomputers (11-14). A course syllabus is shown in Table 3. Flow charting and a review of BASIC were pkesented first so that programming assignments could begin immediately. A flow chart was required with every program, and programs andlor circuit problems were assigned every week. The main obiective of the course was to get each student to complete an interfacing project. Each project was chosen to solve a nroblem that the student might have solved using traditional methods. A list of suggestei projects are in able

a

4.

Rockwell international. Anaheim. CA. 110 802, Excert Inc.. White Bear Lake, MN.

Table 4. List of Interfacing Projects Projects mat do not

require an AID or DIA convertor:

1. Counting or measuring with a photocell 2. Control of a stepper motor

Digital plotler Parallel printer Control of LED'S 6. Read digital data from switches 7. Time of day digital clock 8. Event timer 9. Morse code sendlreceive 10. Frequency counter 11. Games paddles, joysticks '12. BCD input from an instrument wilh BCD output '13. Digital thermometer 14. Light pen 15. Connect two VIA'S (versatile interfaceadapters) 16. CRT terminal (or other RS-232C device) 17. Bit pad or digitizer 18. Speech synthesizer -19. Hall effect switches '20. Optically coupled switches ' 3. 4. 5.

Projects that require an AID convertor: 1. Build an AID convertor 2. Any instrument with an analog signal (i.e..HPLC detector. A.A.. 3. PM tube in a single beam speclmphotomater ' 4. Thermocouple

etc.)

Projects lhat require a DIA converter: 1. Digital voltmeter 2. X Y plolter 3. Strip chart recorder

.Prqear succernfully mmplefed by a stuaent. These projects required a considerable amount of effort, and this was taken into account in several wavs. There was no final for the course, hut every project had to be demonstrated in class. The grade earned on the project counted for 50% of the course grade (25% of the course grade was based on a mid-term and 25% on homework). Since there were many types of projects and each was different in difficulty, a project scoring svstem was set up. A complexity rating, "C", was assigneJtdeach project dependinion the amo"nt of work required. "C" ranged from values of 0.7 to 1.3, depending on how complex the taiks were. At the end of the semester, after the demonstration, a success factor, "S, was awarded hased on how much of the project was cornp(etrd. This iactor rnngrd frum 0 to 100%.The projrct grade wa;calculated 1 n m the product. C X S . Usine this svstem. some students were motivated to take on highry comGlex tasks with the hope that their project grade would make up for deficiencies in other grades. Providing the students with an appropriate electronics background proved to he challenging. It was difficult to decide how much and what topics to cover so that all students could complete their projects. However, an especially successful

technique was a one-period laboratory demonstration on the fundamentals of soldering, wire wrapping, hread-boarding, and the use of test equipment such as oscilloscopes and multimeters. This provibed students with the expertise to determine the analog characteristics of their own circuits. Operational amplifiers or voltage divider circuits were constructed by the students to matrh the dynamic range of the DIA-AD converters. The circuit designs were obtained from various reference hooks (15-17) or by consultation with the instructors and the departmental electronics technician. Fabrication was entirely the student's responsibility. Anv oroarammine course can take from one to four semest&to bring a st;dent up to a high level of proficiency. In this course, onlv half a semester was left when assemhlv orogramming was ktroduced. The topic was covered to the cmit that the class could write and debug simple routines that would interact with more complex BASIC programs. The assembler routines were restricted to data transfer or acquisition through the 6522 VIA. In this way, the students could use a simple assembly routine to complete their project while the lectures covered more advanced concepts in theory. Our experience was that, given additional help by the instructors, graduate students and upper level undergraduates could attain adequate interfacing facility in a one-semester course. Out of an initial enrollment of 17 students. 12 successfully completed their projects. The major conceptual difficulties were in the use of machine laneuaee. and in conditioning analog signals to he compatible with the A D converter. Consequently, the course has heen restructured to spend less lecture time on the BASIC language and more on electronics and the use of assembly language in interfacing. A more thorough description of the course (which includes details on the individual projects) and a circuit diagram of the peripheral board are available through Project SERAPHIM a t a cost of $4. (Make checks payable to Project SERAPHIM, Account 20350.) Literature Cited I l l See. for example, Cartellan, Cilherl W., "Pli&al Chernistrv; Addison Wesley, read in^. MA, 1971. 121 Revinzton.PhilipR..~.DataReduclionand~rn,r~nai.~ai~fnrthePhy~calScioncn.~ MrGmw-Hill. New Yark. 1969.

171 Salhhurg, H.. H?ist.H..snd Olson. T.MICRO.53,53 119821. 181 Heist. R..0lson.T.. and Saltsbiwe. H..MICRO.55.59 119821.

. .

napolis. IN. 1980. (15) 0lekry.T. E.."l'incticniSolid SLnteCirruit Daripn; Howsrd W.SarnasndCornpsny, Inc.. Indinnapolii. IN. 1981.

Volume 61 Number 2 February 1984

171