Construction and Application of a Computer Based Interface Card



Similar documents
AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

STEPPER MOTOR SPEED AND POSITION CONTROL

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Interfacing Analog to Digital Data Converters

UMBC. ISA is the oldest of all these and today s computers still have a ISA bus interface. in form of an ISA slot (connection) on the main board.

NTE2053 Integrated Circuit 8 Bit MPU Compatible A/D Converter

ECONseries Low Cost USB DAQ

MICROPROCESSOR AND MICROCOMPUTER BASICS

MANUAL FOR BREAKOUT BOARD HG06

8051 MICROCONTROLLER COURSE

Access Control Using Smartcard And Passcode

Pmod peripheral modules are powered by the host via the interface s power and ground pins.

PART B QUESTIONS AND ANSWERS UNIT I

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

SYSTEM 45. C R H Electronics Design

Chapter 2 Logic Gates and Introduction to Computer Architecture

Technical Aspects of Creating and Assessing a Learning Environment in Digital Electronics for High School Students

Application Note 83 Fundamentals of RS 232 Serial Communications

Open Architecture Design for GPS Applications Yves Théroux, BAE Systems Canada

CNC-STEP. "LaserProbe4500" 3D laser scanning system Instruction manual

DMX-K-DRV. Integrated Step Motor Driver + (Basic Controller) Manual

Series Six Plus Programmable Controller

Technical Training Module ( 30 Days)

Data Sheet. Adaptive Design ltd. Arduino Dual L6470 Stepper Motor Shield V th November L6470 Stepper Motor Shield

Data Cables. Schmitt TTL LABORATORY ELECTRONICS II

HC(S)08-System for Development and Training

An Introduction to MPLAB Integrated Development Environment

SYSTEM 4C. C R H Electronics Design

USER MANUAL V5.0 ST100

Thermostat Application Module Kit

RC2200DK Demonstration Kit User Manual

X8 Option 2 - Technology

Microcontroller Based Low Cost Portable PC Mouse and Keyboard Tester

Lab Experiment 1: The LPC 2148 Education Board

How To Use A Watt Saver On A Microcontroller (Watt Saver) On A Cell Phone Or Mp3 Player

Lizy Kurian John Electrical and Computer Engineering Department, The University of Texas as Austin

DK40 Datasheet & Hardware manual Version 2

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Microprocessor Project Laboratory

ABB Drives. User s Manual HTL Encoder Interface FEN-31

ET-BASE AVR ATmega64/128

Conversion Between Analog and Digital Signals

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

PCI230+ & PCI260+ MULTI-FUNCTION ANALOG AND DIGITAL INPUT/OUTPUT BOARDS

Application Note 132. Introduction. Voice Video and Data Communications using a 2-Port Switch and Generic Bus Interface KSZ MQL/MVL

Designing an efficient Programmable Logic Controller using Programmable System On Chip

MODULE BOUSSOLE ÉLECTRONIQUE CMPS03 Référence :

USB I/O CONTROL BOX 8 relays, 8 digital I/O lines and 8 HV inputs

PROJECT PRESENTATION ON CELLPHONE OPERATED ROBOTIC ASSISTANT

Computer Performance. Topic 3. Contents. Prerequisite knowledge Before studying this topic you should be able to:

How To Use An Ams 5812 Pressure Sensor With A Usb Starter Kit

A+ Guide to Managing and Maintaining Your PC, 7e. Chapter 1 Introducing Hardware

How to read this guide

Computer Controlled Generating Stations Control and Regulation Simulator, with SCADA SCE

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

Computer Organization and Components

UPS PIco. to be used with. Raspberry Pi B+, A+, B, and A. HAT Compliant. Raspberry Pi is a trademark of the Raspberry Pi Foundation

B Robo Claw 2 Channel 5A Motor Controller Data Sheet

UIM2901-5A MACH3 breakout board

Documentation. M-Bus 130-mbx

Teaching the Importance of Data Correlation in Engineering Technology

Interfacing With Microprocessor

Location-Aware and Safer Cards: Enhancing RFID Security and Privacy

Learning Outcomes. Simple CPU Operation and Buses. Composition of a CPU. A simple CPU design

