Home

PC272E - Amplicon

image

Contents

1. Command Word for Bit Set Reset Format Bit Set Reset 0 Reset 1 Set Xx XX Don t Care COMMAND SELECT Bit Set Reset Flag 0 Active Port C Bit Select oper ohol fot tofeo olof 1 folo lt iie ofofolols f Be q Amplicon Page 36 PC272E 5 3 13 Interrupt Source Selection Register This is the register that can be used to select one or more interrupt source for the PC272E board Register Write and or Register Register Offset Read Width Title Interrupt Source Selection Register int sce INT INT_SCE FUNCTION Selects one or more of the six PC272E interrupt sources The selected source s will then have the ability to drive the board s interrupt request level as selected on jumper J1 See 2 6 3 for details on selecting the PC272E interrupt request level If more than one source is selected the interrupt routine must interrogate the board to determine which source generated the interrupt The Interrupt Status register provides this information see section 5 3 14 Note The selected interrupt source signals are latched into the Interrupt Status register i e once a selected interrupt source signal goes high it remains high until the corresponding bit in the Interrupt Source Selection register is cleared set to 0 Therefore after servicing the asserted interrupt sources the interrupt routine must write a zero to this register to clear all latched inter
2. 2 6 4 Interrupt Source Selection The PC272E board has six possible digital I O sources for the board s hardware interrupt Selection of the required interrupt source is performed by software writing to the Interrupt Source Register See section 5 3 13 for details 2 7 Test Points Test point TP1 on the PC272E is not fitted as standard and is for factory test and programming purposes only Do not make connections to this point q Amplicon BD Page 11 PC272E a 3 MAKING THE CONNECTIONS 3 1 The Input Output Connector These input output connections are made through the connector protruding from the PC adaptor slot corresponding to the chosen board position For completeness of connection information the standard PC back plane bus connections are also shown in paragraph 3 5 5VDC O P Ci o40 PPI X Port A7 PPI X Port A6 C 21 O60 PPI X Port A5 PPI X Port A4 L C2 O41 PPI X Port A3 PPI X Port A2 22 O61 PPI X Port Al U PPI X Port AO C3 O72 PPI X Port C7 S PPI X Port C6 C23 O62 A PPI X Port C5 T A Port C4 043 GND PPI X Port C3 E C24 O63 PPI X Port C2 PPI X Port C1 R Os O44 PPI X Port CO O25 O64 PELS Port B PPI X Port B6 O PPI X Port B5 o6 045 PPI X Port B4 X S26 65 PPLA port Ba PPI X Port B2 Ol PPI X Port BI C7 046 PPI X Port BO 27 66 CoD PPI
3. where Returns Integer or Prior Calls See Also h OK ERRHANDLE ERRCHAN registerBoard DlOsetMode DlOsetChanWidth DlOsetData Integer Board handle as issued by function registerBoard Integer Address offset of the DIO chip Use one of the following pre defined constants PPIZ 16 Integer DIO channel Note the channel numbering depends on the channel width as set by function DIOsetChanWidth default is three 8 bit channels Pointer to Long Pointer to a variable declared as a long integer into which the digital data word will be placed q Amplicon BD Page 59 PC272E a 6 6 5 Switch Scanner Matrix Functions 6 6 5 1 Setup a Switch Scanner Matrix DlIOsetSwitchMatrix Sets up one two or three 82C55 DIO chips as a switch matrix scanning device The order of the matrix specified can be 12 for a 12 X 12 matrix scanning 144 switches using PPIX 24 for a 24 X 24 matrix scanning 576 switches using PPIX and PPIY or 36 for a 36 X 36 matrix scanning 1296 switches using PPIX PPIY and PPIZ Group A ports A and C upper are set for output to send test patterns to the matrix and group B port B and C lower are set for input to read the switch status information back in The user must ensure that the switch array is wired correctly with suitable diodes and resistors otherwise the board could get damaged See section 4 2 1 for details Only one switch matrix implementation is available per boar
4. EF OA Mine aeeSran os Figure 11 PC272E Printed Circuit Layout a SERIAL NO q Amplicon Page B1
5. PC212E 78 way Connector 12 Counters Kit 24 Lines Digital I O OR PC214E EX233 3 Counters 78 way termination 48 Lines Digital I O and or 3x37 way distribution PC215E 78 78 wa 3 Counters Cable 48 Lines Digital I O PC218E 18 Counters 37 37 way Cable PC272E 72 Lines Digital I O l AND OR OR 37 37 way Cable PC36AT E Existi CTT TTT xisting 24 Lines Digital I O Existing 37 way 37 way termination assy D Connector Kit Figure 1 Product Configurator Block Diagram q Amplicon Page 3 PC272E 1 4 F eatures of the PC272E e 72 programmable digital input output I O lines with three operating modes e Six selectable interrupt sources 1 5 PC272E General Description 1 5 1 1 5 1 1 1 5 1 2 The PC272E is a half size ISA bus plug in board which provides 72 programmable digital I O lines The board can be installed in IBM or fully compatible PC AT computers The flexible addressing system provided on the board allows the base address to be set within the range 000 to FFOj The board interrupt level can be jumper selected to IRQ3 IRQ5 IRQ7 IRQ9 IRQ10 IRQ11 IRQ12 or IRQ15 and any one of six possible interrupt sources can be software selected The six interrupt sources available are the Port C bit 0 and bit 3 digital I O lines of the board s three 82C55 Programmable Peripheral Interface PPI digital I O devices PC272E interrupts can be used to perform periodic background tasts or ex
6. Amplicon PC215E 272 Amplicon PC272E 212 Amplicon PC212E 218 Amplicon PC218E or ERRHANDLE Prior Calls registerBoard See Also 6 6 1 3 Un register a Board with the DLL freeBoard Frees a previously registered board from the library s register This board can be re registered by another program i freeBoard h where h Integer Board handle as issued by the registerBoard function Returns Integer OK or ERRHANDLE Prior Calls registerBoard See Also q Amplicon BD Page 45 PC272E OOO EEE 6 6 2 Interrupt Control Functions 6 6 2 1 6 6 2 2 Enable a Board s Interrupt Source s setintMask Enables or disables one or more of a board s interrupt sources by writing a mask byte to the board s Interrupt Mask register For the PC215E PC212E PC218E and PC272E boards any number of the interrupt sources can be enabled a single interrupt is generated but the interrupt service routine interrogates each source in turn and if asserted services that interrupt For the PC272E this function is not supported and returns an error if called setIntMask h mask where h Integer Board handle as issued by the registerBoard function Integer Mask byte The bit designations for the board s Interrupt Mask Register will vary from board to board Refer to section 2 6 4 for a description of the interrupt sources and their functionality Returns Integer OK or ERRHANDLE ERRSUPPORT Prior Calls r
7. OK or ERRHANDLE ERRCHAN ERRDATA Prior Calls registerBoard DlOsetMode DlOsetData DlOgetData See Also Integer Board handle as issued by function registerBoard Integer Address offset of the DIO chip Use one of the following pre defined constants PPIZ 16 Integer Bit width to be used in subsequent calls to functions DlOsetData DIOgetData and TCsetDCO Valid widths are 1 4 8 12 16 or 24 numBits channels per chip q Amplicon Page 57 PC272E 6 6 4 4 Send Digital Output Data DiOsetData Writes a data value to a DIO channel It is assumed that the channel has already been set as an output by a call to function DIOsetMode i DIOsetData h chip chan where Returns Integer or Prior Calls See Also h OK ERRHANDLE ERRCHAN registerBoard DlOsetMode DlOsetChanWidth DlOgetData data Integer Board handle as issued by function registerBoard Integer Address offset of the DIO chip Use one of the following pre defined constants PPIZ 16 Integer DIO channel Note the channel numbering depends on the channel width as set by DlOsetChanWidth default is 3 8 bit channels Long Digital data word q Amplicon Page 58 PC272E 6 6 4 5 Read Digital Input Data DlIOgetData Reads a data value from a DIO channel It is assumed that the channel has already been set as an input by a call to function DiIOsetMode i DIOgetData h chip chan data
8. setIntMask TCsetEventRecorder DlOsetBiDirectionalBus TCsetDCO TCsetVCO Disable a Board s Interrupts disablelnterrupts Disables the interrupt level registered for a board by masking the corresponding bit in the IMR of the PIC on the host computer i disableInterrupts h where h Integer Board handle as issued by the registerBoard function Returns Integer OK or ERRHANDLE Prior Calls registerBoard enablelnterrupts setIntMask See Also q Amplicon Page 47 PC272E a 6 6 3 Data Buffer Functions 6 6 3 1 Allocate an Integer Data Buffer allocatelntegerBuf Creates a data buffer by allocating a block of memory of integer data The function returns a Buffer Handle positive integer Up to four integer data buffers can be created The Buffer Handle must be used in any subsequent function calls to identify that particular data buffer Two integer data buffers are required by the function DlOsetBiDirectionalBus b allocateIntegerBuf nItems where nitems Long Number of data items to be allocated If there is insufficient memory available for the size of the buffer an error is returned Returns Integer Buffer Handle positive integer This handle must be used in all subsequent function calls to identify the buffer ERRSUPPORT ERRMEMORY Prior Calls registerBoard See Also freelntegerBuf 6 6 3 2 Allocate a Long Integer Data Buffer allocateLongBuf Creates a data buffer by allocating a bloc
9. 238 23B Bus Mouse 3A0 3AF SDLC 23C 23F Alt Bus Mouse 3B0 3BB MDA 270 27F Parallel Printer 3BC 3BF Parallel Printer 2B0 2DF EGA 3C0 3CF EGA 2E0 2E7 GPIB AT 3D0 3DF CGA 2E8 2EF Serial Port COM4 3E8 3EF Serial Port COM3 2F8 2FF Serial Port COM2 3F0 3F7 Floppy Disc 300 31F Prototype Card 3F8 3FF Serial Port COM1 Selection of Interrupt Request IRQ Level Selection of the required Interrupt Request Level is by means of a jumper in a single position on header J1 Eight levels are available but only one of these may be selected and a level should be chosen that does not conflict with any other assignments within the host computer The factory default setting is IRQ level 5 The following table shows the available levels on the PC272E and normal usage of all hardware interrupts The one of eight position jumper is illustrated in Figure 4 q Amplicon Page 10 PC272E PC272E IRQ Interrupt Usage Jumper 1 Name Number Description 0 8 Timer Not available on the 1 9 Keyboard Bus Connectors IRQ2 A Int 8 15 3 IRQ3 B COM or SDLC IRQ4 C COM or SDLC 5 IRQ5 D LPT IRQ6 E Floppy Disk 7 IRQ7 F LPT IRQ8 70 Real Time Clock 9 IRQ9 71 Re directed to IRQ2 10 IRQ10 72 Unassigned 11 IRQ11 73 Unassigned 12 IRQ12 74 Unassigned IRQ13 75 Co processor IRQ14 76 Hard Disk 15 IRQ15 77 Unassigned J1 IRQ Se EE E E E B Se E E E E B 3 5 7 9 10 11 12 15 Figure 4 Jumper for IRQ Level Selection
10. Also freeLongBuf q Amplicon BD Page 52 PC272E 6 6 3 11 Copy a Block of Integer Data from an Integer Buffer copyFromintegerBuf Copies a segment of an integer data buffer to a block of memory i copyFromIntegerBuf b start nIems p where b Integer buffer handle as issued by the allocateBuf function start Long index of the starting item in the buffer nitems Long number of items to copy p Pointer pointer to the beginning of the integer memory block to which data is to be copied Returns Integer OK or ERRBUFFER ERRRANGE ERRDATA Prior Calls allocatelntegerBuf See Also freelntegerBuf 6 6 3 12 Copy a Block of Long Integer Data from a Long Buffer copyFromLongBuf Copies a segment of a Long Integer data buffer to a block of memory i copyFromLongBuf b start nIems p where b Integer buffer handle as issued by the allocatBuf function start Long index of the starting item in the buffer nitems Long number of items to copy p Pointer pointer to the beginning of the long integer memory block to which data is to be copied Returns Integer OK or ERRBUFFER ERRRANGE ERRDATA Prior Calls allocateLongBuf See Also freeLongBuf q Amplicon Page 53 PC272E 6 6 3 13 Query Number of Interrupt Operations to date on a Buffer getIntltem This function can be called for any data buffer currently being used for Event Recorder or Bi Directional Bus data In these two cases data is
11. Group These registers provide programmable interrupt source selection and interrupt source status information The consistency of register definitions across the range does mean that some boards like the PC272E have unused address spaces It is advised that such addresses are treated as reserved and not used for other purposes A summary of PC272E register definitions is given in Figure 9 PC272E Register Assignments q Amplicon Page 19 PC272E Description PPI X Port A PPI X Port B PPI X Port C PPI X Control PPI Y Port A PPI Y Port B PPI Y Port C PPI Y Control PPI Z Port A PPI Z Port B PPI Z Port C PPI Z Control Write Read Write Read Write Read Write Read Write Read Write Read Write Read Write Read Write Read Write Read Write Read Write Read wterReed Bis Group Cluster X Cluster Y Cluster Z Counter Connections Registers BA 1E_ Interrupt Enable Write Interrupts Interrupt Status Read BA 1F 5 3 The Register Details Figure 9 PC272E Register Assignments The following paragraphs describe the operations of each of the accessible registers Additional information on register usage can be found in section 4 USING THE PC272E eee Amplicon Page 20 PC272E 5 3 1 Programmable Peripheral Interface PPI X Data Register Port A This eight bit register writes to and reads from port A of the 82C55 Programmable Peripheral Interface PPI X All input output lines P
12. Windows and uses the defined Windows calling conventions The DLL supports all of the boards in the PC214E PC215E PC212E PC218E and PC272E series of digital I O boards C Library for programming DOS applications A DOS library providing identical functionality to the Windows DLL is provided which supports the Microsoft C C and Borland C compilers Again this library supports all of the boards in the PC214E PC215E PC212E PC218E and PC272E series Interface software for other languages Generic LABTECH NOTEBOOK drivers for the Digital 1 O and Timer Counter devices provided on the PC214E PC215E PC212E PC218E and PC272E boards are also provided 6 1 Copyright Software supplied on the PC272E diskette is Amplicon copyright Permission is granted for the purchaser of the PC272E to incorporate any part of the Amplicon copyright software into related application programs and to use resell or otherwise distribute such application programs for operation with PC272E hardware purchased from Amplicon Liveline Limited 6 2 Files installed from the Distribution Diskette The files installed from the 3 5 inch high density diskette are listed in the ReadMe file README TXT Please refer to this file for the latest information Any last minute information will be described in the README TXT file which should be examined before proceeding q Amplicon Page 40 PC272E a 6 3 Windows DLL and Examples The PC272E DLL is a 16 bit Windows
13. and Z Groups 19 5 2 2 Interrupts Group 19 5 3 The Register Details 20 5 3 1 Programmable Peripheral Interface PPI X Data Register Port A 21 5 3 2 Programmable Peripheral Interface PPI X Data Register Port B 22 5 3 3 Programmable Peripheral Interface PPI X Data Register Port C 23 5 3 4 Programmable Peripheral Interface PPI X Command Register 24 5 3 5 Programmable Peripheral Interface PPI Y Data Register Port A 26 q Amplicon BD PC272E 5 3 6 Programmable Peripheral Interface PPI Y Data Register Port B 5 3 7 Programmable Peripheral Interface PPI Y Data Register Port C 5 3 8 Programmable Peripheral Interface PPI Y Command Register 5 3 9 Programmable Peripheral Interface PPI Z Data Register Port A 5 3 10 Programmable Peripheral Interface PPI Z Data Register Port B 5 3 11 Programmable Peripheral Interface PPI Z Data Register Port C 5 3 12 Programmable Peripheral Interface PPI Z Command Register 5 3 13 Interrupt Source Selection Register 5 3 14 Interrupt Status Register 6 PROGRAMMING THE PC272E ccseeceesesneeeesseneeeeeseneeeeesseeeseaseneeeenseneeneensennees 6 1 Copyright 6 2 Files installed from the Distribution Diskette 6 3 Windows DLL and Examples 6 4 DOS C Library and Examples 6 4 1 Borland C User Information 6 4 2 Microsoft C C User Information 6 5 Using the Dynamic Link Library 6 5 1 Visual Basic 6 6 Windows and DOS Library Functions 6 6 1 Initialisation Functions 6 6 2 Interrupt Control Functions 6 6 3 Dat
14. at up to 100 mA 3 The base address of each board is set by switch SW1 to a different value preferably at contiguous even addresses and with no conflict with other installed devices Suitable base addresses for four boards could be 30016 32016 34016 and 36016 4 The interrupt level IRQ of each board is set by jumper J1 to a different value and with no conflict with other installed devices 4 2 User Applications 4 2 1 The PC272E board features three uncommitted 82C55 CMOS Programmable Peripheral Interface devices PPIX PPIY and PPIZ all of which can each be configured in a variety of operating modes The operational mode for each device is established by writing to its control register The Windows DLL and the DOS C library contain functions that implement twelve typical applications for these devices These functions can be used with any board in the PC214E PC215E PC212E PC218E and PC272E range The following paragraphs describe the applications that are relevant to the PC272E board The other functions and applications provided in the software are not described in this manual because they require the 82C54 Timer Counter features of the other boards in the range Switch Scan Matrix The high number of digital I O channels available on the PC272E board lends itself to a switch matrix scanner implementation The status of a matrix of switches can be obtained by sending test patterns into the matrix and then reading status pa
15. conversion system can operate with a specified accuracy It is determined by summing the various times required for each part of the system and then taking the reciprocal of this time Transducer Device that converts length position temperature pressure level or other physical variable to an equivalent voltage or current accurately representing the original measurement Trigger Pulse or signal used to start or stop a particular action Frequently used to control data acquisition processes Unipolar A signal being measured is said to be unipolar when the voltage on its high terminal is always the same polarity normally positive in relation to its low terminal Word The standard number of bits that can be manipulated at once Microprocessors typically have word lengths of 8 16 or 32 bits Wrap Wraparound Connection of a FIFO buffer such that the contents once loaded are continuously circulated q Amplicon Page d PC272E EEE APPENDIX B PC272E CIRCUIT LAYOUT DRAWING A p c b layout drawing of the PC272E Board is given below A full set of circuit drawings is available upon request B 1 PC272E Assembly Detail A short description of each user setting and indicator is given in the following table Component Function Reference SW1 Switch for Base Address Selection Ji Jumper for IRQ Level Selection PC272E AMPLICON 200 SERIES al perm RN J RO a EEE gE aAa ab DAS 4 ees BE ana
16. is used to write or read 8 bit data to port A of the 82C55 Programmable Peripheral Interface device PPI Y The PPI can be configured to operate in several modes Further details may be found by reference to the device manufacturer s 82C55 data sheets in the appendices The eight data bits of port A are data input data output or bi directional data I O according to the PPI mode Mode 0 Input or Output Mode 1 Input or Output Mode 2 Bi Directional Input output The modes and programming of PPI operations are outlined in chapters 4 and 6 with the Digital I O connections shown in chapter 3 q Amplicon Page 26 PC272E BIT ASSIGNMENTS The bit layout of the PPI Y port A data register is shown below PPI Y Port A Digital SK1 I O Data Bits Pin Connections PAO ___ sSK1 29 PAI ____ s SK1 48 PAZ ___ sOSK1 9 PAZ _______ SK1 67 PAA __s SK1 28 PA5 __ SK1 47 PAG SK18 PA7 SK1 66 5 3 6 Programmable Peripheral Interface PPI Y Data Register Port B This eight bit register writes to and reads from port B of the 82C55 Programmable Peripheral Interface PPI Y All input output lines PBO to PB7 of this device are available to the user on connector SK1 as digital I O Register Write and or Register Register Offset Read Width Title 82C55 Programmable Peripheral Wale ana MaR Interface Y Port B Data Register PEEYB FUNCTION The PPI Y Port B Data Register is used to write or rea
17. layouts of the PPI X command word register is shown below Further information on programming the 82C55 PPI is given in chapters 4 and 6 A full description of the operating modes and all other features of the 82C55 are available in the 82C55 device manufacturer s data sheet in the appendices Command Word for Mode Definition Format GROUP B Port C Lower 0 Output COMMAND SELECT 1 Input Set Flag 1 Active Port B 0 Output 1 Input Mode Selection 0 Mode 0 1 Mode 1 GROUP A Port C Upper 0 Output 1 Input Port A 0 Output 1 Input Mode Selection 00 Mode 0 01 Mode 1 1X Mode 2 q Amplicon Page 25 PC272E Command Word for Bit Set Reset Format 0 Reset 1 Set Bit Set Reset Don t Care COMMAND SELECT Bit Set Reset Flag 0 Active Port C Bit Select o 1 2 3 4 5 6 7 fojoj o 4 Bo meN foto ats Br Ofofofoft 1 tft B2 5 3 5 Programmable Peripheral Interface PPI Y Data Register Port A This eight bit register writes to and reads from port A of the 82C55 Programmable Peripheral Interface PPI Y All input output lines PAO to PA7 of this device are available to the user on connector SK1 as digital I O Register Write and or Register Register Offset Read Width Title 82C55 Programmable Peripheral vrte anaes Interface Y Port A Data Register i FUNCTION The PPI Y Port A Data Register
18. lines No handshaking is needed 16 different configurations in mode 0 Two 8 bit ports and two 4 bit ports Inputs are not latched Outputs are latched Mode 1 provides strobed input and output operations with data transferred through port A or B and handshaking through port C e Two I O groups Group A also known as Group 0 or Group l Group B also known as Group 1 or Group Il e Both groups contain an 8 bit port and a 4 bit control data port e Both 8 bit data ports can be latched input or latched output q Amplicon Page 24 PC272E Mode 2 provides strobed bi directional operation using port A as the bi directional data bus Port C3 to C7 bits are used for interrupts and handshaking bus flow control similar to mode 1 NOTE Port B and port CO to C2 bits may be defined as mode 0 or 1 input or output in conjunction with port A in mode 2 e An 8 bit latched bi directional bus port and 5 bit control port e Both input and outputs are latched e An additional 8 bit input or output port with a 3 bit control port Single Bit Set Reset Feature With bit 7 Command Select set to 0 any of the eight bits of port C can be set or reset using a single output instruction This feature reduces the software overhead in control based applications When port C is being used as status control for port A or port B these bits can be set or reset using the Bit Set Reset operation just as if they were data output ports BIT ASSIGNMENTS Bit
19. programmer s interface to the PC272E board Provided that the compiler interpreter supports Windows i e uses the Windows calling conventions all the functions can be called by software written in any language For C C language applications the software includes a ready prepared header file DIO_TC H which covers all function definitions and declared constants Similarly for Visual Basic there is a module DIO_TC BAS for inclusion in a project make file for DLL declarations and constant definitions For other languages the user will need to compile a suitable header in which the DLL functions and constants are declared and these files can be used as an example The software includes Visual Basic examples as both runtime and source code The runtime examples can be used to exercise and become familiar with the hardware The source code serves two purposes Firstly it can be used as a source of reference to see how the DLL functions are used Also it provides a starting point for anyone who wishes to write software with similar functionality 6 4 DOS C Library and Examples The C library is a DOS programmer s interface to the PC272E board The software includes C examples as both runtime and source code The source code can be compiled using the Microsoft C C or Borland C compilers conditional compilation based on a define at the top of the program file allows the source code to be compatible with both languages To define the C
20. screened cables for external connections It is up to the final system integrator to ensure that compliance with the Directive is maintained Amplicon Liveline offers a series of good quality screened cables for this purpose Please contact our sales staff q Amplicon Page 13 PC272E 3 4 Digital Input Output Conditions Specifications of the digital input output lines on PPI X PPI Y and PPI Z Ports A B and C are Inputs Low input voltage 0 5 V to 0 8 V High input voltage 2 2 V to 5 3 V When an input line is left open circuit the state is indeterminate Ensure that signals to any inputs are within the above limits and that any unused input lines are grounded or masked out in software The output currents shown below must not be exceeded Outputs Low output voltage 0 4v max at 2 5mA High output voltage 3 5v min at 400uA 3 5 PC Back plane Bus Connections Connections between the host PC AT and the PC272E are through a 62 way and a 36 way edge connector on the PC AT ISA bus The user will not normally require access to this I O connector information but for troubleshooting and diagnostic purposes Figure 6 lists these standard back plane connections The PC272E does not use all of the signals Note Pin B4 is IRQ9 which is re directed as IRQ2 Via the computer s second Programmable Interrupt Controller q Amplicon BD Page 14 PC272E 62 Pin Connector Ground lt B1 At lt 1 O CHCK bracke
21. 5 lt D10 C10 gt MEMW DRQ5 gt D11 C11 lt gt SD08 DACK6 lt D12 C12 lt gt SD09 DRQ6 gt D13 C13 lt gt SD10 DACK7 lt D14 C14 lt gt SD11 DRQ7 gt D15 C15 lt gt D12 5 VoltS lt D16 C16 lt gt D13 MASTER gt D17 C17 lt gt SD14 Ground lt D18 C18 lt gt SD15 Figure 6 PC Backplane ISA Bus Connections q Amplicon BD Page 15 PC272E OOO SSS 4 USING THE PC272E This chapter describes the various operations associated with implementing the user s application Programming and usage operations are discussed and include references to the various register operations and software library functions required for each operation Details of the registers and software are given in chapters 5 and 6 respectively Reference should also be made to chapter 2 Getting Started and chapter 3 Making the Connections before implementing any of the described operations 4 1 Multiple PC272E Boards in a Single Application More than one PC272E board may be installed in a single host PC Furthermore up to eight of any combination of boards in the PC214E PC215E PC212E PC218E and PC272E range may be installed in a single host PC To install more than one board in the host PC the following points should be checked 1 Sufficient space is available to mount the required number of boards 2 Sufficient power is available for all the plug in boards and adapters Each PC272E requires 5V
22. 72E 6 6 4 2 Configure a Digital I O Port for Input or Output DIOsetMode Sets up a digital I O port for basic input or output DIOsetMode h chip port isInput where h Integer Board handle as issued by function registerBoard Integer Address offset of the DIO chip Use one of the following pre defined constants PPIZ 16 Integer DIO port within the chip Port C is split into two 4 bit nibbles which can be programmed independently Use one of the following pre defined constants PORTA 0 PORTB 1 isInput Integer Non zero if port is to be set as input zero if port is to be set as output Returns Integer OK or ERRHANDLE ERRCHAN Prior Calls registerBoard See Also DlOsetChanWidth DlOsetData DlOgetData q Amplicon BD Page 56 PC272E 6 6 4 3 Re define Channel Width within a Digital I O Chip DlOsetChanWidth Redefines the number of bits per DIO channel to be used in subsequent calls to the DlOsetData and DlOgetData functions The default channel width is 8 bits and this can be changed to 1 4 8 12 16 or 24 After calling this function the chan argument in the DlOsetData and DlOgetData functions refers to the group of bits of width numBits starting at Port A bit 0 Note that the three ports A B C upper and C lower must be setup correctly for input or output accordingly by calling the DlIOsetMode function for each DIOsetChanWidth h chip numBits where h numBits Returns Integer
23. 8 bit port In this mode Port C handles the necessary control signals Port A becomes the 8 bit bi directional port and Port B is free to be programmed with Group B for basic input or basic output operation Please refer to the manufacturer s 82C55 data sheet included in the appendices of this manual for a full description of the bi directional bus operation mode of the 82C55 device Section 6 6 6 describes function D OsetBiDirectionalBus which programs a given PPI chip for this mode of operation The PPI s Port C bit 3 interrupt source is used to generate PC272E interrupts which will occur when the device is either a free to write another data byte to Port A or b required to read a data byte from Port A Two data buffers are required by the function one which contains output data to be sent to Port A byte by byte whenever a write interrupt occurs and another empty buffer into which in coming data will be stored byte by byte whenever a read interrupt occurs Please note that functions enable nterrupts and disableinterrupts must be called to enable and disable these interrupts When configuring the PC272E board for this operation the Port C bit 3 interrupt source of the given PPI must be selected on jumper J5 see section 2 6 4 for more details Care must also be taken when connecting the Port C control signals to other devices on the bi directional bus Please refer to the 82C55 data sheet in the appendix for details but a
24. AO to PA7 of this device are available to the user on connector SK1 as digital I O Register Write and or Register Register Offset Read Width Title 82C55 Programmable Peripheral Menke ana Paad Interface X Port A Data Register PPK A FUNCTION The PPI X Port A Data Register is used to write or read 8 bit data to port A of the 82C55 Programmable Peripheral Interface device PPI X The PPI can be configured to operate in several modes Further details may be found by reference to the device manufacturers 82C55 data sheets in the appendices The eight data bits of port A are data input data output or bi directional data I O according to the PPI mode Mode 0 Input or Output Mode 1 Input or Output Mode 2 Bi Directional Input output The modes and programming of PPI operations are outlined in chapters 4 and 6 with the Digital I O connections shown in chapter 3 BIT ASSIGNMENTS The bit layout of the PPI port A data register is shown below Ceca PPI X Port A Digital SK1 I O Data Bits Pin Connections PAO _ ___ sCw SK 3 PA1 __ sCOSSKX11 61 PA ___ sCs amp S KX11 2 PA ___ C C SKX11 411 PA _ _s s sSKX11 s 2 PA5 _ SK160 PAG SK1 21 PA7 SKi1 40 q Amplicon Bw Page 21 PC272E 5 3 2 Programmable Peripheral Interface PPI X Data Register Port B This eight bit register writes to and reads from port B of the 82C55 Programmable Peripheral Interface PPI X All i
25. Amplicon on the PC272E distribution diskette are specifically designed to interface the PC272E hardware to the LABTECH NOTEBOOK Data Acquisition and Analysis software package The appropriate drivers to support the functionality of the board are provided with all Amplicon 200 Series products A list of I O types supported by the LABTECH NOTEBOOK software and their compatibility with some of the Amplicon 200 series I O boards is given in the following table Functions provided by the Amplicon I O boards which are not listed in the table are not supported by the LABTECH NOTEBOOK software LABTECH Software I O Types Module AD AD DA DIDO TEMP STRN FREQ PLSE Normal Hi Spd AMPLICON Board Types PC224 34 No No Yes No No PC226 Yes No Yes Yes PC230 Yes Yes Yes Yes PC237 No No Yes No PC263 No No DO No PC214E No No Yes No PC215E No No Yes No PC212E No No Yes No PC218E No No No No PC272E No No Yes No Figure 10 LABTECH NOTEBOOK Driver Functions where AD Analog Input DA Analog Output DI Digital Input DO Digital Output TEMP Temperature Measurement STRN Strain Measurement CNT Counter Input FREQ Frequency Measurement PLSE Frequency Output q Amplicon Bw Page 64 PC272E OOO EEE 6 9 Guide to User Programming When developing an application specific program it is advised that the supplied dynamic link library functions are used for Windows applications and extracts are taken from the DOS examples However if ther
26. C3 to C7 bits are used for interrupts and handshaking bus flow control similar to mode 1 NOTE Port B and port CO to C2 bits may be defined as mode 0 or 1 input or output in conjunction with port A in mode 2 e An 8 bit latched bi directional bus port and 5 bit control port e Both input and outputs are latched e An additional 8 bit input or output port with a 3 bit control port Single Bit Set Reset Feature With bit 7 Command Select set to 0 any of the eight bits of port C can be set or reset using a single output instruction This feature reduces the software overhead in control based applications When port C is being used as status control for port A or port B these bits can be set or reset using the Bit Set Reset operation just as if they were data output ports q Amplicon BD Page 35 PC272E BIT ASSIGNMENTS Bit layouts of the PPI Z command word register is shown below Further information on programming the 82C55 PPI is given in chapters 4 and 6 A full description of the operating modes and all other features of the 82C55 are available in the 82C55 device manufacturer s data sheet in the appendices Command Word for Mode Definition Format 0 Output 1 Input Port B 0 Output 1 Input Mode Selection 0 Mode 0 1 Mode 1 GROUP A Port C Upper 0 Output 1 Input Port A 0 Output 1 Input Mode Selection 00 Mode 0 01 Mode 1 1X Mode 2 COMMAND SELECT Set Flag 1 Active
27. E General Description 1 5 1 The Software 1 6 What the PC272E Package Contains 1 7 The Amplicon Warranty Covering the PC272E 1 8 Contacting Amplicon Liveline Limited for Support or Service 1 8 1 Technical Support 1 8 2 Repairs 2 GETTING START ED onoarea ienaa eeaeee atadan aa aaa aaaea Aaaa aAa AANA AEREA REENER ENEE RENES 2 1 General Information 8 2 2 Installing the Board 8 2 3 System Requirements 8 2 4 Backing up the Software Diskettes 8 9 9 9 NNNOORARAANN 2 2 5 Software Installation 2 6 Configuration Switch and Jumper Settings 2 6 1 Base Address Selection 2 6 2 PC I O Map 10 2 6 3 Selection of Interrupt Request IRQ Level 10 2 6 4 Interrupt Source Selection 11 2 7 Test Points 11 3 MAKING THE CONNECTIONS iivcccicecccesccecivecscecicctececevececesasadtessecsesaredsantensaeeesasedsanseenddensuarveancueceze 12 3 1 The Input Output Connector 12 3 2 Cable Connections 13 3 2 1 Features Summary of the Expansion Panels 13 3 3 Use of Shielded Cables 13 3 4 Digital Input Output Conditions 14 3 5 PC Back plane Bus Connections 14 A USING THE PG272E aoaia aeaaeae aiaa aaa aiaa aa dia aiaia iaiia diiidan 16 4 1 Multiple PC272E Boards in a Single Application 16 4 2 User Applications 16 4 2 1 Switch Scan Matrix 16 4 2 2 8 Bit Bi Directional Bus 18 5 STRUCTURE AND ASSIGNMENTS OF THE REGISTERS ss seeececeeeeeeesssseeeeeeeeesneeseseeees 19 5 1 Register Assignments 19 5 2 Register Groups 19 5 2 1 Cluster X Y
28. O SKIS PC2 SK 1B PC3 ___ 9K124 PC4 SK1 4 PC5 SK1 62 PC6 SK1 23 PC7 SK1 42 q Amplicon BD Page 23 PC272E 5 3 4 Programmable Peripheral Interface PPI X Command Register This is the command register for the PPI and can be used to set the operational mode of the three digital I O ports or to manipulate the bits of port C Register Write and or Register Register Offset Read Width Title 82C55 Programmable Peripheral E 0316 Write 8 bits Interface PPI X Command PPI X CMD Register FUNCTION Provides a command word to define the operation of the PPI X ports A B and C Any port programmed as output is initialised to all zeroes when a command word is written A separate feature allows any bit of port C to be set or reset using a single instruction The programming procedure for the 82C55 is flexible but the command word must be written before data bytes are loaded As the command register and each port have separate addresses offsets 0 to 3 and each command word specifies the mode of each port no other special instruction sequence is required The Three Modes The register function depends on the setting of bit 7 Command Select and the three mode selections assume that bit 7 is set to 1 which allows mode configuration Mode 0 provides basic input and output operations through each of the ports A B and C Output data bits are latched and input data follows the signals applied to the I O
29. PC272E PC272E PROGRAMMABLE DIGITAL INPUT OUTPUT BOARD This Instruction Manual is supplied with the PC272E to provide the user with sufficient information to utilise the purchased product in a proper and efficient manner The information contained has been reviewed and is believed to be accurate and reliable however Amplicon Liveline Limited accepts no responsibility for any problems caused by errors or omissions Specifications and instructions are subject to change without notice PC272E Instruction Manual Part N 85 956 234 Issue A5 Amplicon Liveline Limited Prepared by Jonathan East Approved for issue by A S Gorbold Operations Director q Amplicon BD PC272E LL DECLARATION OF CONFORMITY AMPLICON LIVELINE LIMITED CENTENARY INDUSTRIAL ESTATE HOLLINGDEAN ROAD BRIGHTON BN24AW UK We declare that the product s described in this Instruction Manual perform in conformity with the following standards or standardisation documents EMC Directive 89 336 EEC LVD Directive 73 23 EEC CE Directive 93 68 EEC a Jim Hicks I Eng FIEIE Managing Director Amplicon Liveline Limited iT q Amplicon BD PC272E EEE PROGRAMMABLE DIGITAL I O AND COUNTER TIMER BOARD TABLE OF CONTENTS TAAINTRODUCTION peaa 1 1 1 The Amplicon 200 Series 1 2 The 200 Series Digital I O Counter Timer Family 1 2 1 Typical Applications 1 2 2 Product List 1 3 Product Configurator 1 4 Features of the PC272E 1 5 PC272
30. PI mode Mode Port C Upper Port C Lower Mode 0 Input or Output Input or Output Mode 1 Control Data Control Data Mode 2 5 bit Control PC3 to PC7 3 bit Control Data PCO to PC2 With bit 7 Command Select set to 0 any of the eight bits of port C can be set or reset using a single output instruction When port C is being used as status control for port A or port B these bits can be set or reset using the Bit Set Reset operation just as if they were data output ports The modes and programming of PPI operations are outlined in chapters 4 and 6 with the Digital I O connections shown in chapter 3 BIT ASSIGNMENTS The bit layout of the PPI Z port C data register is shown below ca ae eas PPI Z Port C Lower PPI Z Port C Upper SK1 Pin Byte Data Bits Byte Data Bits Connections PCO _______tm___s K157 PCI SK 18 PC2 ___tmtm ___s K1 76 PC3 _______________ k1 37 PC4 SK1 17 PCS __ CC SK1 75 PC6 ___ SK1 36 PC7 _____s SK 1 55 5 3 12 Programmable Peripheral Interface PPI Z Command Register This is the command register for the PPI and can be used to set the operational mode of the three digital I O ports or to manipulate the bits of port C Register Write and or Register Register Offset Read Width Title f 82C55 Programmable Peripheral K Interface PPI Z Command Register P CMP q Amplicon Bw Page 34 PC272E a FUNCTION Provides a command word to define the operation of the PPI Z ports A B
31. Y Port A7 Ol PPI Y Port A6 c C8 O47 PPI Y Port A5 28 O67 eee PPI Y Port A3 L O PPI Y Port A2 O48 PPI Y Port A1 U gt ecs RELUA PPI Y Port C7 01 10 049 Eee PPI Y Port C5 ort a E PPI Y Port C4 on T PPI Y Port C3 E i 50 PPI Y Port C2 51 o7 HEEL PPI Y Port CO R Ol PPI Y Port B7 i2 O51 PPI Y Port B6 C32 O71 EEE BONE PPI Y Port B4 Ol PPI Y Port B3 Y O52 PPI Y Port B2 C33 O72 Eno PPI Y Port BO O GND 14 053 PPI Z Port A7 PPIZ Port A6 C C34 073 PPI Z Port A5 PPI Z Port A4 L 15 54 PPI Z Port A3 PPI Z Port A2 35 O74 PPI Z Port Al U PPI Z Port AO G16 O55 eee PPI Z Port C7 S pae Port C36 O75 PPI Z Port C5 PPI Z Port C4 T 17 56 GND PPI Z Port C3 E C37 O76 PPI Z Port C2 PPI Z Port Cl R O18 57 PPI Z Port CO ppl Z Port B7 38 077 PPI Z Port B6 PPI Z Port B5 O19 O58 nor PPI Z Port B4 Z sh ort 39 O78 pape PPI Z Port B2 a ONE 20 59 PPI Z Port BO Figure 5 Output Connector Pin Designations All connections of external devices to the PC272E digital I O and counter timer channels are made via a 78 way D connector SK1 The pin designations for SK1 are shown in Figure 5 eee Amplicon BD Page 12 PC272E a 3 2 Cable Connections 3 2 1 A screened 78 way cable with metal shielded D connectors Part N 90 966 349 is available to provide cable connections to the PC272E Alternatively a mating 78 way D pin connector kit is available Part N 91 945 953 sh
32. a Buffer Functions 6 6 4 Digital Input Output Functions 6 6 5 Switch Scanner Matrix Functions 6 6 6 Bi Directional Data Bus Functions 6 7 PC272E Library Error Codes 6 8 PC272E Interface Guide For LABTECH NOTEBOOK 6 9 Guide to User Programming 6 10 Signal Centre q Amplicon BD PC272E 1 INTRODUCTION 1 1 The Amplicon 200 Series The Amplicon 200 Series of Personal Computer based data acquisition products provides very high performance affordable hardware with comprehensive software support The 200 Series is designed for users requiring fast or complex data input output to the host PC and comprises a range of boards and software to handle most analog and digital signal types When a large scale system is required multiple boards can be added from the 200 Series without conflict The capacity of the PC mounted hardware can be extended by external expansion panels to provide a comprehensive system with low cost per channel and maintained high performance 1 2 The 200 Series Digital I O Counter Timer Family 1 2 1 The family of 200 Series digital input output products may be configured in a variety of ways to provide flexible expansible systems Five digital input output boards with timer counter facilities are offered These five boards are complemented by four external panels for signal conditioning and user connection through individual terminals Support and demonstration software for all variants is offered A full item
33. a sheets in the appendices The eight data bits of port C are split into two groups the upper port C bits 4 to 7 and the lower port C bits 0 to 3 These bits can be data input data output or control nandshake lines according to the PPI mode Mode Port C Upper Mode 0 Input or Output Mode 1 Control Data Mode 2 5 bit Control PC3 to PC7 Port C Lower Input or Output Control Data 3 bit Control Data PCO to PC2 With bit 7 Command Select set to 0 any of the eight bits of port C can be set or reset using a single output instruction When port C is being used as status control for port A or port B these bits can be set or reset using the Bit Set Reset operation just as if they were data output ports eee Amplicon BD Page 28 PC272E The modes and programming of PPI operations are outlined in chapters 4 and 6 with the Digital I O connections shown in chapter 3 BIT ASSIGNMENTS The bit layout of the PPI Y port C data register is shown below MEETS Ee PPI Y Port C Lower PPI Y Port C Upper SK1 Pin Byte Data Bits Byte Data Bits Connections PCO __________ ______tmm__ ____ k1 70 PCI SF KI 34 PC2 ____________ __s gt K1 50 PC3 SKI 1 PC4 SK1 30 PCS ____CCSK1 49 PC6 ____ s SK1 10 PC7 ____ SK1 68 5 3 8 Programmable Peripheral Interface PPI Y Command Register This is the command register for the PPI and can be used to set the operational mode of the three digital I O ports or to manipulate the bi
34. agnitude is represented by a series of digits the most significant bit binary digit is the digit that carries the greatest value or weight Multiplexer A multiple way analog switch q v where a single path through the switch is selected by the value of a digital control word Multiplying DAC A Multiplying DAC or Digital Analog Multiplier operates with varying or AC reference signals The output of a Multiplying DAC is proportional to the product of the analog reference signal and the fractional equivalent of the digital input number Noise An undesirable electrical interference to a signal Normal Mode Signal Aka Series mode signal In a differential analog measuring system the normal mode signal is the required signal and is the difference between the voltages on the two input signal lines with respect to ground level of the measuring system Offset a A fixed known voltage added to a signal b The location of a register above the base address Pascal A high level programming language originally developed as a tool for teaching the concepts of structured programming It has evolved into a powerful general purpose language popular for writing scientific and business programs Borland Turbo Pascal is a dialect of Pascal Passive Filter A filter circuit using only resistors capacitors and inductors PC Personal Computer Also printed circuit see PCB PCB Printed Circuit Board Port An interface on a computer capable o
35. and C Any port programmed as output is initialised to all zeroes when a command word is written A separate feature allows any bit of port C to be set or reset using a single instruction The programming procedure for the 82C55 is flexible but the command word must be written before data bytes are loaded As the command register and each port have separate addresses offsets 0 to 3 and each command word specifies the mode of each port no other special instruction sequence is required The Three Modes The register function depends on the setting of bit 7 Command Select and the three mode selections assume that bit 7 is set to 1 which allows mode configuration Mode 0 provides basic input and output operations through each of the ports A B and C Output data bits are latched and input data follows the signals applied to the I O lines No handshaking is needed 16 different configurations in mode 0 Two 8 bit ports and two 4 bit ports Inputs are not latched Outputs are latched Mode 1 provides strobed input and output operations with data transferred through port A or B and handshaking through port C Two I O groups Group A also known as Group 0 or Group Group B also known as Group 1 or Group Il Both groups contain an 8 bit port and a 4 bit control data port Both 8 bit data ports can be latched input or latched output Mode 2 provides strobed bi directional operation using port A as the bi directional data bus Port
36. ard hBoard if e lt gt OK then Call ReportError e End If End These lines of code un registers the board from the DLL as the program closes q Amplicon BD Page 43 PC272E These eight steps will create the shell of a VB application that can now be run The program at this stage does nothing more than register a PC272E board or any other board in the PC214E PC215E PC212E PC218E and PC272E series with the DLL on start up and free that board on exit Section 6 6 describes the library functions available Where arguments to functions are described as pointers the address of a user declared variable is required This is taken care of automatically by Visual Basic because all arguments to the DLL functions are passed by reference unless the ByVal prefix is used on an argument in the function declaration in the DLL s Visual Basic include file DIO_TC BAS For example function DiOgeData requires a pointer to a variable declared as long into which the digital input data result will be placed A typical VB code example for displaying the PPIX Port A input data value would be Dim dat As Long declare dat as long i DIOgetDat h Z1 0 dat Textl Text Str dat dat now contains new value 6 6 Windows and DOS Library Functions Details are given here of the functions provided in the supplied Windows Dynamic Link Library DLL and DOS C Library that are applicable to the PC272E Other functions are included in th
37. arranty Covering the PC272E This product is covered by the warranty as detailed in the Terms and Conditions stated in the current domestic or international Amplicon Liveline catalogue q Amplicon Page 6 PC272E OOO a 1 8 Contacting Amplicon Liveline Limited for Support or Service 1 8 1 1 8 2 The PC272E board is produced by Amplicon Liveline Limited and maintenance is available throughout the supported life of the product Technical Support Should this product appear defective please check the information in this manual and any Help or READ ME files appropriate to the program in use to ensure that the product is being correctly applied If a problem persists please request Technical Support on one of the following numbers Telephone UK 0844 324 0617 Calls cost 5p per min from a BT landline Calls from other services may vary Fax UK 01273 570 215 Email support amplicon co uk World Wide Web www amplicon co uk Repairs If the PC272E requires repair then please return the goods enclosing a repair order detailing the nature of the fault If the PC272E is still under warranty there will be no repair charge unless any damage as a consequence of improper use For traceability when processing returned goods a Returned Materials Authorisation RMA procedure is in operation Before returning the goods please request an individual RMA number by contacting Amplicon Customer Services by telephone or fax on the above num
38. bers Give the reason for the return and if the goods are still under warranty the original invoice number and date Repair turnaround time is normally five working days but the Service Engineers will always try to co operate if there is a particular problem of time pressure Please mark the RMA number on the outside of the packaging to ensure that the package is accepted by the Goods Inwards Department Address repairs to Customer Services Department AMPLICON LIVELINE LIMITED Centenary Industrial Estate Hollingdean Road BRIGHTON UK BN2 4AW q Amplicon Page 7 PC272E SSS SSS 2 1 2 2 2 GETTING STARTED General Information The PC272E software diskette contains six ready to run executable programs three for DOS and three for Windows These programs allow the user to perform I O operations on the PC272E immediately after installing the board and software onto a PC Installing the Board ENSURE THAT THE POWER TO THE COMPUTER IS SWITCHED OFF BEFORE INSTALLING OR REMOVING ANY EXPANSION BOARD OBSERVE HANDLING PRECAUTIONS NOTED IN SECTION 1 6 REPAIR OF DAMAGE CAUSED BY MIS HANDLING IS NOT COVERED UNDER THE AMPLICON WARRANTY DO NOT MAKE ANY MODIFICATIONS OTHER THAN SWITCH CHANGES TOA BOARD THAT IS ON EVALUATION Please refer to the manufacturer s hardware manual supplied with the PC for instructions on how to remove the cover and install devices into an ISA bus slot The PC272E may be installed in any available position
39. ch A set of switches contained in a dual in line package Drift Small variations in a measured parameter over a period of time Drivers Part of the software that is used to control a specific hardware device Expansion Slots The spaces provided in a computer for expansion boards that enhance the basic operations of the computer FIFO First In First Out A buffer memory that outputs data in the same order that they are input Form A Form B Form C Contacts Relay contact sets which are normally open normally closed and changeover respectively Four Quadrant Operation In a multiplying DAC four quadrant operation means that both the reference signal and the number represented by the digital input may both be either positive or negative polarity The output obeys the rules of multiplication for algebraic sign GAL Generic Array Logic Programmable logic device where the architecture and functionality of each output is defined by the system designer Handshaking Exchange of predetermined codes and signals between two data devices to establish and control a connection Hardware The visible parts of a computer system such as the circuit boards chassis peripherals cables etc It does not include data or computer programs Hexadecimal Hex A numbering system to the base 16 Input Output I O The process of transferring data from or to a computer system including communication channels operator interface devices or data acquis
40. compiler in use a single line in file DIO_TC H must be changed for Microsoft or Borland C C users The line that is not required must be removed or made inoperative by commenting out The following example extracted from the C source shows the program set up for Borland C define _ BORLAND _C__ Borland C users use this define __MICROSOFT_C__ Microsoft C C users use this Section 6 6 describes the library functions available Please note that in C C the function syntax lines given should always end with a semi colon Where arguments to functions are described as pointers the address of a user declared variable is required This is easily done by using the amp reference operator For example function D OgetData requires a pointer to a variable declared as long into which the digital data result will be placed A typical C code example for displaying the PPIX Port A input data would be long dat declare dat as long DIOgetData h PPIX PORTA amp dat pass dat by reference printf data ld dat dat now contains new value where h is a handle to a registered board q Amplicon BD Page 41 PC272E a 6 4 1 Borland C User Information 1 Ensure that the library DIO_TC C and the header file DIO_TC H are in a directory where the compiler can locate them Failure to find these files may cause unresolved external compilation errors 2 At the beginning of the application program add the f
41. cted as an interrupt source or 2 it has been selected as an interrupt source and the digital input output line is set low q Amplicon Bw Page 38 PC272E The Six Interrupt Sources The six sources are as follows PPI X Port C bit 0 digital input output PPI X Port C bit 3 digital input output PPI Y Port C bit 0 digital input output PPI Y Port C bit 3 digital input output PPI Z Port C bit 0 digital input output PPI Z Port C bit 3 digital input output D eD D BIT ASSIGNMENTS Bit layouts of the Interrupt Source register is shown below reserved q Amplicon Bw Page 39 PC272E OOO EEE 6 PROGRAMMING THE PC272E The distribution diskette supplied with the PC272E contains a Windows setup program which installs the software onto the user s hard disk drive and creates a new Windows program group containing shortcuts to the executable programs and help files This software includes Executable programs for immediate use Three Windows and three DOS programs ready to run from an icon or the DOS prompt providing examples of programming the PC272E using the Windows DOS library functions Dynamic Link Library DLL for programming Windows 3 11 applications A library of over 40 functions providing easy access to all the features of the PC272E board and also providing implementations of common applications for the PC272E board The functions in the DLL can be accessed by any programming language which supports
42. d i DIOsetSwitchMatrix h order where h Integer Board handle as issued by function registerBoard Integer Order of the matrix 12 24 or 36 Returns Integer OK or ERRHANDLE ERRCHAN Prior Calls registerBoard See Also DlOgetSwitchStatus DlOfreeSwitchMatrix 6 6 5 2 Query Status of a Switch within the Scan Matrix DlIOgetSwitchStatus Queries the status of a particular switch in the switch matrix setup by the DIOsetSwitchMatrix function The grid reference of the switch is given and the function performs a test on that switch and returns 1 for switch on closed or O for switch off open i DIOgetSwitchStatus h xcoord ycoord where h Integer Board handle as issued by function registerBoard xcoord Integer X co ordinate of the position of the switch in the matrix origin is at port AO BO of PPIX Valid values should be in the range 0 order as specified in DIOsetSwitchMatrix ycoord Integer Y co ordinate of the position of the switch in the matrix origin is at port AO BO of PPIX Valid values should be in the range 0 order as specified in DIOsetSwitchMatrix Returns Integer Zero if switch was OFF open Non zero if switch was ON closed q Amplicon BD Page 60 PC272E or ERRHANDLE ERRCHAN Prior Calls registerBoard DlOsetSwitchMatrix See Also DlOfreeSwitchMatrix 6 6 5 3 Free up the Digital I O Chip s from a Switch Matrix DlOfreeSwitchMatrix Frees the DIO resourc
43. d 8 bit data to a port of the 82C55 Programmable Peripheral Interface device The PPI can be configured to operate in several modes Further details may be found by reference to the device manufacturer s 82C55 data sheets in the appendices The eight data bits of port B are data input or data output in all modes The modes and programming of PPI operations are outlined in chapters 4 and 6 with the Digital I O connections shown in chapter 3 q Amplicon Page 27 PC272E BIT ASSIGNMENTS The bit layout of the PPI Y port B data register is shown below fs a 2 PPI Y Port B Digital Digital I O SK1 I O Data Bits Pin Connections PBO SK1 72 PB1 SK1 33 PB2 SK1 52 PB3 SK1 13 PB4 SK1 71 PB5 SK1 32 PB6 SK1 51 PB7 SK1 12 5 3 7 Programmable Peripheral Interface PPI Y Data Register Port C This eight bit register writes to and reads from port C of the 82C55 Programmable Peripheral Interface PPI Y All input output lines PCO to PC7 of this device are available to the user on connector SK1 as digital I O Register Write and or Register Register Offset Read Width Title 82C55 Programmable Peripheral i Wale ana ead Interface Y Port C Data Register PREYS FUNCTION The PPI Y Port C Data Register is used to write or read 8 bit data to a port of the 82C55 Programmable Peripheral Interface device The PPI can be configured to operate in several modes Further details may be found by reference to the device manufacturer s 82C55 dat
44. d for Mode Definition Format GROUP B Port C Lower 0 Output COMMAND SELECT 1 Input Set Flag 1 Active Port B 0 Output 1 Input 1 Mode 1 GROUP A Port C Upper 0 Output 1 Input Port A 0 Output 1 Input Mode Selection 00 Mode 0 01 Mode 1 1X Mode 2 Command Word for Bit Set Reset Format 0 Reset 1 Set Bit Set Reset Don t Care COMMAND SELECT Bit Set Reset Flag 0 Active Port C Bit Select ofi 2 3 4 5 6 7 rol 4 fol fol ols Bo efo fofo 4 Br ofofofols 1 1 1 Be 5 3 9 Programmable Peripheral Interface PPI Z Data Register Port A This eight bit register writes to and reads from port A of the 82C55 Programmable Peripheral Interface PPI Z All input output lines PAO to PA7 of this device are available to the user on connector SK1 as digital I O Register Write and or Register Register Offset Read Width Title F 82C55 Programmable Peripheral Hs ana Head Interface Z Port A Data Register PPIZA q Amplicon BD Page 31 PC272E OOO EEE FUNCTION The PPI Z Port A Data Register is used to write or read 8 bit data to port A of the 82C55 Programmable Peripheral Interface device PPI Z The PPI can be configured to operate in several modes Further details may be found by reference to the device manufacturer s 82C55 data sheets in the appendices The eight data bits of port A are data input data outp
45. e are good reasons for writing low level code then a study of the source code supplied will be of assistance For programming at register level reference should to be made to section 5 describing the function and assignments of each I O register in the PC272E 6 10 Signal Centre Signal Centre is a Signal Processing Applications Program available from Amplicon with support for the PC272E Operates under Microsoft Windows q Amplicon Page 65 PC272E APPENDICES APPENDIX A GLOSSARY OF TERMS The following glossary explains some terms used in this manual and in data acquisition and control applications Active Filter An electronic filter that combines active circuit devices with passive circuit elements such as resistors and capacitors Active filters typically have characteristics that closely match ideal filters ADC A D Analog to Digital converter q v Alias Frequency A false lower frequency component that appears in analog signal reconstructed from original data acquired at an insufficient sampling rate Algorithm A set of rules with a finite number of steps for solving a mathematical problem An algorithm can be used as a basis for a computer program Analog to Digital Converter ADC A device for converting an analog voltage to a parallel digital word where the digital output code represents the magnitude of the input signal See Successive Approximation Analog Switch An electronic single pole two way swi
46. e software but these require the 82C54 Timer Counter devices featured on the other boards in the PC212E PC214E PC215E PC218E and PC272E range 6 6 1 Initialisation Functions 6 6 1 1 Register a Board with the Library registerBoard Registers a board with the library This function returns a Board Handle positive integer which must be used in all subsequent calls to library functions for this board No more than eight boards can be registered at any one time i registerBoard model ba irq where model Integer Board s model number The following pre defined constants may be used for the boards supported PC214E 214 PC215E 215 PC272E 272 PC212E 212 PC218E 218 ba Integer Board s base address Factory default is 300 hex See section 2 6 1 for details on selecting the board s base address irq Integer Board s Interrupt level Factory default is 5 See section 2 6 3 for details on selecting the board s interrupt level q Amplicon BD Page 44 PC272E aay Returns Integer Board handle to be used in all subsequent function calls for that board or ERRSUPPORT ERRBASE ERRIRQ Prior Calls none See Also freeBoard 6 6 1 2 Get the Name of a Board getBoardModel Returns the model name of a registered board i getBoardModel h where h Integer Board s handle as issued by the registerBoard function Returns Integer Board s model number Possible values are 214 Amplicon PC214E 215
47. ed Connector Kit PC36AT 24 Line Digital O Board 908 919 50 37 way screw terminal assy 919 459 53 78 way Screened Connector Kit 1 3 Product Configurator Figure 1 Product Configurator Block Diagram shows how the six digital I O boards including the PC36AT may be connected using the supplied cables to form a variety of systems The simplest usable system configuration comprises one board from the PC212E PC214E PC215E PC218E or PC272E range a 78 way cable and an EX233 This system provides user terminals to all I O functions of the board More complex configurable systems include isolated or common ground input and output at low or high level All five boards employ the concept of I O Groups where a group can be six 16 bit counter timers with interconnects or 24 lines of digital input output These groups are integrated as necessary to provide the specified functionality The PC272E board has three digital input output groups The user I O connector map recognises this grouping and allows any combination of expansion panels to be directly added to any of the boards with each panel mapped onto a counter timer group or digital I O group as configured by the user q Amplicon Page 2 PC272E
48. ed to store incoming digital input data from the bus Integer Handle to a buffer previously allocated as 2 bytes per item by the allocateBuf function This buffer should contain digital output data to be send out onto the bus upon request Returns Integer Positive handle to the bi directional bus Use this handle in the call to DlOfreeBiDirectionalBus when finished to free the DIO resources ERRHANDLE ERRCHAN ERRBUFFER Prior Calls registerBoard See Also enablelnterrupts DlOfreeBiDirectionalBus q Amplicon Page 62 PC272E a 6 6 6 2 Free up Bi Directional Data Bus Digital I O Chip DlOfreeBiDirectionalBus Frees up the DIO chip used by the given Bi Directional bus handle DIOfreeBiDirectionalBus h hI where h Integer Board handle as issued by function registerBoard hl Integer Bi directional bus handle as issued by function DlOsetBiDirectionalBus Returns Integer OK or ERRHANDLE ERRCHAN Prior Calls registerBoard DlOsetBiDirectionalBus disablelnterrupts See Also 6 7 PC272E Library Error Codes Returned pene vane OK O Operation successful S O ERRSUPPORT Operation not supported by board or the maximum DE e 7 al ERRDATA__ amp Invaliddata o ERRMEMORY 8 Insufficient Memory S ERRBUFFER 9 Invalid buffer handle not allocated F q Amplicon BD Page 63 PC272E 6 8 PC272E Interface Guide For LABTECH NOTEBOOK The LABTECH NOTEBOOK drivers supplied by
49. ee Also q Amplicon BD Page 49 PC27 2E 6 6 3 5 6 6 3 6 Read Data from an Integer Buffer readintegerBuf Reads a data item from an integer buffer which is returned via a user supplied pointer The pointer must reference an integer variable i readIntegerBuf b item p where b Integer buffer handle as issued by the allocatelntegerBuf function Long index of the data item in the buffer Pointer points to an integer variable to be used for the result Returns Integer OK or ERRBUFFER ERRRANGE Prior Calls registerBoard allocatelntegerBuf See Also Read Data from Long Buffer readLongBuf Reads a data item from long integer buffer which is returned via a user supplied pointer The pointer must reference a long integer variable i readLongBuf b item p where b Integer buffer handle as issued by the allocateLongBuf function Long index of the data item in the buffer Pointer points to a long integer variable to be used for the result Returns Integer OK or ERRBUFFER ERRRANGE Prior Calls registerBoard allocateLongBuf See Also q Amplicon BD Page 50 PC272E 6 6 3 7 Write Data to an Integer Buffer writelntegerBuf Writes a single integer data item to an integer data buffer i writeIntegerBuf b item data where b Integer buffer handle Long index of item in buffer Integer data value Returns Integer OK or ERRBUFFER ERRRANGE ERRDATA Prior Call
50. egisterBoard See Also enablelnterrupts disablelnterrupts Read a Board s Interrupt Source Status getIntStat Returns a board s interrupt source status byte by reading from the board s Interrupt Status register The status of each bit is returned irrespective of whether it has been enabled using the setIntMask function See section 2 6 4 for a description of the interrupt sources This function is not supported by the PC272E as this board does not have an Interrupt Status register I getIntStat h Where h Integer Board handle as issued by the registerBoard function Returns Integer Interrupt status byte See section 2 6 4 for a description of the interrupt sources Or ERRHANDLE ERRSUPPORT Prior Calls registerBoard See Also q Amplicon Page 46 PC272E a 6 6 2 3 6 6 2 3 Enable a Board s Interrupts enablelnterrupts Enables the interrupt level registered for a board by unmasking the corresponding bit in the Interrupt Mask register IMR of the 82C59 Programmable Interrupt Controller PIC on the host computer The interrupt sources un masked by a previous call to the setIntMask function or for the PC272E the interrupt source selected by jumper J5 is now enabled See section 2 6 4 for details of the interrupt sources enableInterrupts h where h Integer Board handle as issued by the registerBoard function Returns Integer OK or ERRHANDLE Prior Calls registerBoard See Also disablelnterrupts
51. es used by the switch matrix as setup in function DIOsetSwitchMatrix D1IOfreeSwitchMatrix h where h Integer Board handle as issued by function registerBoard Returns Integer OK or ERRHANDLE ERRCHAN Prior Calls registerBoard DlOsetSwitchMatrix See Also q Amplicon Page 61 PC272E a 6 6 6 Bi Directional Data Bus Functions 6 6 6 1 Prepare an 8 bit Bi Directional Data Bus DlOsetBiDirectionalBus Programs Group A of a DIO chip for Mode 2 Strobe bi directional bus I O operation Group B Port B and Port C lower are not used in the bi directional bus and are programmed by this function for Mode 0 input or output as specified in the isPBip and isPCLip arguments They can be accessed in the normal way using the DlIOsetData and DlOgetData functions Up to three bi directional buses are available per board if PPls are available See section 4 2 2 for more details on the Bi directional Bus application DIOsetBiDirectionalBus h chip isPBip isPCLip bIn bOut where h Integer Board handle as issued by function registerBoard Integer Address offset of the DIO chip Use one of the following pre defined constants PPIZ 16 isPBip Integer Non zero if Port B is to be set as input zero if output isPCLip Integer Non zero if Port C lower are to be set as input zero if output bin Integer Handle to a buffer previously allocated as 2 bytes per item by the allocateBuf function This buffer will be us
52. f communication with another device Range Refers to the maximum allowable full scale input or output signal for a specified performance Real Time Data acted upon immediately instead of being accumulated and processed at a later time Reed Relay An electro mechanical relay where the contacts are enclosed in a hermetically sealed glass tube which is filled with an inert gas Repeatability The ability of a measuring system to give the same output or reading under repeated identical conditions Resolution A binary converter is said to have a resolution of n bits when it is able to relate 2 distinct analog values to the set of n bit binary words Rollover Symmetry of the positive and negative values in a bipolar conversion system RTD Resistive Temperature Device An electrical circuit element characterised by a defined coefficient of resistivity Sample Hold A circuit which acquires an analog voltage and stores it for a period of time Sensor Device that responds to a physical stimulus heat light sound pressure motion etc producing a corresponding electrical output Settling Time The time taken for the signal appearing at the output of a device to settle to a new value caused by a change of input signal Signal to Noise Ratio Ratio of signal level to noise in a circuit Normally expressed in decibels q Amplicon BD Page c PC272E Simultaneous Sample Hold A data acquisition system in which several sample hold circuit
53. ffset Read Width Title 82C55 Programmable Peripheral E Wiig ana Regg Interface X Port C Data Register PRINS FUNCTION The PPI X Port C Data Register is used to write or read 8 bit data to a port of the 82C55 Programmable Peripheral Interface device The PPI can be configured to operate in several modes Further details may be found by reference to the device manufacturer s 82C55 data sheets in the appendices The eight data bits of port C are split into two groups the upper port C bits 4 to 7 and the lower port C bits 0 to 3 These bits can be data input data output or control handshake lines according to the PPI mode Mode Port C Upper Port C Lower Mode 0 Input or Output Input or Output Mode 1 Control Data Control Data Mode 2 5 bit Control PC3 to PC7 3 bit Control Data PCO to PC2 With bit 7 Command Select set to 0 any of the eight bits of port C can be set or reset using a single output instruction When port C is being used as status control for port A or port B these bits can be set or reset using the Bit Set Reset operation just as if they were data output ports The modes and programming of PPI operations are outlined in chapters 4 and 6 with the Digital I O connections shown in chapter 3 BIT ASSIGNMENTS The bit layout of the PPI port C data register is shown below HIE Eig eI PPI X Port C Lower PPI X Port C Upper SK1 Pin Byte Data Bits Byte Data Bits Connections PCQ ______________ SKk1 44 PC
54. gative polarity in relation to its low terminal Bit Contraction of binary digit The smallest unit of information A bit represents the choice between a one or zero value mark or space in communications technology Buffer A storage device used to compensate for a difference in rate of data flow or time of occurrence of events when transferring data from one device to another Also a device without storage that isolates two circuits Bus Conductors used to interconnect individual circuitry in a computer The set of conductors as a whole is called a bus Byte A binary element string operated on as a unit and usually shorter than a computer word Normally eight bits C A high level programming language developed around the concept of structured programming and designed for high operating speeds Microsoft C and Turbo C are dialects of C Channel One of several signal data paths that may be selected Character A letter figure number punctuation or other symbol contained in a message or used in a control function Code A set of unambiguous rules specifying the way in which characters may be represented Conversion Time The time required for a complete conversion of a value from analog to digital form ADC or analog to digital form DAC Inverse of Conversion Rate Cold Junction See Thermocouple Reference Junction Cold Junction Compensation CJC A technique to compensate for thermocouple measurement offset when
55. has exactly the same functionality as the Windows DLL Four example C programs are also provided and these can be recompiled with either Microsoft C C or Borland C LABTECH NOTEBOOK Drivers A LABTECH NOTEBOOkKpro driver is provided with template files for each of the boards in the family 1 6 What the PC272E Package Contains A Some CAUTION of the components on the board are susceptible to electrostatic discharge and proper handling precautions should be observed As a minimum an earthed wrist strap must be worn when handling the PC272E outside its protective bag Full static handling procedures are defined in British Standards Publication BSEN100015 BSEN100015 1 1992 When notify removed from the bag inspect the board for any obvious signs of damage and Amplicon if such damage is apparent Do not plug a damaged board into the host computer Keep the protective bag for possible future use in transporting the board The package as delivered from Amplicon Liveline Ltd contains Item 1 PC272E board is supplied in a protective bag When removing the board observe the precautions outlined in paragraph 1 6 Item 2 200 Series Digital I O Counter Timer Software Diskette Part N 90 956 209 supplied on 3 1 2 diskette s ltem 3 This PC272E Instruction Manual Part N 85 956 234 Any additional accessories termination boards cables optional software etc may be packed separately 1 7 The Amplicon W
56. in the machine provided that there is no restriction specified for that location by the computer manufacturer If available the end slot furthest from any other I O card should be chosen to minimise the risk of the switched signals inducing interference in the PC circuits 2 3 System Requirements When installing one or more PC272E boards ensure that the host computer has sufficient capacity Take into account other boards or adapters that may be installed in the computer when assessing physical space address space in the I O map interrupt levels and the power requirements A minimum host computer configuration is e BM or fully compatible PC AT with 286 or higher processor 31 2 high density floppy disk drive hard disk drive and monitor e One free ISA bus to accommodate a 1 2 length I O card slot e Sufficient power available 5 VDC at 25 mA is required for each PC272E unloaded e DOS 6 0 or higher to run the DOS demonstration programs e Microsoft Windows 3 1 or higher to use the DLL and run the Windows demonstration programs 2 4 Backing up the Software Diskettes It is important that a backup copy of the software diskette s is made and the original stored in a cool dry safe place The diskette s can be copied onto a blank diskette and or the software copied onto the hard disk A supplied Windows setup program installs the software on the hard disk Refer to the DOS or Windows manual for information on disk copying Alwa
57. ised list of hardware products is shown below and a configurator diagram showing how these products interact is also given To complete the family a common software package supports all digital I O boards and the expansion panels which are transparent to the program Typical Applications e TTL compatible digital input output e Relay output with isolated contacts high level ground referenced source drivers any combination e Isolated high or low level digital input ground referenced high or low level digital input any combination Interrogation of contact closure matrix up to 1296 points per PC272E Elapsed time period frequency measurement Differential ratiometric count Monostable and astable generation Frequency division frequency multiplication digitally controlled oscillator Voltage controlled oscillator in conjunction with PC226E PC30AT PC26AT or PC27E q Amplicon Page 1 PC272E 1 2 2 Product List PC218E 18 counters clock gate source PC272E 72 line digital O EX233 Termination distribution panel 78 Terminals 3 x 37 way distribution connectors EX213 Output panel 24 relay or high level logic source drivers EX230 Input panel 24 isolated or non isolated high or low level inputs EX221 Input output panel 16 inputs 8 outputs 90 966 349 78 way Screened Cable 1m I O board to EX233 Termination distribution panel 90 956 109 37 way Screened Cable 1m PC36AT or EX233 to I O panel 91 945 753 37 way Screen
58. ition and control channels q Amplicon Page b PC272E Interface A shared boundary defined by common physical interconnection characteristics signal characteristics and meanings of interchanged signals Interrupt A computer signal indicating that the CPU should suspend its current task to service a designated activity I O Address A method that allows the CPU to distinguish between different boards and I O functions in a system See Base Address Latch A device to store the state of a digital signal until it is changed by another external command signal The action of storing this signal Least Significant Bit LSB In a system in which a numerical magnitude is represented by a series of digits the least significant bit binary digit is the digit that carries the smallest value or weight Linearity Compliance with a straight line law between the input and output of a device Load Voltage Sensing A technique for maintaining accuracy of an analog signal at the load by monitoring the voltage and compensating for errors due to cable and source resistance Micro Channel Architecture MCA A unique architecture defined by IBM to provide a standard input output bus for Personal System computers Monotonic A DAC is said to be monotonic if the output increases as the digital input increases with the result that the output is always a single valued function of the input Most Significant Bit MSB In a system in which a numerical m
59. k of memory of long integer data The function returns a Buffer Handle positive integer Up to four long data buffers can be created The Buffer Handle must be used in any subsequent function calls to identify that particular data buffer A long integer data buffer is required by the function TCsetEventRecorder b allocateLongBuf nItems where nitems Long Number of data items to be allocated If there is insufficient memory available for the size of the buffer an error is returned Returns Integer Buffer Handle positive integer This handle must be used in all subsequent function calls to identify the buffer ERRSUPPORT ERRMEMORY Prior Calls registerBoard See Also freeLongBuf q Amplicon BD Page 48 PC272E a 6 6 3 3 6 6 3 4 Free up an Integer Data Buffer freelntegerBuf Frees a block of memory previously allocated for the given data buffer by the allocatelntegerBuf function i freeIntegerBuf b where b Integer buffer handle as issued by the allocatelntegerBuf function Returns Integer OK or ERRBUFFER Prior Calls registerBoard allocatelntegerBuf See Also Free up a Long Integer Data Buffer freeLongBuf Frees a block of memory previously allocated for the given data buffer by the allocateLongBuf function freeLongBuf b where Integer buffer handle as issued by the allocateLongBuf function Returns Integer OK or ERRBUFFER Prior Calls registerBoard allocateLongBuf S
60. l problems and care should be taken to ensure that the PC272E base address is chosen where no port assignment is in contention The board s base address is set by switch SW1 This switch bank comprises a row of eight single pole single throw switches with each up or ON position selecting a logic 1 and each down or OFF position selecting a logic 0 The most significant hex digit of the base address is coded by the four most left switches and the middle hex digit is coded by the four most right switches of SW1 The least significant hex digit is always 0 Figure 3 below shows the factory default setting of 30046 Most significant digit 001 1 316 Middle digit 000 O16 Least significant Default 016 q Amplicon Bw Page 9 PC272E swt srl biter 123 45 67 8 800 400 200 100 80 40 20 10 Most Significant Middle Digit Digit Least Significant Default Figure 3 DIL Switch Selection for Base Address 2 6 2 PC I O Map 2 6 3 The standard PC AT I O map assignments are listed below I O addresses 00016 to OFFie are reserved for the PC system board use and I O addresses 10016 to 3FF16 are available on the I O channel The installation of the PC272E at a base address that uses unlisted ports may result in conflicting assignments with third party adapters Hex Range Usage Hex Range Usage 1FO 1FF Hard Disc AT 360 36F Network 200 20F Game Control 378 37F Parallel Printer 210 21F Reserved 380 38F SDLC
61. ll appear into which the standard Visual Basic Control VBX files are automatically loaded Also an empty Form1 design window will appear Select File Add file and select the following files from the WINDOWS VB subdirectory of the PC272E software directory DIO_TC BAS PC272E DLL declarations and global constants REGISTER FRM Board registration form CONSTANT TXT Visual Basic global constants Double click on the empty Form1 design window to bring up the code window for the Form_Load subroutine At runtime this routine will get called when the program first starts up Type the following lines into the Form_Load subroutine hBoard ERRSUPPORT Load REGISTER REGISTER Show modal Unload REGISTER These lines of code will cause the Board Registration dialog box to pop up so that the PC272E board can be registered with the DLL Put away the code window and select the Form1 design window Select Window Menu Design to bring up the dialog box from which you design the form s menubar Type Exit as the caption and mnuExit as the name for the first menu bar item then click on OK to put the dialog box away The menubar will now appear in the Form1 design window Click on the Exit item to bring up the code window for the mnuExit_Click subroutine At runtime this routine will get called whenever the Exit menu is selected Type the following lines into the mnuExit_Click subroutine Dim e As Integer e freeBo
62. mming of PPI operations are outlined in chapters 4 and 6 with the Digital I O connections shown in chapter 3 BIT ASSIGNMENTS The bit layout of the PPI Z port B data register is shown below A dn PPI Z Port B Digital Digital I O SK1 I O Data Bits Pin Connections PBO 7 SK159 PB1 SK120 PB2 SK178 PB3 _ _ C C SEK 3 PB4 _ SWC SK 588 PB5 WW SK1 19 PB6 sO SK 177 PB7 SK138 5 3 11 Programmable Peripheral Interface PPI Z Data Register Port C This eight bit register writes to and reads from port C of the 82C55 Programmable Peripheral Interface PPI Z All input output lines PCO to PC7 of this device are available to the user on connector SK1 as digital I O Register Write and or Register Register Offset Read Width Title 82C55 Programmable Peripheral i vyts and Mead Interface Z Port C Data Register Eee G FUNCTION The PPI Z Port C Data Register is used to write or read 8 bit data to a port of the 82C55 Programmable Peripheral Interface device The PPI can be configured to operate in several modes Further details may be found by reference to the device manufacturer s 82C55 data sheets in the appendices q Amplicon BD Page 33 PC272E OOOO aO The eight data bits of port C are split into two groups the upper port C bits 4 to 7 and the lower port C bits 0 to 3 These bits can be data input data output or control handshake lines according to the P
63. nput output lines PBO to PB7 of this device are available to the user on connector SK1 as digital I O Register Write and or Register Register Offset Read Width Title 82C55 Programmable Peripheral Menke ana Paad Interface X Port B Data Register PELAS FUNCTION The PPI X Port B Data Register is used to write or read 8 bit data to a port of the 82C55 Programmable Peripheral Interface device The PPI can be configured to operate in several modes Further details may be found by reference to the device manufacturer s 82C55 data sheets in the appendices The eight data bits of port B are data input or data output in all modes The modes and programming of PPI operations are outlined in chapters 4 and 6 with the Digital I O connections shown in chapter 3 BIT ASSIGNMENTS The bit layout of the PPI X port B data register is shown below a a 2 PPI X Port B Digital Digital I O SK1 I O Data Bits Pin Connections PBO _ SK1 46 PBI SK17 PB2 _ C CSGKX11 5 PB3 COU SK 26 PB4 SOF SK 45 PB5 __ _ s SK1 6 PB6 ___ s SK1 64 PB7 SK1 25 q Amplicon Page 22 PC272E 5 3 3 Programmable Peripheral Interface PPI X Data Register Port C This eight bit register writes to and reads from port C of the 82C55 Programmable Peripheral Interface PPI X All input output lines PCO to PC7 of this device are available to the user on connector SK1 as digital I O Register Write and or Register Register O
64. nter Timer Device Converts time dependent digital signals to a form that can be further processed by the host PC Typical functions include pulse counting frequency and pulse width measurement This can relate to time number of events speed etc Crosstalk A phenomenon in which a signal in one or more channels interferes with a signal or signals in other channels Current Loop a Data communications method using presence or absence of current to signal logic ones and zeros b A method of analog signal transmission where the measured value is represented by a current The common current loop signal is in the range 4 to 20 mA but other standards include 1 to 5 mA or 10 to 50 mA DAC D A Digital to Analog Converter q v Data Acquisition or Data Collection Gathering information from sources such as sensors and transducers in an accurate timely and organised manner Debouncing Either a hardware circuit or software delay to prevent false inputs from a bouncing relay or switch contact Decibel dB A logarithmic representation of the ratio between two signal levels Digital Analog Multiplier Same as Multiplying DAC q v Digital Signal A discrete or discontinuous signal one whose various states are identified with discrete levels or values Digital to Analog Converter A device for converting a parallel digital word to an analog voltage where the magnitude of the output signal represents the value of the digital input DIP Swit
65. ollowing line include DIO_TC H 3 Add the file DIO_TC C to the project list in the environment and use the MAKE command to compile and link 6 4 2 Microsoft C C User Information 1 Ensure that the library DIO_TC LIB and the header file DIO_TC H are in a directory where the compiler can locate them Failure to find these files may cause unresolved external compilation errors 2 At the beginning of the application program add the following line include DIO_TC H 3 Compile the Microsoft C C DIO_TC library with the following command lines cl ML e DIO_TC C lib DIO_TC LIB DIO_TC OBJ 4 Compile the application program using the large model and linking with the DIO_TC library by typing the following command line cl M1 myprog c link DIO_TC LIB q Amplicon Bw Page 42 PC272E 6 5 Using the Dynamic Link Library 6 5 1 Visual Basic To open one of the Visual Basic example projects provided with the DLL from within Microsoft Visual Basic select File Open Project and select one of the MAK project files provided in the WINDOWSI VB subdirectory of the PC272E software directory The project window will now appear on the desktop Double click on any file in the project to view the source code or select Run to run the program To create your own PC272E Visual Basic program from scratch perform the following steps From within Microsoft Visual Basic select File New Project A new project window wi
66. ould the user wish to construct custom cables A range of external expansion panels is also available to offer a variety of digital I O operations to the range of PC212E PC214E PC215E PC218E and PC272E digital I O and counter timer boards These expansion panels are also compatible with the existing PC36AT Programmable Digital I O board Part N 90 893 163 Features Summary of the Expansion Panels As with the digital I O boards the expansion panels are of modular design employing common circuit groups and constructional techniques Expansion Panels Common Features 200 Series compatible DIN rail mounting Cage clamp terminals Common circuit groups 78 way shielded connector for user I O 37 way shielded interconnect cables Connection groups compatible with I O boards Multiple ground I O connections User manual Expansion Panels Individual Features e EX233 Termination and Distribution Panel TTL level termination and or distribution e EX213 24 Line Digital Output Panel 24 Isolated relay outputs 24 high level source drivers e EX230 24 Line Digital Input Panel 24 isolated high or low level inputs 24 common high or low level inputs e EX221 16 Line Input Eight Line Output Panel 16 isolated or common hi lo level inputs eight relay and driver outputs 3 3 Use of Shielded Cables In order to maintain compliance with the EMC directive 89 336 EEC it is mandatory that the final system integrator uses good quality
67. p A also known as Group 0 or Group Group B also known as Group 1 or Group II Both groups contain an 8 bit port and a 4 bit control data port Both 8 bit data ports can be latched input or latched output Mode 2 provides strobed bi directional operation using port A as the bi directional data bus Port C3 to C7 bits are used for interrupts and handshaking bus flow control similar to mode 1 NOTE Port B and port CO to C2 bits may be defined as mode 0 or 1 input or output in conjunction with port A in mode 2 e An 8 bit latched bi directional bus port and 5 bit control port e Both input and outputs are latched e An additional 8 bit input or output port with a 3 bit control port Single Bit Set Reset Feature With bit 7 Command Select set to 0 any of the eight bits of port C can be set or reset using a single output instruction This feature reduces the software overhead in control based applications When port C is being used as status control for port A or port B these bits can be set or reset using the Bit Set Reset operation just as if they were data output ports BIT ASSIGNMENTS Bit layouts of the PPI Y command word register is shown below Further information on programming the 82C55 PPI is given in chapters 4 and 6 A full description of the operating modes and all other features of the 82C55 are available in the 82C55 device manufacturer s data sheet in the appendices q Amplicon BD Page 30 PC272E Command Wor
68. read from or written to the buffer when the relevant interrupt occurs This function returns the index within the specified buffer of the data item to be read or written to on the next relevant interrupt giving an indication of how much of the buffer contains valid data i getIntItem hB item where hB Integer buffer handle as issued by the allocateBuf functions Pointer to Long pointer to a variable declared as a long integer into which the result the index of the buffer item to be used on the next relevant interrupt will be stored Returns Integer OK or ERRHANDLE Prior Calls registerBoard allocatelntegerBuf allocateLongBuf enablelnterrupts See Also disablelnterrupts q Amplicon BD Page 54 PC272E 6 6 4 Digital Input Output Functions 6 6 4 1 Test if Digital I O Chip is Free DlOisAvailable Checks if a particular Digital I O DIO chip is available on a board A DIO chip may not be available for one of two reasons 1 the DIO chip is not provided by the board specified or 2 the DIO chip is being used by some other function i DIOisAvailable h chip where h Integer Board handle as issued by function registerBoard chip Integer Address offset of the DIO chip Use one of the following pre defined constants PPIZ 16 Returns Integer 0 DIO Chip NOT Available 1 Available or ERRHANDLE ERRCHAN Prior Calls registerBoard See Also DlOfreeResource q Amplicon Page 55 PC2
69. rupt source signals then re write the mask word to re select the required interrupt source s The Six Interrupt Sources The six sources are as follows PPI X Port C bit 0 digital input output PPI X Port C bit 3 digital input output PPI Y Port C bit 0 digital input output PPI Y Port C bit 3 digital input output PPI Z Port C bit 0 digital input output PPI Z Port C bit 3 digital input output OO EO Ne In each case Port C of the relevant PPI device can be either an input port or as an output port and this is programmed by sending a control word to the PPl s Command Register q Amplicon BD Page 37 PC272E BIT ASSIGNMENTS Bit layouts of the Interrupt Source register is shown below reserved 5 3 14 Interrupt Status Register This is the register that can be used to determine the status of the PC272E board s interrupt source s Register Write and or Register Register Offset Read Width Title FUNCTION Gives the digital status of the selected interrupt sources In order to read its status a source must have previously been selected as an interrupt source see section 5 3 13 A high level in the bit position of a given source indicates that the digital input output line has been set high and this bit will remain high until the corresponding bit in the Interrupt Source Selection register is cleared A low level in the bit position of a given source indicates that either 1 it has not been sele
70. s a guide Figure 8 below shows how to connect two mode 2 PPI groups together for bi directional bus operation PPIX Mode 2 Pa g lt 89__l5G3 PAT PAO NS 7 PAd PC7 OBF OBF PC7 PC6 PC6 PC4 PC4 PC5 PC5 Figure 8 Bi directional Bus Control Configuration eee Amplicon Bw Page 18 PC272E a 5 STRUCTURE AND ASSIGNMENTS OF THE REGISTERS The set of demonstration programs and routines provided with the PC272E allows the user access to all the operational functions of the board However in some circumstances the user may wish to program the application at the lowest level using input output instructions This section provides the necessary information on the accessible registers 5 1 Register Assignments 5 2 5 2 1 5 2 2 The PC272E registers occupy 32 consecutive address locations in the I O space A table summarising the register assignments is shown in Figure 9 Please note that the actual register address is the base address configured on the board plus the register offset given in the table See section 2 6 1 for information on setting the base address Register Groups All five boards in the PC214E PC215E PC212E PC218E and PC272E series have the same register map which is split up into five groups Cluster X Y and Z Groups With the PC272E each of the Cluster X Y and Z groups is populated with an 82C55 Programmable Peripheral Interface PPI device to provide digital input output Interrupts
71. s are used to simultaneously sample a number of analog channels and hold these values for sequential conversion One sample hold circuit per analog channel is required Software The non physical parts of a computer system that includes computer programs such as the operating system high level languages applications program etc Spike A transient disturbance of an electrical circuit Stability The ability of an instrument or sensor to maintain a consistent output when a consistent input is applied Successive Approximation An analog to digital conversion method that sequentially compares a series of binary weighted values with the analog input signal to produce an output digital word in n steps where n is the number of bits of the A D Converter g v Symbol The graphical representation of some idea Letters and numerals are symbols Syntax Syntax is the set of rules used for forming statements in a particular programming language Thermocouple A thermocouple is two dissimilar electrical conductors known as thermo elements so joined as to produce a thermal emf when the measuring and reference junctions are at different temperatures Thermocouple Measuring Junction The junction of a thermocouple which is subjected to the temperature being measured Thermocouple Reference Junction The junction of a thermocouple which is at a known temperature aka Cold Junction Throughput Rate The maximum repetitive rate at which a data
72. s registerBoard allocatelntegerBuf See Also 6 6 3 8 Write Data to a Long Integer Buffer writeLongBuf Writes a single long integer data item to a long data buffer i writeLongBuf b item data where b Integer buffer handle Long index of item in buffer Long data value Returns Integer OK or ERRBUFFER ERRRANGE ERRDATA Prior Calls registerBoard allocateLongBuf See Also q Amplicon BD Page 51 PC272E a 6 6 3 9 Copy a block of Data to an Integer Buffer copyTolntegerBuf Copies a block of integer data to an integer buffer i copyToIntegerBuf b start niItems p where b Integer buffer handle as issued by the allocateBuf function start Long index of the starting item in the buffer nitems Long number of items to copy p Pointer pointer to the beginning of the memory block to copy Returns Integer OK or ERRBUFFER ERRRANGE ERRDATA Prior Calls allocatelntegerBuf See Also freelntegerBuf 6 6 3 10 Copy a block of Data to a Long Integer Buffer copyToLongBuf Copies a block of long integer data to a long integer buffer i copyToLongBuf b start nItems p where b Integer buffer handle as issued by the allocateBuf function start Long index of the starting item in the buffer nitems Long number of items to copy p Pointer pointer to the beginning of the memory block to copy Returns Integer OK or ERRBUFFER ERRRANGE ERRDATA Prior Calls allocateLongrBuf See
73. t end of board Reset lt B2 A2 lt gt SD7 5 Volts lt B3 A3 lt gt SD6 IRQ2 9 gt B4 A4 lt SD5 5 Volts lt B5 A5 lt gt SD4 DRQ2 gt B6 A6 lt gt SD3 12 Volts lt B7 A7 lt gt SD2 OWS lt gt B8 A8 lt gt SDi C 12 Volts lt B9 A9 lt gt SDO O Ground lt B10 A10 lt I O CHRDY M S SMEMW lt B11 A11 lt gt AEN P O SMEMR lt B12 A12 lt gt SA19 O L OW lt gt B13 A13 lt gt SA18 N D OR lt gt B14 A14 lt gt SA17 E E DACK3 lt gt B15 A15 lt gt SA16 N R DRQ3 lt gt B16 A16 lt gt SA15 T DACK1 lt gt B17 A17 lt gt SA14 S DRQ1 lt gt B18 A18 lt gt SA13 S l DACKO lt gt B19 A19 lt gt SA12 l D CLK lt gt B20 A20 lt gt SA11 D E IRQ7 lt gt B21 A21 lt gt SA10 E IRQ6 lt gt B22 A22 lt gt SA9 IRQ5 lt gt B23 A23 lt gt SA8 IRQ4 lt gt B24 A24 lt gt SA7 IRQ3 lt gt B25 A25 lt gt SA6 DACK2 lt gt B26 A26 lt gt SA5 T C lt B27 A27 lt gt SA4 BALE lt B28 A28 lt gt SA3 5 Volts lt B29 A29 lt gt SA2 OSC lt B30 A30 lt gt SAI Ground lt B31 A31 lt gt SAO 36 Pin Connector MEMCS16 gt D1 C1 gt SBHE I OCS16 gt D2 C2 lt gt LA23 IRQ10 gt D3 C2 lt gt LA22 IRQ11 gt D4 C4 lt gt LA21 IRQ12 gt D5 C5 lt gt LA20 IRQ15 gt D6 C6 lt gt LA19 IRQ14 gt D7 C7 lt gt LA18 DACO lt D8 C8 lt gt LA17 DRQO gt D9 c9 gt MEMR DACK
74. tch capable of handling the full range of analog signal voltage and operating under the control of a logic signal Array Data arranged in single or multidimensional rows and columns ASCII American Standard Code for Information Interchange A code that is commonly used to represent symbols in computers Assembler A program that converts a list of computer instructions written in a specific assembly language format that can be executed by a specific processor Bandpass Filter A type of electrical filter that allows a band of signals between two set frequencies to pass while attenuating all signal frequencies outside the bandpass range Base Address A unique address set up on an I O card to allow reference by the host computer All registers are located by an offset in relation to the base address BASIC The most common computer language BASIC is an acronym for Beginners All purpose Symbolic Instruction Code BASIC is not rigorously structured and relies on English like instructions which account for its popularity Binary Coded Decimal BCD A system of binary numbering where each decimal digit 0 through 9 is represented by a combination of four bits BIOS Basic Input Output System BIOS resides in ROM on a computer system board and provides device level control for the major I O devices on the system Bipolar A signal being measured is said to be bipolar when the voltage on its high terminal can be either of positive or ne
75. ternal event driven tasks A block diagram of the PC272E is given in Figure 2 The Software The PC272E is supplied with a 312 diskette containing the software which supports all five of the boards in the 200 Series Digital I O Counter Timer Family This software is described fully in section 6 of this manual Windows Installation Program The software is installed onto the user s hard disk by a Windows installation program See section 2 of this manual for information on getting started Windows DLL A Windows Dynamic Link Library DLL containing over 50 functions provides an Applications Program Interface API to the PC272E and the other boards in the family The library functions allow the boards to be easily applied to many different applications and also provide an easy way of accessing the board s features The 16 bit DLL can be called by any language which uses Windows calling conventions and example programs written in Microsoft Visual Basic are also provided q Amplicon Page 4 PC272E Port A 99 55 PPI X Port C Interrupts Enable and Status Registers gee 8 bit Data O Address Offset Bus Decoder Event i 5 bit Address Interrupt W R Offset PC INTERFACE IRQ Controls Data Address ISA Bus Figure 2 PC272E Block Diagram q Amplicon Page 5 PC272E 1 5 1 3 1 5 1 4 DOS Library A DOS library for Microsoft and Borland C C is supplied which
76. the reference or cold junction is at a temperature other than 0 C q Amplicon BD Page a PC272E Common Mode Rejection Ratio CMR A measure of the equipment s ability to reject common mode interference Usually expressed in decibels as the ratio between the common mode voltage and the error in the reading due to this common mode voltage Common Mode Voltage In a differential measurement system the common mode voltage usually represents an interfering signal The common mode voltage is the average of the voltages on the two input signal lines with respect to ground level of the measuring system Comparator An electronic circuit used to compare two values and set an indicator that identifies which value is greater Compiler High level language used to pre process a program in order to convert it to a form that a processor can execute directly Contact Closure The closing of a switch often controlled by an electromagnetic or solid state relay Conversion Time The time required in an analog digital input output system from the instant that a channel is interrogated such as with a read instruction to the moment that accurate an accurate representation of the data is available This could include switching time settling time acquisition time converter processing time etc Counter In software a memory location used by a program for the purpose of counting certain occurrences In hardware a circuit that can count pulses Cou
77. ts of port C Register Write and or Register Register Offset Read Width Title 82C55 Programmable Peripheral E OBig Write 8 bits Interface PPI Y Command PPI Y CMD Register FUNCTION Provides a command word to define the operation of the PPI Y ports A B and C Any port programmed as output is initialised to all zeroes when a command word is written A separate feature allows any bit of port C to be set or reset using a single instruction The programming procedure for the 82C55 is flexible but the command word must be written before data bytes are loaded As the command register and each port have separate addresses offsets 0 to 3 and each command word specifies the mode of each port no other special instruction sequence is required The Three Modes The register function depends on the setting of bit 7 Command Select and the three mode selections assume that bit 7 is set to 1 which allows mode configuration Mode 0 provides basic input and output operations through each of the ports A B and C Output data bits are latched and input data follows the signals applied to the I O lines No handshaking is needed q Amplicon Page 29 PC272E SSS SEE 16 different configurations in mode 0 Two 8 bit ports and two 4 bit ports Inputs are not latched Outputs are latched Mode 1 provides strobed input and output operations with data transferred through port A or B and handshaking through port C Two I O groups Grou
78. tterns back from the matrix Section 6 6 5 describes functions which allows either PPIX or both PPIX and PPIY to be used as such a device Using only PPIX up to 144 switches can be scanned and using both PPIX and PPIY up to 576 switches can be scanned Group A ports of the 82C55 device s Port A and Port C upper are set for output to send test patterns to the matrix and group B ports Port q Amplicon Page 16 PC272E OOOO aO B and Port C lower are set for input to read the switch status information The user must ensure that the switch matrix is wired as detailed below 1N4448 PPI X AO PPI X A1 etc up to PPI X A7 then C4 to C7 then onto PPI Y and PPI Z etc up to PPI X B7 then CO to C3 then PPI X BO PPIXBi gt onto PPI Y and PPI Z Figure 7 Switch Matrix Configuration Function DiOsetSwitchMatrix allows you to setup the matrix specifying the matrix order For the PC272E this can be 12 X 12 or 24 X 24 switches The function also registers the PPIs used as being in use and unavailable for use by other programs Function DiOgetSwitchStatus returns the status of a given switch in the matrix and function D OfreeSwitchMatrix frees the PPIs so they can be used by other programs when the switch matrix is no longer required q Amplicon Page 17 PC272E 4 2 2 8 Bit Bi Directional Bus In mode 2 it is possible for an 82C55 PPI device to transfer data in two directions through a single
79. ut or bi directional data I O according to the PPI mode Mode 0 Input or Output Mode 1 Input or Output Mode 2 Bi Directional Input output The modes and programming of PPI operations are outlined in chapters 4 and 6 with the Digital I O connections shown in chapter 3 BIT ASSIGNMENTS The bit layout of the PPI Z port A data register is shown below PPI Z Port A Digital SK1 I O Data Bits Pin Connections PAO ___ sOW SK1 16 PA1 ____ s SK 174 PA2 ___ sSSFK1 35 PAZ _ SK1 54 PAA SK1 15 PA5 _ _ SK1 73 PAG _ _ SK1 34 PA7 9 SK153 5 3 10 Programmable Peripheral Interface PPI Z Data Register Port B This eight bit register writes to and reads from port B of the 82C55 Programmable Peripheral Interface PPI Z All input output lines PBO to PB7 of this device are available to the user on connector SK1 as digital I O Register Write and or Register Register Offset Read Width Title 82C55 Programmable Peripheral omean Read Interface Z Port B Data Register PERED q Amplicon Page 32 PC272E FUNCTION The PPI Z Port B Data Register is used to write or read 8 bit data to a port of the 82C55 Programmable Peripheral Interface device The PPI can be configured to operate in several modes Further details may be found by reference to the device manufacturer s 82C55 data sheets in the appendices The eight data bits of port B are data input or data output in all modes The modes and progra
80. ys use the working copy q Amplicon BD Page 8 PC272E a 2 5 Software Installation To install the PC272E software onto your hard disk insert disk 1 into drive A and select File Run from the Windows Program Manager or if you are using Windows 95 select Run from the Start menu In the dialogue box that follows type A SETUP lt RETURN gt The PG272E software installation program will now run Follow the instructions on the screen to complete the installation See section 6 Programming The PC272E for information on running the software 2 6 Configuration Switch and Jumper Settings 2 6 1 Before installing this board in the host computer the configuration needs to be set to the user s requirements Setting is by means of an on board in line switch and pluggable jumpers whose functions are described below For the interrupt source and clock source jumpers position 1 is indicated on the board by a small dot below the jumper pins Base Address Selection The base address of the PC272E can be selected in the range 000 to FF0ig If more than one PC272E is installed in a single PC each board must have a different base address and these will be separated by at least 32 bytes It is normally convenient to have the base addresses at contiguous even locations The factory default base address is 30046 Conflict of I O addresses with other devices in the host PC or fitted adaptors is a common cause of operationa

Download Pdf Manuals

image

Related Search

Related Contents

the Microline ® Service Manual  DÉTECTEUR PORTE/FENÊTRE DS90  to the FT204D User`s Manual  GMT-318 6-09 manual.qxp  USER MANUAL - EN IN 8244 Recumbent inSPORTline Varis  libretto istruzioni notice d'instructions instruction booklet    新着図書案内 (2013年11月) タイトル順ソート    Elite-x Series Operation Manual  

Copyright © All rights reserved.
Failed to retrieve file