Path: news.uiowa.edu!news.physics.uiowa.edu!math.ohio-state.edu!howland.reston.ans.net!gatech!news.mathworks.com!news.kei.com!nntp.coast.net!news2.acs.oakland.edu!newshub.gmr.com!hobbes.tad.eds.com!maverick.tad.eds.com!news-admin@tad.eds.com From: Erick Wagner Newsgroups: comp.sys.apple2 Subject: Re: interfacing with game port - how? Date: 10 Jan 1996 16:01:34 GMT Organization: PRC Lines: 263 Message-ID: <4d0nsu$olo@maverick.tad.eds.com> References: <4cv488$9ae@maverick.tad.eds.com> NNTP-Posting-Host: 148.94.8.235 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 1.22 (Windows; I; 16bit) KFest 1995 Demonstration Information ----------------------------------------------------- A-to-D Converter [Chaos in the Laboratory, Project 5, Kit CAD-16, $32] ----------------------------------------------------- This project implements a 10-bit serial analog-to-digital converter (ADC). It can report a voltage as any of 1,024 possible values (ranging from 0 to 1,023). So with a 10-bit ADC, the voltage is read in steps of approximately 5 mV (5 V/1,024). The circuit for this project is based on the LTC1092 10-bit Serial ADC manufactured by Linear Technology, Inc. This chip is capable of performing a conversion within 20 us but the speed of a 1 MHz computer and the routines used to control it, limit the speed to about one sample every 160 us. The oscilloscope program (SCOPE) supplied by Vernier Software displays 6,000 voltage readings per second. Input voltage range: 0 to +5 VDC; using a voltage outside this range will display incorrect results and could damage the LTC1092 Utilization of the 16-pin game port o Electrical power is provided by +5 V (pin 1) and Gnd (pin 8). o The clock signal for the ADC is accomplished by using software to pulse the AN2 (pin 13) annunciator output line. o The chip select to control when the ADC should send or receive data is accomplished with the AN3 (pin 12) annunciator output line. When the computer wants the ADC to take a voltage reading, it switches the chip select line to low. This starts the analog-to-digital conversion. o Serial output (parallel output is more common) from the ADC is sent to PB2/SW2 (pin 4). Voltage readings are sent to the computer as a series of 10 high- or low-voltage signals. A machine language routine decodes the data steam into two 8-bit bytes that the computer can manipulate. ------------------------------------------------------ Barometer/Pressure Sensor [Chaos in the Laboratory, Project 7, Kit CBR-DIN, $42] ------------------------------------------------------ This project measures air pressure using a SenSym SCX15ANC Pressure Transducer. The transducer produces a small voltage that is proportional to the pressure. A two-stage instrumentation amplifier circuit with offset adjustment is used to increase the voltage signal and adjust the sensitivity of the circuit. The sensor used in this project is the SCX15ANC; "A" indicates that it measures absolute pressure. The "15" designates that the sensor's range is 0 - 15 psi (0 - 30.54 in. of Hg). It is designed only for use with non-corrosive gases such as air, helium, nitrogen, etc. This project requires use of either the A-to-D Converter or the Voltage Monitor. ------------------------------------------------------ D-to-A Converter/Digitized Sound [Chaos in the Laboratory, Project 10, Kit CDA-16, $21] ------------------------------------------------------ This project implements a digital-to-analog converter (DAC) producing a voltage in the range of 0 to -2.5 VDC in steps of 0.01 volts to correspond with digital values ranging from 0 to 255. The circuit for this project is based on the DAC0832LCN DAC and a 74164 serial shift register chip. The output can change very rapidly -- up to 6,000 times per second. A function generator program (SAMPLE.PLAY) supplied by Vernier Software allows you to output sine, square, and sawtooth wave forms and control the frequency. Utilization of the 16-pin game port o Electrical power is provided by +5 V (pin 1) and Gnd (pin 8). o Digital data is sent in a serialized manner to the DAC via the AN0 (pin 15).annunciator output line. The digital data being sent to AN0 is an 8-bit count being fed into a 74164 serial in shift register one bit at a time. o The AN1 (pin 14) annunciator output line is used to control when the D-to-A conversion takes place. o The AN2 (pin 13) annunciator output line acts as a clock line indicating when each new bit is being sent. --------------------------------------- Humidity Meter [Mousetrap, Project 4, Kit BHM-16, $23] --------------------------------------- This project measures the relative humidity of the air by using a device specifically designed to change capacitance as the moisture content of the air changes. This circuit for this project produces an output frequency that varies with the relative humidity. The specific sensor used in this project is called a Capacitive Relative Humidity Sensor and is manufactured by Philips Electronics. It consists of a plastic case containing a stretched, non-conducting membrane. The membrane is coated on both sides with a very thin coating of gold. The two gold coatings separated by the insulating membrane form a parallel plate capacitor. The sensor acting as a continuously varying capacitor alters the frequency produced by an astable-multivibrator circuit. Utilization of the 16-pin game port o Electrical power is provided by +5 V (pin 1) and Gnd (pin 8). o Square-wave output of varying frequency (proportional to the capacitance of the relative humidity sensor) is sent to PB2/SW2 (pin 4). --------------------------------------- Microphone/Amplifier [Mousetrap, Project 3, Kit BMA-16, $12] --------------------------------------- This project measures the frequency of sound waves, especially those of musical instruments. This circuit for this project performs three major functions. First, a microphone responds to air pressure changes caused by the sound wave and produces a small electrical current. This current varies with the sound wave. Next, an amplifier increases the strength of the electrical signal. And finally, a Schmitt trigger is used to produce a square wave that has the same frequency as the original sound wave. This project works best with fairly "pure" tones (without a lot of intense overtones) and sounds with a duration of at least one second. Utilization of the 16-pin game port o Electrical power is provided by +5 V (pin 1) and Gnd (pin 8). o Steady square-wave output of unknown frequency is sent to PB2/SW2 (pin 4). ------------------------------------------------------ Unipolar Stepper Motor [Chaos in the Laboratory, Project 11, Kit CSU-16, $16] ------------------------------------------------------ This project controls the operation (direction and stepping by energizing the motor coils in a particular sequence) of unipolar stepper motors. The circuit for this project is based on the UCN-5804B Stepper Motor Drive chip from Allegro Microsystems (formerly Sprague). Utilization of the 16-pin game port o Electrical power is provided by +5 V (pin 1) and Gnd (pin 8). Note that this is only used to power the UCN-5804B chip and not the stepper motor. o The AN0 (pin 15) annunciator output line is used to control the step pulses. Each low to high transition causes the stepper motor to advance one step. o The AN1 (pin 14) annunciator output line is used to control the direction of rotation (clockwise or counterclockwise) of the stepper motor. If this line is at 5 VDC (HIGH), the motor rotates clockwise. If this line is at 0 VDC, the motor rotates counterclockwise. An external DC power supply is required due to the relatively high current consumption of the stepper motors. ------------------------------------- Ultrasonic Range Finder [Chaos in the Laboratory, Project 13] ------------------------------------- Vernier does not supply a kit but makes reference to another company: CAPE-tech. The core elements (the Polaroid module and transducer) of this project is also available from MicroMint (203-871-6170 or 800-635-3355) as item #TI01 (Ultrasonic Ranging Module) for $79; [the pricing and availability were last verified on 1995-Jul-21]. ------------------------------------- VM-1110A Voice Record/Playback Module [Radio Shack #276-1324] ------------------------------------- Utilizes the latest ChipCorder(TM) technology by Information Storage Devices (ISD) and combines an on-chip oscillator, microphone preamplifier, automatic gain control (AGC), anti-aliasing filter, smoothing filter, speaker amplifier, and all passive electronic components (resistors, capacitors) in a package barely larger than 1-inch square. Up to 10 seconds of high-quality audio storage for short duration messaging applications. Recordings are stored in non-volatile memory cells, providing zero-power (no battery backup needed) message storage. Voice and audio signals are stored directly, in their natural analog form, into EEPROM (Electrically Eraseable Programmable Read Only Memory). 100 year message retention 100,000 record cycles +5 VDC power supply, standby current is 0.5 A, maximum operating current is 35 mA In addition to providing simple message playback, the ISD VM-1110A provides a full addressing capability. Eighty distinct addressable segments are available providing 125 ms resolution per segment. Utilization of the 16-pin game port o Electrical power is provided by +5 V (pin 1) and Gnd (pin 8). o The AN0 (pin 15) and AN1 (pin 14) annunciator output lines are used to set and clear the PlayL* and Rec* control signals for playback and record modes. --------------------------------------- Voltage Monitor [Mousetrap, Project 7, Kit BVM-16, $24] --------------------------------------- There are many situations in the real world where it is useful to measure a voltage under the control of a computer. Many sensors and devices are available that produce a voltage output as they measure something else. Examples include: pH meters, thermocouples, and strain gages. The traditional method of reading voltages with a computer is to use an analog-to-digital converter. This is usually an expensive of equipment that converts voltage signals into numbers that the computer can interpret. The complexity and expense increase as greater resolution is attained (8, 10, 12, 16 bit). If high resolution and rapid conversion times are required for an application, an A-to-D converter should be used. The voltage monitor project uses a voltage-to-frequency converter chip. This chip senses the voltage applied to it and then produces an output signal (a square wave) that varies in frequency (pulses per second) with the input voltage. The computer can determine the frequency coming from the voltage-to-frequency converter and therefore indirectly measure voltage; the computer counts the number of pulses that occur in a specific time period and then calculates the number of pulses per second (frequency). The circuit for this project is based on the LM311 Precision Voltage-to-Frequency IC manufactured by National Semiconductor, Inc. Input voltage range: 0 to +3.5 VDC; input voltages outside this range will display a zero result Utilization of the 16-pin game port o Electrical power is provided by +5 V (pin 1) and Gnd (pin 8). o Square-wave output of varying frequency (proportional to the voltage) is sent to PB2/SW2 (pin 4). [end of document]