RS232C < - > RS485 CONVERTER S MANUAL. Model: LD15U. Phone: / 97 / 98 (M)

Glitch Free Frequency Shifting Simplifies Timing Design in Consumer Applications

EVAL-UFDC-1/UFDC-1M-16

EDI Distributor Control Interface Wiring and Setup Instructions

Programmable Logic Controller PLC

CNC FOR EDM MACHINE TOOL HARDWARE STRUCTURE. Ioan Lemeni

Monitoring of Intravenous Drip Rate

Programming and Using the Courier V.Everything Modem for Remote Operation of DDF6000

Manual Serial PCI Cards

PROGRAMMABLE LOGIC CONTROL

ALL-USB-RS422/485. User Manual. USB to Serial Converter RS422/485. ALLNET GmbH Computersysteme Alle Rechte vorbehalten

Supply voltage Supervisor TL77xx Series. Author: Eilhard Haseloff

How To Use A 1232 On A 1236 On A Computer Or A Cell Phone

8-Bit Microcontroller with Flash. Application Note. Using a Personal Computer to Program the AT89C51/C52/LV51/LV52/C1051/C2051

ELAN DIGITAL SYSTEMS LTD. SL232 PC- CARD USER S GUIDE

8254 PROGRAMMABLE INTERVAL TIMER

Arduino Motor Shield (L298) Manual

Development of a Computer-Controlled Security Gate System.

PACKAGE OUTLINE DALLAS DS2434 DS2434 GND. PR 35 PACKAGE See Mech. Drawings Section

WEB log. Device connection plans

Pololu DRV8835 Dual Motor Driver Shield for Arduino

THREE YEAR DEGREE (HONS.) COURSE BACHELOR OF COMPUTER APPLICATION (BCA) First Year Paper I Computer Fundamentals

Cellphone Based Device Control With Voice Acknowledgement

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Test Driven Development of Embedded Systems Using Existing Software Test Infrastructure

Description: Multiparameter System (4 or 8 channels)

Computer System: User s View. Computer System Components: High Level View. Input. Output. Computer. Computer System: Motherboard Level

Android Controlled Based Interface

DeviceNet Bus Software Help for Programming an Allen Bradley Control System

Table 1 Comparison of DC, Uni-Polar and Bi-polar Stepper Motors

GE Power Controls FIELDBUS APPENDIX PROFIBUS DP. Doc. No.: ASTAT Plus PB_Appendix-v0

ABB Drives. User s Manual. Pulse Encoder Interface Module RTAC-01

Application Note. Line Card Redundancy Design With the XRT83SL38 T1/E1 SH/LH LIU ICs

Allen-Bradley/Rockwell

FlowKit in-circuit debug system

CHAPTER 2: HARDWARE BASICS: INSIDE THE BOX

Transcription:

Session 4 Construction and Application of a Computer Based Interface Card Michael Combs Telescope Operations Engineer m.combs@morehead-st.edu Morehead State University Morehead, Kentucky Ahmad Zargari, Ph.D., CSIT Associate Professor a.zargar@morehead-st.edu Morehead State University Morehead, Kentucky Abstract Automated control of manufacturing systems and research tasks are becoming more demanding in today s competitive market. Computer interface and control applications are common practice not exceptions in the workplace. The knowledge of how to manage processes with computer control can be developed by working with basic tools of microprocessor interfacing. An interface card placed in a microcomputer can provide practitioners with the skills they need to be competitive. The Intel CA programmable peripheral interface IC can be used to interface external hardware with a microcomputer. The interface card being built and used at Morehead State University is based on the Intel CA programmable peripheral I/O device. With minimal support circuitry the CA can be interfaced with a microcomputer. The CA contains three -bit ports providing 4 lines of digital I/O. Several circuits can be connected to the CA making it more versatile. Counter/timers, analog to digital converters, digital to analog converters, sensors, and several other circuits can be connected to the interface card. The card is used to control and monitor different processes through hardware and software interfaces. Software used to program the interface card includes BASIC, Visual Basic, Visual C++, and Labview. The software interfaces include simple to complex routines depending on the application. Construction and application of the Intel CA interface card help provide an individual with the knowledge and skills of computer based control applications. Introduction Microcomputers have developed into a powerful and versatile tool in today s industry and research labs. Microcomputers are being used to control complex tasks and processes. It has become necessary to have a basic understanding of how these control processes work in order to be competitive. In order to control a process by a microcomputer an interface must exist from the microcomputer to the hardware being controlled. An interface can span from a simple to complex design.

