Home
1781-PXB481 manual for 48-point Digital Input/Output Card
Contents
1. 30 X4NP BASEADDR Read Port A 40 Y INP BASEA DDR 42 16 Read Port C Hi To set outputs high 1 at port B and thelower nibble of Port C 50 OUT BASEADDR 41 amp HFF Turn on all Port B Bits 60 OUT BASEADDR 2 amp HF Turn on all bits of Port C lower nibble 14 1781 PXB481 USER S MANUAL CONNECTOR PIN ASSIGNMENTS Two 50 pin headers are provided on the 1781 PXB481 one for each 241 O group The mating connector is an AMP type 1 499776 0 or equivalent Connector pin assignments are listed below Notice that every second lineis grounded to minimize crosstalk between signals ASSIGNMENT PortC High PC7 Port C High PC6 Port High PC5 Port C High PC4 Port C Low Port Low 2 Low 1 Port Low PCO 7 1 ASSIGNMENT 2 GROUND 4 GROUND GROUND GROUND GROUND GROUND GROUND GROUND GROUND GROUND 49 5 N ote This lineis I O port and also a User Interrupt N 12 2 2 QJ 16 18 20 2 26 28 30 3 36 38 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 15 1781 PXB481 USER S MANUAL SPECIFICATION Features 48 Bits of Digital Input Output Interrupt Generation on Input Change of State Change of State Interrupt Software Enabled in Six 8 Input Ports All 481 O Lines Buffered on the Board I O Buffers Can Enabled Disable
2. interrupt is generated the LED will illuminate and remain on until the interrupt is reset If there is an immediate reset of the interrupt it islikely that the LED will not remain on long enough to be observed NOTE A jumper must be installed either the TST or the BEN position for the card to function There is a wire jumper installed on the card at a position labeled WAIT The associated circuitry asserts a WAIT signal to the CPU in order to provide a longer write cycle In this way there is assurance that the 8255 PPI will have adequate time to accept inputs from the CPU in fast AT computers If this extra wait state will cause a problem in your application and if you deem it non essential then this wirejumper may be dipped The foregoing are the only manual setups necessary to use the 1781 PXB481 Input Output selection and the change of state Interrupt Enable is done via software by writing to a control register in each PPI as described in the PROGRAMM ING section of this manual 1781 PXB481 USER S MANUAL ADDRESS SELECTION The 1781 PXB481 card occupies 16 bytes of 1 space The card base address can be selected anywhere within the I O address range 100 3F0 hex in AT s except 1F0 to 1F8 and 200 3F0 in XT s However two installed options cannot share the same address If in doubt where to assign the base address refer to the following tables and the FIN DBASE program to find an available address for your system TABLE
3. Oncethis has been done VisualBASIC will be enhanced with the addition of four functions Those functions and their calling method are listed below InPortb Function Reads a byte from a hardware port Due b limitations of VisualBASIC the number is returned in an integer Declaration function InPortb byval address as integer as integer InPort Function Reads an integer from a hardware port This function returns the 16 bit value obtained from reading the low byte from address and the high byte from address 1 Declaration function InPort byval address as integer as integer OutPortb Function Writes the lower eight bits of value to the hardware port at address This function returns the value output Declaration function OutPortb byval address as integer byval value as integer as integer OutPort Function Writes all 16 bits of value to the hardware port at address This function returns the value output Declaration function Outport byval address as integer byval valueas integer as integer Peek Function Reads a byte from main memory M Declaration function Peek byval segment as integer byval offset as integer as integer 17 1781 PXB481 USER S MANUAL Poke Function Writes the lower eight bits of value to segment offset Declaration function Poke byval segment as integer byval offset as integer as integer Note that in all of the above functions an inherent limitation of BASIC in general an
4. 0 Control port 0 PA port 1 PB port 1 PC port 1 Control port 1 Enable Disable Buffer Group 0 Enable Disable Buffer Group 1 Enable Chg of State Interrupt Clear Chg of State Interrupt is designed to use each of these PPI s in Mode 0 wherein Read Write Read Write Read Write WriteOnly Read Write Read Write Read Write WriteOnly WriteOnly WriteOnly WriteOnly WriteOnly There aretwo 8 bit ports A and B and two 4 bit ports C HI and C LO Any port can be configured as an inputor an output Outputs are latched Inputs are not latched oopp Each PPI contains a control register This write only 8 bit register is used to set the mode and direction of the ports At Power Up or Reset all 1 O lines are set as inputs Each PPI should be configured during initialization by writing to the control registers even if the ports areonly going to beused as inputs Output buffers are automatically set by hardware according to the control register state N ote that control registers 11 1781 PXB481 USER S MANUAL are located at base address 3 and base address 7 Bit assignments in each of these control registers are as follows TABLE 4 CONTROL REGISTER BIT ASSIGNMENT Port C LO CO C3 1 Input 0 Output Port B 1 Input 0 Output Mode Select 1 1 0 Port C Hi C4 C7 1 Input 0 Output PortA 1 Input 0 Output Mode Select 01 Mode 1 00 Mode 0 1X Mode2 ModeSet Flag 1 Active Not
5. of two installed functions overlap you will experience unpredictable computer behavior 1781 PXB481 USER S MANUAL SOFTWARE WRC supplies three programs to support the 1781 PXB481 Digital 1 card and also to help you develop your applications software These programs are on a diskette that comes with your card and are as follows PXB481ST This is menu driven pictorial program to help you set the card address interrupt level change of state interrupt and high level interrupt enable FINDBASE Reports active and available address locations in your computer for assignment as the 1781 PXB481 base address SAMPLELC This program is under a directory titled CSAMPLES It is a C language software program that demonstrates how to program the change of state function PXB48 This is a demonstration program which is listed under a directory titled DEMO VB WRC This directory contains VisualBASIC sample and DLL to create VisualBA SIC applications with the 1781 PXB481 PXB481ST This program is supplied with the 1781 PXB481 as a tool for you to use in configuring jumpers and switches on the card It is menu driven and provides pictures of the card on the computer monitor You make simple keystrokes to select functions The picture on the monitor then changes to show how the jumper or switches should be placed to effect your choices The setup program is a stand alone program that can at any time It does not requi
6. 1 STANDARD ADDRESS ASSIGNMENTS FOR PC AND PC XT COMPUTERS These options can not be used together addresses overlap NMI Mask Register 1781 PXB481 USER S MANUAL TABLE 2 STANDARD ADDRESS ASSIGNMENTS FOR 286 386 486 COM PUTERS HeRage Usmg R 00 Clear Math Coprocessor Buy 01 Rese Coprocessor OFO OF1 F 3F8 3FF Asynchronous Communication primary P P 360 36F P L To set desired board addresses refer to the illustrated Board Address setup program on the Utility diskette provided with the card Type the desired address in hexadecimal code and the graphic display will show you how to set the ADDRESS SETUP switches These switches are marked A4 A9 and form a binary representation of the address in negative type logic Assign 0 to all ADDRESS SETUP switches turned ON and assign 1 to all ADDRESS SETUP switches turned OFF 1781 PXB481 USER S MANUAL The following example illustrates switch selection corresponding to hex 2D0 or binary 10 1101 xxxx The xxxx represents address lines A3 A2 Al and AO used on the card to select individual registers at the PPI s See section 3 PROGRAMMING 2 s 4 gt p o h 1 Binary representation HERES Sup ON or or ow ort CAUTION Carefully review the address selection reference table on the previous page before selecting the card address If the address
7. 1781 481 48 POINT DIGITAL INPUT OUTPUT CARD USER S MANUAL Rev 2 E2a Western Reserve Controls Inc 1485 Exeter Road Akron OH 44306 330 733 6662 330 733 6663 FA X sales wrcakron com Email http www wrcakron com Web 1781 PXB481 USER S MANUAL NOTICES The information in this document is provided for reference only WRC does not assume any liability arising out of the application or use of the information or products described herein This document may contain or reference information and products protected by copyrights or patents and does not convey any license under the patent rights of WRC nor the rights of others WRC is atrademark of Western Reserve Controls PC PC XT and PC AT are registered trademarks of the International Business Machines Corporation Other trademarks belong to their respective companies 1781 PXB481 USER S MANUAL TABLE OF CONTENTS INSTFAELATION he att torte ete ea et 2 BACKING UP THE DISK uve ae AUR ER 2 HARD DISK USERS 312 152 3 213 8 RU a a RO Ea do venena 2 INSTALLING THE CARD 2 FUNCTIONAL DESCRIPTION 4 BLOCK DIAGRAM 5 OP HON SELECTION e speras 6 OPTION SELECTION MAP 7 ADDRESS SELECTION i523 24 vr GR Kersh eee e 8 ADDRESS ASSIGNMENTSFOR PC AND PC XT 8 ADDRESS ASSIGNMENTS FOR
8. 286 386 486 9 SOFEFWARE Tass vt ima te Da yC h OS Ne a mos y cades 11 PROGRAMMING aras ee eta Rare Sua eed ke iet ad 12 ADDRESS SELECTION TABLE 12 CONTROL REGISTER BIT ASSIGNMENT 13 CHANGE OF STATE INTERRUPT ENABLE REGISTER 13 ENABLING DISABLING I O BUFFERS 13 PROGRAMMING 14 CONNECTOR PIN ASSIGNMENT 16 SPECIFICATION apo et eet amas tow e eto ees 17 APPENDIX A REDIERE er v A LEE ds 18 APPENDIX Babs EUER REI 20 1781 PXB481 USER S MANUAL INSTALLATION BACKING UP THE DISK Software is provided with the 1781 PXB481 As with any software package you should make backup copies for everyday use and placethe master diskette in a safe location The easiest way to make a backup copy isto usethe DOS DISK COPY utility In asingle drive system the command is DISKCOPY A A In atwo disk system the command is DISKCOPY A B This will copy the contents of the master disk in driveA to the backup disk in driveB HARD DISK INSTALLATION The files contained on the master diskette may also be copied onto your hard disk To do this perform the following 1 Place the master diskette into a floppy drive 2 Change the active drive to the drive that has the master diskette installed For example if the diskette is the A drive typeA 3 Typel
9. N 6 Loosen the nuts on thestrain relief bar and swing top end free 7 Install the card in an 1 expansion slot If convenient select a slot adjacent to a vacant slot because this will make cable installation easier 8 Thread the O cables one by one through the cutout in the mounting bracket and plug them into the headers 9 Smooth the cables as close as possible to the card and while holding them close to the surface of the card swing thestrain relief bar into position and tighten nuts 10 Inspect for proper fit of the card and cables and tighten screws 11 Replace the computer cover 1781 PXB481 USER S MANUAL FUNCTIONAL DESCRIPTION FEATURES 48 Bits of Digital Input Output Interrupt Generation on Input Change of State Change of state Interrupt Software Enables in Six 8 Input Ports All 481 O Lines Buffered on the Board I O Buffers Can Be Enabled Disabled under Program Control Four and Eight Bit Ports Independently Selectable for 1 O Pull Upson I O Lines 5V Supply Available to the User Compatible with Industry Standard 1 O Racks from WRC and other vendors like Gordos Opto 22 Potter amp Brumfield etc APPLICATIONS Automatic Test Systems Laboratory Automation Robotics Machine Control Security Systems Energy Management Relay Monitoring and Control Parallel Data Transfer to PC Sensing Switch Closures or TTL DTL CMOS Logic Driving Indicator Lights or Recorders A major feature of this
10. NSTALL and follow the screen prompts Files contained on the disk are stored in separate as follows ROOT DIRECTORY Contains the FINDBASE PROGRAM that will help you to decide what base address to use with the Also contains the 1781 PXB481 setup program PSAM PLES Contains Pascal samples and the Pascal linkable driver CSAM PLES Contains C samples and a C linkabledriver BSAM PLES Contains the BASIC and QuickBASIC samples as well as the binary and linkable drivers VB_WRC Contains a VisualBASIC sample as well as a VisualBASIC linkable driver INSTALLING THE CARD Before installing the card carefully read the ADDRESS SELECTION and OPTION SELECTION Sections of this manual and onfigure the card according to your requirements Use the special software program called PXB481ST provided on diskette with the card It supplies visual aids to configure all areas of the board 1781 PXB481 USER S MANUAL Be especially careful with address selection If the addresses of two installed functions overlap you will experience unpredictable computer behavior If unsure what locations are available you can use the FINDBASE program provided on our diskette to locate blocks of available addresses To install the card 1 Remove power from the computer 2 Remove the computer cover 3 Remove blank 1 O backplate 4 Install jumpers for selected options See OPTION SELECTION 5 Select the base address on the card See ADDRESS SELECTIO
11. Values shown on these data sheets are subject to change for product improvement 19
12. card is that the state of all inputs can be monitored and if any one or more bits change state a latched interrupt request can be generated Thus it is not necessary to use software to continuously poll the inputs to detect a change of state The change of state interrupt is enabled by a software write to an interrupt enable register Six bitsin that register each control an eight input port at one of two type 8255 5 Programmable Peripheral Interface chips The change of state interrupt latch can be cleared by a software write In addition bit C3 at each 24 bit port pin 9 on the connectors can also be used as an interrupt to the computer if jumpers are installed When bit C3 goes high edge triggering an interrupt is requested Interrupts from these bits are OR ed together and OR ed with the change of state interrupt Interrupts are directed to levels 2 through 7 10 through 12 14 and 15 by jumper installation If enabled via the jumper each of these two interrupts are designed to allow onesignal in each group of 24 signals to act as an interrupt without regard to the interrupt status of the other 23 signals Thefunctional differenceto the user isthat thesetwo lines interrupt only on high going signals The 1781 PXB481 card was designed for industrial applications and can be installed in 7 or longer 1 slots of IBM PC XT AT or compatible computers Each 1 O lineis buffered and capable of sourcing 15 mA or sinking 24mA 64 mA on re
13. d VisualBASIC in particular makes the values sent less intuitive All integers in BASIC are signed numbers wherein data are stored in two s complement form All bit patterns must be converted to and from this two s complement form if meaningful display is required Otherwise values returned from the InPortb function will be 128 to 127 rather than Oto 255 Before the program will execute the GBL file must be modified to include the path to the VB WRC DLL as appropriate for your system Merdy replace the statement VB WRC DLL with drivepath VB WRC DLL An alternative to changing the source code you can copy the VB WRC DLL file into your Windows directory This will allow multiple programs to find the same DLL without having to know where it is located Just leave off all references to a port in the GBL file as shown in the sample 18 1781 PXB481 USER S MANUAL APPENDIX B PROGRAMMABLE PERIPHERAL INTERFACE DATA SHEETS The data sheets in the Appendix are provided to help your understanding of the 8255 5 PPI which is made by anumber of companies These sheets are reprinted with permission of Mitsubishi Electric Corporation Copyright 1987 The information diagrams and all other data included are believed to be correct and reliable However no responsibility is assumed by Mitsubishi Electric Corporation for their use nor for any infringements of patents or other rights belonging to third parties which may result from their use
14. d under Program Control Four and Eight Bit Ports Independently Selectable for I 10kQ Pull Ups on 1 O Lines 45V Supply Available to the User Compatible with Industry Standard 1 O Racks like Gordos Opto 22 Potter amp Brumfield etc Digital Inputs TTL Compatible Logic High 2 0to 5 0VDC Logic Low 0 5to 0 8VDC Input Load Hi 20uA InputLoad Lo 200uA Digital Outputs LogicHigh 2 5 VDC min source 15 mA Logic Low 0 5 VDC max sink 24 mA 64 mA optional Power Output 45 VDC from computer bus ext 1A fast blow fuse recommended Power Required 5 VDC at 200 mA typical Size 7 15 Long Environmental Operating Temperature 0 degr to 60 degr C Storage Temperature 50 degr to 120 degr C Humidity Oto 9096 non condensing 16 1781 PXB481 USER S MANUAL ADDENDIXA WHEN YOU WISH TO USE THIS CARD WITH VISUALBASIC WRC provides extensions to the VisualBASIC language on the diskette provided with your card The extensions a directory named WRC These extensions are in the form of a DLL a GBL S and a LIB file Together thesefiles allow you to accessthe port memory spacein a fashion similar to BASIC QuickBA SIC Pascal C C Assembly and most other standard languages To use these files in a VisualBASIC program you must create a file File 1 New Project similar to the sample provided or else modify your existing project file to include the GBL
15. e Mode 1 and Mode 2 cannot be used by the 1781 PXB481 without modification Consult factory Thus bits D2 D5 and D6 should always beset to 0 and bit D7 to 1 At Power Up or Reset the change of state interrupt enable register is set to zero This enables all inputs to generate change of state interrupts During initialization this register should be programmed to prevent interrupt generation by ports programmed as outputs or by inputs that you do not want to cause change of state interrupts In order to program the change of state interrupt enable register write to it at base address B Data bits DO through D5 are used to enable inputs corresponding to ports A B and C of the 8255 PPI s Writing a one disables the port writing a zero enables it TABLE 5 CHANGE OF STATE INTERRUPT ENABLE REGISTER Bit Port Controlled Group 0 PortA Group 0 Port B Group 0 Port C Group 1 PortA Group 1 Port B Group 1 Port C The change of state interrupt is latched To clear this latch write anything at location Base Address ENABLING DISABLING I O BUFFERS 1781 PXB481 provides a means for enabling disabling the tri state 1 O buffers under program control If the TST BEN jumper on the card is installed in the BEN position thel buffers are permanently enabled However if that jumper is in the TST position the buffers are software controlled via the control register as follows a Thecard is initialized in the recei
16. nguage illustrates the foregoing const BASE ADDRESS 3 0x300 outportb BA SE ADDRESS 3 0x89 This instruction sets the mode to M ode ports A and B as output and port C asinput Since bit D7 is high the output buffers are set to tri state condition See item b above outportb BASE_ADDRESS 0 outportb BASE ADDRESS 0 These instructions set the initial state of ports A B to all zeroes Port C is not set because it is configured as an input Seeitem c above outportb BA SE ADDRESS 3 0x09 Enable the tri state output buffers by using the same control byte used to configure the PPI but now set bit D7 low Seeitem d above PROGRAMMING EXAMPLE BASIC The following example in BASIC is provided as a guideto assist you in developing your working software In this example the card base address is 200 hex and the 1 O lines of group 0 areto be setup as follows 13 1781 PXB481 USER S MANUAL Port A Input Port B Output Port C Hi Input Port C Lo Output The first step is to configure the control register Configure bits of the control register as 0 Do Port C Lo output Port B output ModeO Port C Hi input Port A input ModeO ModeO ActiveMode Set This corresponds to 98 hex If the card address is 2DO hex use the BASIC OUT command to write to the control register as follows 10 BASEADDR amp H 2D0 20 OUT BASEADDR43 amp H 98 To read theinputs at Port A and theupper nibbleof Port C
17. quest The card contains two Programmable Peripheral Interface chips type 8255 5 PPI to provide computer interface to 48 1 O lines Each PPI provides three 8 bit ports A B and C Each 8 bit port can be software configured to function as either inputs or output latches Port C can also be configured as four inputs and four output latches 1781 PXB481 USER S MANUAL Tri state I O line buffers 741 5245 are configured automatically by hardware logic for input or output use according to direction assignment from a control register in the PPI Further if a jumper is properly placed on the card the tri state buffers may be enabled disabled under program control See the Option Selection section to follow I O wiring connections are via 50 pin headers on the board Two flat 1 O cables connect 1781 PXB481 to mounting boards such as WRC s 1781 A24A Every second conductor of the flat cables is grounded to minimize the effect of crosstalk between signals If needed for external circuits 5 VDC power is available on each I O connector pin 49 If you usethis power we recommend that you include a 1A fast blow fuse in your circuits in order to avoid possible damage to the host computer cable in the event of a malfunction in those external circuits The 1781 PXB481 occupies sixteen bytes of I O address space The base address is selectable via DIP Switch anywhere within the range of 000 3FF hex An illustrated setup program is provided on di
18. re that the card be plugged into the computer for any part of the setup The program is self explanatory with operation instructions and on line help To run this program at the DOS prompt enter PXBA8IST followed by the Enter 10 1781 PXB481 USER S MANUAL PROGRAMMING The 1781 PXB481 is an I O mapped device that is easily configured from any language and any language can easily perform digital 1 O through the card s ports This is especially true if the form of the data is byte or word wide All references to the 1 ports would bein absolute port addressing However a table could be used to convert the byte or word data ports to alogical reference DEVELOPING YOUR APPLICATION SOFTWARE If you wish to gain a better understanding of the programs on diskette then the information inthe following paragraphs will be of interest to you Refer to the data sheets and 8255 5 specification in AppendixA A total of 16 address locations are used by the 1781 PXB481 The PPI s are addressed consecutively with Address bits A3 through 0 as follows TABLE 3 ADDRESS SELECTION TABLE Port Assignment Base Address 0 Base Address 1 Base Address 2 Base Address 3 Base Address 4 Base Address 5 Base Address 6 Base Address 7 Base Address 8 Base Address 9 BaseAddress B Base Address F The 1781 481 card uses two 8255 5 PPI s to provide a total of 48 bits input output capability The card PA port 0 PB port 0 PC port
19. skette with the 1781 481 card Interactive displays show locations and proper settings of DIP switches and jumpers to set up board address interrupt levels and interrupt enable Also sample programs in Turbo C and Turbo Pascal are presented in the Software section of this manual 1781 PXB481 USER S MANUAL OPTION SELECTION Refer to the setup programs on the diskette provided with the card Also refer to the 1781 PXB481 BLOCK DIAGRAM SCHEMATIC on the previous pages and the OPTION SELECTION MAP on the following page when reading this Section of the manual External Interrupts are accepted on the 1 connector pin 9 port C bit The Interrupt signal is positive true These External Interrupts are enabled if the IEN jumper is installed Interrupts are directed to levels 2 through 7 10 through 12 14 and 15 by jumpers installed locations labeled IRQ2 through IRQ7 through IRQ12 IRQ14 and IRQ15 respectively A means of enabling or disabling the 74LS245 input output buffers under program control is provided at the jumper position labeled TST BEN When the jumper is in the BEN Buffer Enable position the I buffers are always enabled When the jumper is in the TST Tristate position enabled disabled state is controlled by a control register See the programming section of this manual for a description An LED 1 is provided at the top center of the card to assist you in program development Each time an
20. ve mode by the computer reset command 12 1781 PXB481 USER S MANUAL b When bit D7 of the control register is set high direction of the three ports of the associated PPI chip as well as the mode can beset For example a writeto base address 3 with data bit D7 high allows programming of port direction at Group OportsA B and C If for example hex 80 is sent to base address 3 the Group 0 PPI will be configured in mode 0 with Ports A B and C as outputs Now if any of the ports have been set as outputs you may set the initial values to therespective port with the outputs still in thetri state condition If all ports have been set as inputs this step is not necessary d If data bit D7 is low when the control byteis written ONLY the associated buffer controller is addressed If for example a control byte of hex 80 has been sent as previously described and the data to be output are correct and it isnow desired to open the three ports then it is necessary to send a control byte of hex 00 to base address 3 to enable the Group 0 buffers When you do this the buffers will be enabled NOTE Note that all data bits except D7 must be the same for the two control bytes Those buffers will now remain enabled until another control byte with data bit D7 high is sent to base address 3 Similarly the Group 1 ports can be enabled disabled via the control register at base address 7 the following program fragment in C la
Download Pdf Manuals
Related Search
Related Contents
この取扱説明書には取り付け方やうンプの交換方法、 お 1 2. Safety Information… 3 製品組立・取扱説明書 MANUEL D`UTILISATION DES GILETS Connecting your TV - ProductReview.com.au Bibliobus - Médiathèque Départementale du Jura FRANÇAIS ESPAÑOL Copyright © All rights reserved.
Failed to retrieve file