Usually the more complex interface designs are more versatile and difficult to troubleshoot. In order to acquire an understanding of the theory and application of interfacing to a microcomputer a more basic design may be used. A popular and low cost interfacing component is the Intel CA programmable peripheral interface. Any compatible TTL I/O device may be interfaced to the microprocessor using the CA (Brey, ). Intel CA The Intel CA programmable peripheral interface component is used to interface hardware to the microprocessor of a microcomputer. The CA contains three -bit parallel ports for a total of 4 lines of digital I/O. This allows for one to several devices to be connected to the CA. The -bit ports are configured by sending a control word to the control register (Rafiquzzaman, ). Figure is a diagram describing the individual bits in the control register. CA Control Register D D D D4 D D D D0 Must be one to configure ports for I/O operation 0=output For simple I/O Port A = input 0= ouput 00 (mode 0) Port C upper 4-bits = input 0= output Port B = input, 0= ouput Must be 0 for simple I/O Port C Lower 4-bits = input, 0= ouput Figure. Diagram of the CA control register bits (Rafiquzzaman, ). The CA can be configured to operate in three different modes. In mode 0 the three ports are configured for basic I/O operation, two handshaking I/O ports for mode, and a bidirectional I/O port with five handshaking signals for mode (Uffenbeck, ). Throughout the paper the CA will be configured for basic I/O operations in mode 0. Interface Card The interface card is based on Intel s A programmable peripheral interface (PPI) IC. The A contains three -bit ports providing 4 lines of digital I/O. Support circuitry for the A consists of a buffer and address decoder circuit. The buffer circuit buffers the signals between the A and the motherboard, and the address decoder circuit assigns the A an address on the address bus. The interface card is inserted into an open ISA slot in the personal computer. Through the interface card external circuitry may be connected to a personal computer. Figure is a diagram of the schematic for the interface card.

INTEL BD BD BD4 BD BD BD 4 D0 D D D 0 D4 D D D U PA0 PA PA PA4 PA PA PA 40 4LS4 [A] D0 A U B [A] D A B [A] D 4 A B [A] D A4 B4 4 [A] D4 A B [A4] D A B [A] D A B [A] D A B G DIR 4LS0 IOA U 4LS BD0 BD BD BD BD4 BD BD BD BA0 BA BIOW BRESET DRV + V 4 0 A0 A RD WR RESET Vcc GND CS 4LS PB0 PB PB PB PB4 PB PB PB PC0 PC PC PC PC4 PC PC PC 0 4 4 0 4LS44 [B4] IOR X Y 4 U [B] IOW X Y [A] A0 X Y 4 [A0] A X4 Y4 [A] A X Y [A] A X Y [A] A4 X Y [A] A X Y G G 4LS44 [A] A X Y 4 U [A4] A X Y [A] A X Y 4 [A] A X4 Y4 [A] AEN X Y [B] RESET DRV X Y [B0] CLOCK X Y X Y G G BIOR BIOW BA0 BA BA BA BA4 BA BA BA BA BA BAEN BRESET DRV BA0 BA BA BA BA4 4LS04 U E E E E0 4LS4 A 0 B C 0 D 4 4 G G 0 A B C 4 D E F 00 E0 0 E 0 E 0 E 04 E4 0 E 0 E 0 E 0 E 0 E 0A E0 0B E 0C E 0D E 0E E4 0F E 4LS4 A 0 U0 B C 0 D 4 4 G G 0 A B 4 C D E F 0 E E E E E0 E E E E4 E A E B E C E D E E E0 F E BA BA BA BA BA 4LS P0 Q0 4 U P Q P Q P Q P4 Q4 P Q 4 P Q P Q + V BEAN G P=Q IOA Figure. Schematic of the A interface card. The interface card is constructed using the wire wrap technique. This allows for easy troubleshooting if so needed. Components are placed on the ISA prototype board in a logical order to allow for neat wiring and ease of troubleshooting. A pin connector is used to make external connections to the interface card. Figures and 4 show the top and bottom views of the finished CA interface card. Figure. Top View of the finished A Interface Card.

Testing the Interface Card Figure 4. Bottom view of the finished A Interface Card. Software routines are programmed to control the functionality of the interface card. BASIC, Visual Basic, and Visual C++ have been used the program the interface card. Programs in the National Instruments programming language Labview are also being developed. The following is a sample program to test the interface card once construction is completed. 00 REM PPI Set Ports A,B,C to Output 0 REM USES PORT B TO DISPLAY COUNT FROM 0 TO 0 BASEADDR = : REM 00H 0 PORTB = BASEADDR + 0 CNTRL = BASEADDR + 40 OUT CNTRL, 0 FOR SGNAL = 0 TO 0 OUT PORTB, SGNAL: PRINT "DECIMAL = "; SGNAL 0 FOR DELAY = TO 000: NEXT DELAY 0 NEXT SGNAL END The program sets all three ports of the A as output. A simple circuit of eight LEDs are constructed to test the circuit. The program uses Port B to count from 0 to. If the card is functioning properly the LEDs will light sequentially in binary until is reached and all LEDs are on. The CA requires a control word be sent first to configure the ports for proper operation. Once this is done the proper commands or data can be sent to the individual ports of the CA. Applications Once the interface card has been tested and proven to work properly other circuitry may be added to the card. Depending on the application, simple to complex circuitry may be required. A complex example may be the control of an assembly line process. A simple example may be the individual circuit to control a motor in the assembly line process. Circuits may be connected in

two different ways. Circuits may be added directly to the CA or due to the design of the address decoder circuit they may be added directly to the interface card. Figure is the address decoder portion of the interface card. BA0 BA BA BA A B C 0 D BA4 G 4LS04 U G 4LS4 U 0 4 4 0 A B C D E F 4 E0 E E E E4 E E E E E E0 E E E E4 E 00 0 0 0 04 0 0 0 0 0 0A 0B 0C 0D 0E 0F A B C 0 D G G 4LS4 U0 0 4 0 A B 4 C D E F 4 E E E E E0 E E E E4 E E E E E E0 E 0 A B C D E F BA BA BA BA BA 4LS P0 Q0 4 U P Q P P Q Q P4 P P P Q4 Q 4 Q Q + V BEAN G P=Q IOA Figure. Address decoder portion of the interface card. The address decoder allows addresses 00 to F to be used. The CA uses address 00 to 0. Address 00 is assigned to port A, 0 to port B, 0 to port C, and 0 to the control register. Addresses 04 to F are open for future components to be connected. Several different devices may be added to the interface card, examples are analog to digital converters, digital to analog converters, timers/counters, relays, various sensors, keyboards, displays, DC motors, and stepper motors. Depending on which device is to be added would determine how it would be connected to the card. For instance a keyboard or control of a motor would be added to the CA portion of the interface card. An C4 programmable interval timer would be added to the interface card address decoder circuitry and function separately from the CA. These are examples of the versatility and power of the interface card design. Stepper Motor Control A basic interface example is the control of a stepper motor system. A stepper motor is essentially a digital motor. It is controlled to move in discrete steps to rotate 0º (Bateson, ; Brey, ). The stepper motor may be controlled by using a motor driver also called a translator. The translator uses a digital TTL signal input to control the stepper motor.

The translator being used in this application is the SLO-SYN Micro Series packaged 40-PT translator manufactured by Superior Electric. The 40-PT is based on solid state electronics. The translator allows for.a max current per phase. The translator has three connector sections, power input, motor connection, and signal I/O connector. Power input is used to supply 0V source for the translator. The motor connection interfaces to the stepper motor. The signal I/O connector is where the control lines from the CA interface card will be connected (Oh, ). The motor being used with the translator is the model number M0-FD0 SLO-SYN stepper motor manufactured by Superior Electric. The stepper motor has a current rating of. amps, and a step resolution of 00 steps for a complete rotation. Figure is a picture of the SLO-SYN 40-PT translator. Figure is a picture of the SLO-SYN stepper motor. Figure. SLO-SYN 40-PT translator manufactured by Superior Electric. Figure. Model M0-FD0 SLO-SYN

Interface Card and Translator Connections motor manufactured by Superior Electric. Connections for the stepper motor control circuit are simple. The CA interface card and stepper motor connect to the translator. Figure is a block diagram of the stepper motor control circuit. CONTROL COMPUTER TRANSLATOR MOTOR Figure. Block diagram for stepper motor control circuit. Two control lines plus ground are needed for connection from the CA interface card to the translator motor driver. Lines PA0 and PA are used from port A of the interface card. PA0 is connected to the direction control input of the translator. The PA line is connected to the pulsein line to control the speed of the stepper motor by generating a variable pulse train. Table lists the connector pins for the signal I/O connector on the translator. Pin Assignment All Windings Off CW/CCW Pulse In 4 Not Used Not Used Not Used Vo Not Used Half/Full 0 Opto Supply Out Opto Supply In Vo Not Used 4 Not Used Not Used Table. Pin assignments for the signal I/O connector of the SLO-SYN 40-PT translator.

The translator has a few options for control, the translator may be configured for half or full step resolution. It may also be wired for turning the power off to the windings to allow for the motor to move freely. For this application the stepper motor will move in full steps and the all windings off is not wired. Pins 0 and are wired together on the translator for it to use its internal opto isolation. This helps to protect the control lines of the translator. Figure is a connection diagram from the CA to the SLO-SYN translator. BD BD BD4 BD BD BD BA0 BA BIOW BRESET DRV + V 4 D0 D D D 0 D4 D D D A0 A RD WR RESET Vcc GND CS INTEL PA0 PA PA PA4 PA PA PA PB0 PB PB PB PB4 PB PB PB PC0 PC PC PC PC4 PC PC PC 40 0 4 4 0 40-PT Translator CW/CCW GND Signal I/O Connector E0 E E E 4 0 4LS Note: Address decoder not shown. Translator and Motor Connections Figure. Connection diagram of the interface card to the SLO-SYN 40-PT Translator. The translator contains a twist-lock circular female AMP connector for motor connections. Table lists the connections pins and their assignments. PIN Assignment M4 M No Connection 4 Ground No Connection M No Connection M Table. Pin assignments for the motor connector of the SLO-SYN 40-PT translator.

Using the proper cable for the translator and motor connections is essential. Superior Electric suggest a shielded, twisted pair cable (Superior Electric, ). Figure 0 is a connection diagram from the translator to the stepper motor. TRANSLATOR M4 M M M GROUND WHITE/GREEN GREEN WHITE/RED BLACK STEPPER MOTOR Figure 0. Connection diagram for the 40-PT translator and M0-FD0 SLO-SYN stepper motor. Once all hardware connections are complete the software programming phase of the project may begin. Simple software routines may be programmed quickly for testing. Programming The CA is simple to program due to it containing only two internal command registers (Brey, ). These registers are used to configure the CA for operation by the user. The following three programs are used to test the stepper motor interface application to insure proper wiring and configuration. All of the following programs all ports are set as output and port A is used to generate a pulse train to drive the stepper motor. The first program generates a pulse train set by the user by entering a delay value. The duty cycle is set at 0%. 00 REM PPI Set Ports A,B,C to Output 0 REM USES PORT A AS A PULSE OUT 0 BASEADDR = : REM 00H 0 PORTB = BASEADDR + 0 CNTRL = BASEADDR + 40 OUT CNTRL, 4 PRINT "TYPE IN A DELAY LOOP AMOUNT" 4 INPUT D 0 SGNAL = 0 SGNAL = 0 OUT BASEADDR, SGNAL 0 FOR DELAY = TO D: NEXT DELAY 0 OUT BASEADDR, SGNAL FOR DELAY = TO D: NEXT DELAY 0 GOTO 0

The second program generates a pulse train and user defines the duty cycle by entering two different delay values for the high and low states. 00 REM PPI Set Ports A,B,C to Output 0 REM USES PORT A AS A PULSE OUT 0 BASEADDR = : REM 00H 0 PORTB = BASEADDR + 0 CNTRL = BASEADDR + 40 OUT CNTRL, 4 PRINT "TYPE IN AMOUNT FOR LOW DELAY" 4 INPUT L 4 PRINT "TYPE IN AMOUNT FOR HIGH DELAY" 4 INPUT H 0 SGNAL = 0 SGNAL = 0 OUT BASEADDR, SGNAL 0 FOR DELAY = TO L: NEXT DELAY 0 OUT BASEADDR, SGNAL FOR DELAY = TO H: NEXT DELAY 0 GOTO 0 The third program generates a ramping pulse train The duty cycle is set by the user by entering a delay value for the high and low states as was in the second program. 00 REM PPI Set Ports A,B,C to Output 0 REM USES PORT A AS A PULSE OUT 0 BASEADDR = : REM 00H 0 PORTB = BASEADDR + 0 CNTRL = BASEADDR + SGNAL = 0 SGNAL = 40 OUT CNTRL, 4 D = + D 0 OUT BASEADDR, SGNAL 0 FOR DELAY = TO D: NEXT DELAY 0 OUT BASEADDR, SGNAL FOR DELAY = TO D: NEXT DELAY 0 IF D < 00 THEN GOTO 4 IF D = 00 THEN GOTO 0 These three testing programs will help insure proper operation of the stepper motor control circuit. Once testing is complete more elaborate programs may be written depending on the application. The programs may be written in different languages also. Factors of the application will determine what is needed.

Future Applications The interface card allows for many different applications, and has the potential to control most anything with the proper support circuitry. Possible future interface projects could include interfacing a keyboard to the CA. Problems interfacing a keyboard include detecting a single key stroke from a switch matrix, debouncing to keep from detecting several key strokes from a single key stroke, and assigning values to the individual keys (Uffenbeck, ). An A programmable interrupt controller could be added to the interface card. The A could be used to monitor input switches to control corresponding events (Goody, ). The C4 programmable interval timer can be used to generate pulse trains, time events or used as a counter (Triebel, ). References Bateson, R. N. (). Introduction to control system technology (4 th Ed). New York, NY: Macmillan. Brey, B. B. (). The Intel microprocessors 0/0, 0, 04, Pentium, and Pentium Pro processor: Architecture, programming, and interfacing (4 th Ed). Upper Saddle River, NJ: Prentice Hall. Goody, R. W. (). Intel microprocessors: Hardware, software and applications. New York, NY: Glencoe Oh, P. (). interface card applications manual. Philadelphia, PA: Boondog Automation Rafiquzzaman, M. (). Microprocessors and microcomputer-based system design ( nd Ed). New York, NY: CRC Press. Superior Electric (). Instructions for SLO-SYN Micro Series packaged translators types 0-PT and 40-PT. Bristrol, CT: Superior Electric. Triebel, W. A. (). The 0, 04, and Pentium processor: Hardware, software, and interfacing. Upper Saddle River, NJ: Prentice Hall. Uffenbeck, J. (). The 0X family: Design, programming, and interfacing ( nd Ed). Upper Saddle River, NJ: Prentice Hall. Biography Michael Combs is the Telescope Operations Engineer of the Astrophysics Laboratory at Morehead State University. He has been with the Astrophysics Laboratory since, starting as an undergraduate and is now employed full time. He develops and maintains the systems of the Morehead Radio Telescope, which is a meter Nike Hercules antenna converted for radio astronomy work. Michael Combs also teaches electronics courses half time in the IET Department. Ahmad Zargari, Ph.D., CSIT. Research interests in Technology Graduate Programs, Job Market for IT, Alumni and Employers Feedback, Microprocessors, Total Quality Management, Statistical Process Control (SPC) and Design of Experiments (DOE). A senior member of Society of Manufacturing Engineers, member of Epsilon Pi Tau, National Association of Industrial and Technical Teacher Educators, International Technology Education Association (ITEA) and member of the American Society for Engineering Education (ASEE).