background image

PCL-848A/B

MULTIFUNCTION IEEE-488

INTERFACE CARD

Summary of Contents for PCL-848A/B

Page 1: ...PCL 848A B MULTIFUNCTION IEEE 488 INTERFACE CARD ...

Page 2: ...anslated or transmitted in any form or by any means without the prior written permission of Advantech Co Ltd Information provided in this manual is intended to be accurate and reliable However Advantech Co Ltd assumes no responsibility for its use nor for any infringements of rights of third parties which may result from its use PC LabCard is a trademark of Advantech Co Ltd IBM and PC are trademar...

Page 3: ...ation 7 2 3 2 Installing the Card into a PC 8 2 3 3 Function Check 9 3 PROGRAMMING REFERENCE 10 3 1 Introduction 10 3 2 Using the BASIC CALL Statement 11 3 3 Using QuickBASIC and BASIC Compiler 13 3 4 The IEEE 488 Driver Routines 13 3 4 1 AHORT 14 3 4 2 DEVCLR Device Clear Purpose 15 3 4 3 DEVICE 16 3 4 4 ENTER Purpose 17 3 4 5 ENTERA 18 3 4 6 EOL 20 3 4 7 INIT 21 3 4 8 LLO 23 3 4 9 LOCAL 24 3 4 1...

Page 4: ...mmand 56 6 DIGITAL OUTPUT 57 7 TBEORY OP OPERATION 58 7 1 Introduction 58 7 2 Block Diagram Description 58 8 TROUg3LB5BOOTING 60 8 1 Introduction 60 8 2 Periodia Maintenance 60 8 3 Troubleshooting Procedure 60 8 4 Part List 62 9 BUS TUTORIAL 64 9 1 General Bus Description 64 9 2 Bus Structure 66 9 2 1 IEEE 488 Connector Pin Assignment 66 9 2 2 IEC 625 Connector Pin Assignment 67 9 3 Management Lin...

Page 5: ...10 ASCII TABLE 74 11 NEC7210 RBAD WRITE REGISTSR 76 12 SUMMARY OF TBE IEEE 488 LIBRARY FUNCTIONS 77 ...

Page 6: ...Figures Fig 2 2 Location of switches and jumpers 4 Fig 7 1 PCL 848A B Block Diagram 59 ...

Page 7: ...rating system Firmware cannot be accidentally erased or overwritten and it is always available for use by application programs This manual provides a programming reference Section 3 and programming techniques Section 4 and 5 to assist you in writing your own application programs The key features of this interface card include Operating in one of the two modes switch selectable Mode A Compatible wi...

Page 8: ...4 6 wait states to ensure the compatibility to very high speed PC s PCL 848A offers the connectors of the IEEE 488 standard while PCL 848B uses the 25 pin D type connectors for the IEC 625 standard Each device on the IEEE 488 bus can be assigned with its own terminator 1 2 Description of the Documentation Information in this manual is given at several levels of detail and is organized to allow you...

Page 9: ...ns are used in typical applications and also provide you with some useful program examples for your own applications All the examples are written in BASICA language If you want to know more details about this IEEE 488 interface card please refer to Section 5 ADVANCED PROGRAMMING TECHNIQUES This section tells you how to set DMA how to modify transfer speed and how to use interrupts This manual is i...

Page 10: ... Jumper Setting This IEEE 488 interface card has two DIP switch SW1 and SW2 1 one slide switch SW3 and three jumpers JP1 JP2 and JP3 The setting must be coincident with the application program Legend CN1 GP IB connector CN2 Digital output connector SW1 I O port base address and wait states SW2 Firmware base address SW3 Operation mode PCL 748 or NI PCÑI I JP1 DACK channel JP2 DRQ channel JP3 IRQ le...

Page 11: ...he addresses of BASE 0 and BASE 1 and the IEEE 488 interface takes the addresses from BASE 8 to BASE 15 When using the IEEE 488 driver routines the IEEE 488 interface base address must be set to BASE 8 where the BASE is the set by DIP switch SW1 The default address of the IEEE 488 interface is then hex 2B8 The switch settings for various base addresses and wait states are illustrated as below Note...

Page 12: ... one PC the location settings must be different in order to have different working space although the firmware code is the same The SW2 positions l to 5 determine the address bits Al8 to Al4 Address bit A19 is always 1 Address bits below A13 included are not cared Memory Location Segment SW2 1 SW2 2 SW2 3 SW2 4 SW 2 5 hex A18 Al7 A16 A15 A14 8000 0 0 0 0 0 8400 0 0 0 0 1 8800 0 0 0 1 0 Reserved A0...

Page 13: ...48A B is designed to permit DMA Direct Memory Access data transfer between IEEE 488 bus and the system RAM of the PC The DMA level is set by JP1 and JP2 The JP1 is for DACK signal path while the JP2 is for DRQ The settings of JP1 and JP2 must be coincident For example if the JP1 is set to DACK 3 then JP2 must be set to DRQ 3 2 2 5 Interrupt Level IRQ Setting The PCL 848A B is designed to permit ac...

Page 14: ...es from the back of the computer Turn the system unit so the back of the unit faces you 3 Remove the system unit cover See your computer user s guide if necessary 4 Locate the expansion slots at the rear of the unit and choose any unused slot 5 Remove the screw that secures the expansion slot cover to the system unit Save the screw to secure the IEEE 488 interface card retaining bracket 6 Carefull...

Page 15: ...SICA or GWBASIC environment 5 Key in the following BASIC statements 10 DEF SEG BD000 20 OUTPUT 3 ENTER 6 30 ADDR 23 GP IB address of up3478A 40 TMP F1 UP3478A DVM programming code 50 CALL OUTPUT ADDR TMP 60 FOR I 1 TO 10 70 D SPACE 80 80 CALL ENTER ADDR D 90 PRINT D 100 NEXT I 110 END 6 Execute the program It will display the 10 readings i measured by the HP3478A DVM and thus confirm proper operat...

Page 16: ...ce card as the CLS clears the screen and establishes specific operating conditions The data strings that you include in a SEND statement can be as general as the strings you would use in a PRINT statement The SEND function interprets IEEE 488 commands and data in any order that you choose It also allows you to build powerful commands that can be assigned to a single string variable that has a name...

Page 17: ...atement defines the current is egment address of the firmware and it is determined by the setting of SW2 Since the factory setting is hex D000 as statement as following is required DEF SEG HD000 Note In most cases the default setting of SW2 hex D000 i is all right for operation Keep this setting unless another add on card occupies this memory space and cannot be changed 2 The called routine must b...

Page 18: ...ement and never require reassignment within your program That means you can set it and forget it and get on with the job of solving your program rather than being concerned about addressing details Each routine also access the parameters those are received from or passed back to the BASIC program These parameters are shown in parentheses following the program offset variable for each statement The...

Page 19: ... need to call the INIT routine before calling any other IEEE488 routines when programming in BASIC compiler or QuickBASIC When calling the INIT routine the bit 8 of the parameter SETTING must be set to 1 2 The syntax to call the IEEE 488 firmware routines when programming in BASICA is as CALL OUTPUT ADDR D however in BASIC compiler or QuickBASIC the syntax is lt CALL ABSOLUTE ADDR D 0UTPUT Note Wh...

Page 20: ...ffset AHORT 9 Syntax CALL AHORT BASIC CALL AHSOLUTE AHORT BASIC Compiler Parameter None Bus Activity IFC is pulsed for 100 microseconds REN is set true ATN is set false Remark This command can be called only in system controller mode An error will occur if this command is called in the nonsystem control mode ...

Page 21: ...ffset DEVCLR 15 Syntax CALL DEVCLR ADDR BASIC CALL ABSOLUTE ADDR DEVCLR BASIC Compiler Parameter ADDR The address of the device to be cleared If 0 ADDR 30 it executes a Selective Device to the i device specified otherwise it executes a Device Clear to the bus Bus Activity If 0 addr 30 ATN is set true UNL is sent LAD is sent MTA is sent SDC is sent If addr 0 or addr 30 ATN is set true DCL is sent ...

Page 22: ... DOS Offset DEVICE 57 Syntax CALL DEVCLR ADDR PORT BASIC CALL ABSOLUTE ADDR PORT DEVCLR BASIC Compiler Parameter ADDR The address of the device which is assigned to LPTn or COMn If ADDR 0 or ADDR 30 the replace ment of LPTn or COMn is disabled PORT The port number which is to be replaced with the IEEE 488 device 1 assigned to LPT1 2 assigned to LPT2 3 assigned to LPT3 4 assigned to COM1 5 assigned...

Page 23: ...CALL ABSOLUTE ADDR D ENTER BASIC Compiler Parameter ADDR Device address If 0 ADDR 30 then it enters the string from the specified device otherwise it enters the string from the interface D The string from the specified device or from the interface Bus Activity If 0 addr 30 ATN is set true REN is set true UNL is sent TAD is sent MLA is set ATN is set false Data string is entered If addr 0 or addr 3...

Page 24: ...ERA 51 Syntax CALL ENTER ADDR DATASEG LENGTH BASIC CALL ABSOLUTE ADDR DATASEG LENGTH ENTERA EASIC Compiler Parameter ADDR The address of the device the input string comes from If 0 ADDR 30 the specified device is the talker otherwise the talker is the previously defined one DATASEG The memory segment where the string is to be put The starting address offset is 0 LENGTH The input string length The ...

Page 25: ...EG u3000 Put data to this segment 60 LENGTH RFFFF Set buffer length 65535 byte 70 CALL ENTERA ADDR DATASEG LENGTu Enter data 80 CONDITION 9 COUNT 0 90 CALL STATUS CONDITION COUNT Read data length 100 DEF SEG u3000 Define location of data 110 IF COUNT 0 THEN CNT 655361 COUNT ELSE CNT COUNT 120 FOR I 1 TO CNT 130 PRINT CER PEEK I 1 Print the data string 140 NEXT I 150 DEF SEG HD000 ...

Page 26: ...put string The default value is 0 0 Terminated with both OUTEOL and EOI 1 Terminated with EOI only OUTEOL not used i 2 Terminated with OUTEOL only EOI is disabled OUTEOL End Of Line string which is to be sent following output strings The string can be 8 characters long at maximum The default string is 13 10 CARRIAGE RETURN and LINE FEED INEOL The condition for which the input string is terminated ...

Page 27: ...piler Parameter IOPORT I O port of NEC7210 from hex 008 to hex 2F8 by increment of hex 010 The value is the I O base address plus 8 The default value is hex 2B8 since the base address determined by SW1 of this card is set to hex 2B0 at factory MYADDR IEEE 488 address of the IEEE 488 interface card The range is from 0 to 30 The default value is 21 SETTING An integer 16 bit to set the DMA LEVEL IRQ ...

Page 28: ...address is 21 I O port address is hex 2B8 SW1 is set at hex 2B0 50 INIT 0 60 MYADDR 21 70 IOPORT u2B8 80 SETTING H008F 90 CALL INIT IOPORT MYADDR SETTING 2 Set IEEE 488 interface card to mode System controller IRQ level 7 and DMA level 1 IEEE 488 address is 0 I O port address is hex 3C8 SW1 is set at hex 3C0 50 INIT 0 60 MYADDR 0 70 IOPORT H3C8 80 SETTING H001D Bit 0 2 3 4 are all 1 90 CALL INIT I...

Page 29: ...ecutes a Local Lockout LLO to disable a device s front panel It is received by all devices on the bus whether or not they are addressed to listen Offset LLO 18 Syntax CALL LLO BASIC CALL ABSOLUTE LLO BASIC Compiler Parameter None Bus Activity ATN is set true LLO is sent ...

Page 30: ... LOCAL ADDR BASIC CALL ABSOLUTE ADDR LOCAL BASIC Compiler Parameter ADDR The address of the device to be set local If 0 addr 30 then it executes a Go To Local GTL command to the specified device Otherwise it sets the REN line false High Bus Activity If 0 addr 30 ATN is set true UNL is sent LAD is sent MTA is sent GTL is sent If addr 0 or addr 30 REN is set false ATN is set false ...

Page 31: ...OLUTB ADDR D OUTPUT BASIC Compiler 3 Parameter ADDRt Device address If 0 addr 30 then it outputs the string to the specified device Otherwise it outputs the string to the interface bus D The data string variable to be output Bus Activity If 0 addr 30 ATN is set true REN is set true UNL is sent LAD is sent MTA is sent ATN is set false Data string is sent EOL string and or EOI is sent If addr 0 or a...

Page 32: ...UTA 54 Syntax CALL OUTPUTA ADDR DATASEG LENGTH BASIC CALL ABSOLUTE ADDR DATASEG LENGTH OUTPUTA BASIC Compiler Parameter ADDR The address of the device which the output string is sent to If 0 addr 30 then the specified device is the listener Other wise the listener s is are the previously defined one s DATASEG The memory segment where the output string is put The start address offset is 0 LENGTu Th...

Page 33: ... OPEN DATA 001 FOR INPUT AS 12 line 150 to 230 70 DEF SEG H4000 read a data strinq 80 COUNT 0 90 WHILE NOT EOF 2 100 A INPUT 1 X2 read one byte 110 POKE COUNT ASC A 3 120 COUNT COUNT 1 130 WEND 140 CLOSE 2 150 DEF SEG HD000 160 OUTPUTA 54 170 DATASEG H4000 180 IF COUNT 327681 THEN LENGTH COUNT ELSE LENGTH COUNT 655361 190 CALL OUTPUTA ADDR DATASEG LENGTH 200 STOP ...

Page 34: ...o respond to a parallel poll see the PPOLLC command Offset PPOLL 24 Syntax CALL PPOLL RESPONSE BASIC CALL ABSOLUTE RESPONSE PPOLL BASIC Compiler Parameter RESPONSE An integer equals to the result of parallel polling Value 0 255 of an eight bit byte represents the parallel poll response of the devices of the interface bus Bus Activity ATN and EOI are set true for 25 microseconds The parallel poll b...

Page 35: ...n define the bits to reflect the responses of particular instruments or the logical OR of several instrument responses Offset PPOLLC 27 Syntax CALL PPOLLC ADDR CONFIG BASIC CALL ABSOLUTE ADDR CONFIG PPOLLC BASIC Compiler Parameter ADDR The address of the device to be configured If 0 i addr 30 then the specified device is configured Otherwise the previous ly defined s listener s are configured CONF...

Page 36: ...30 PCL 848AB User s Manual Bus Activity If O addr 30 ATN is set true UNL is sent LAD is sent MTA is sent PPC is sent PPE is sent If ADDR 0 or ADDR 30 ATN is set true PPC is sent PPE is sent ...

Page 37: ... specific device Offset PPOLLU 30 Syntax CALL PPOLLU ADDR BASIC CALL ABSOLUTE ADDR PPOLLU BASIC Compiler Parameter ADDR The address of the device to be unconfigured If s 0 addr 30 the specified device is uncon figured Otherwise all the devices are unconfig ured Bus Activity If 0 addr 30 ATN is set true UNL is sent LAD is sent MTA is sent PPC is sent PPD is sent If addr 0 or addr 30 ATN is set true...

Page 38: ...line true Offset REMOTE 33 Syntax CALL REMOTE ADDR BASIC CALL ABSOLUTE ADDR REMOTE BASIC Compiler Parameter ADDR The address of the device to be set to remote If 0 addr 30 the specified device is set to remote Otherwise just the REN line is set true Bus Activity If 0 addr 30 REN is set true ATN is set true UNL is sent LAD is sent MTA is sent If addr 0 or addr 30 REN is set true ...

Page 39: ...h the SEND command then issue the OUTPUT command with address 0 or 30 Offset SEND 36 Syntax CALL SENDi CMDS BASIC CALL ABSOLUTE CMDS SENDi BASIC Compiler Parameter CMD Pointer of a string of standard mnemonic IEEE 488 interface commands The following can be used LISTEN TALK DATA UNL UNT GET DCL GTL P PPD PPE PPU i REN SDC SPD SPE TCT MLA MTA IFC CMD LLO SEC EOI Example CMD UNL UNT MTA LISTEN 9 10 ...

Page 40: ...LLO ASCII 5 U hex 04 19 18 09 35 55 11 My address 21 The following commands take some actions other than sending characters LISTEN Take following values as listener address TALK Take following values as talker address DATA Set ATN false EOI Set EOI true at last data byte PPE Take following values as Parallel Poll Config IFC Pulse IFC true for 100 microseconds CMD Set ATN true SEC Take following va...

Page 41: ...L SPOLL ADDR RESPONSE BASIC CALL ABSOLVTE ADDR RESPONSE SPOLL BASIC Compiler Parameter ADDR The address of the device to be serial polled Must be within 0 and 30 RESPONSE An integer with the value 0 255 of an eight bit byte representing the status of the device specified Bus Activity ATN is set true UNL is sent TAD is sent MLA is set SPE is sent ATN is set false Data byte is read ATN is set true S...

Page 42: ...s read 0 7 NEC7210 read register 0 7 8 Error Number of last called command 9 Count of string bytes that are output or entered 10 Timeout interval in milliseconds 11 I O port address of NEC7210 12 DMA IRQ setting S Variable which represents interface status 3 response Bus Activity None Remark The error number returned with condition 8 represents different types of errors Error Number Error Type 0 N...

Page 43: ... T BASIC CALL ABSOLUTE T TIMEOUT BASIC Compiler Parameter T T 0 Disable the timeout command T 1 to 32767 Timeout period is T units T 1 to 32767 Timeout period is 65536 T units Bus Activity None Remark 1 The unit of the timeout period depends on the execution speed of the CPU For PC XT of 4 77 MHz clock rate the unit is one millisecond For PC AT and higher clock rate CPU the unit is less 2 The time...

Page 44: ...LL TRIGi ADDRi BASIC CALL AHSOLUTE ADDR TRIG BASIC Compiler Parameter ADDRi The address of the specified device to be triggered If 0 addr 30 the specified device is triggered Otherwise all the listeners of the bus are triggered Hus Activity If 0 addr 30 ATN is set true UNL is sent LAD is sent MTA is sent GET is sent If addr 0 or addr 30 ATN is set true GET is sent ...

Page 45: ...le which represents the error number of last called command IOCOUNT Variable which represents the count of string bytes that are outputed or entered Bus Activity None Remark This command must be executed before calling any other t command except the INIT command ERROR NUMBER ERROR TYPE 0 No error 1 Handshake timeout 2 Interface error 3 Call ABORT when non system controller 4 Invalid passed paramet...

Page 46: ...R IOCOUNT 50 TMPS FlRAT3NS 60 CALL OUTPUT ADDR TMP GOSUB 100 70 ANs sPACE 40 80 CALL ENTER ADDR ANS GOSUH 100 85 PRINT ANS 90 STOP 100 Error number and string counts check routine 110 PRINT TBE COUNT OF STRING BYTES IOCOUNT 120 IF IOERR 0 TEEN PRINT NO ERROR 130 IF IOERR 1 TREN PRINT 3ANDSBAKE TIMEOUT 160 RETURN 170 END ...

Page 47: ... 150 Command entry point 160 170 KEY 1 ON KEY 2 ON KEY 3 ON KEY 4 ON KEY 5 OFF 180 KEY 6 OFF KEY 7 OFF KEY 8 OFF KEY 9 OFF KEY 10 OFF 190 KEY 1 CLS KEY 2 0UTPUT KEY 200 KEY 5 KEY 6 KEY 73 ENTER KEY 4 EXIT 210 KEY 9 KEY 10 220 ON KEY 1 GOSUB 390 230 ON REY 2 GOSUB 440 240 ON KEY 3 GOSUB 560 250 ON KEY 4 GOSUB 810 260 270 GOSUB 330 280 KEY ON 290 GOTO 290 Loop here waiting function key 310 Display m...

Page 48: ...50 560 570 ENTER UTILITY 580 590 PRINT 600 D SPACE 80 610 IF 22 LIN Y 6 TUEN CLS LIN Y 1 620 LOCATE 22 1 0 PRINT SPC 79 LOCATE LIN Y 1 630 INPUT l From which address 7 ADDR 3 640 CALL ENTER ADDR D 650 GOSUB 710 Error check 660 IF S c 0 THEN 690 Error happened 670 PRINT ENTERED STRING 680 PRINT D 690 PRINT LIN Y CSRLIN GOSUB 430 700 RETURN 710 720 730 TIMEOUT CUECK ROUTINE 740 750 CONDITION 8 760 C...

Page 49: ...tting 170 INPUT Enter the IEEE 488 printer address ADDR 180 IF ADDR 0 OR ADDR 30 THEN PRINT Bad entry GOTO 170 190 INPUT Enter the printer port 1 LPT1 2 LPT2 N 200 IF N 1 OR N 2 TuEN PRINT Bad entry GOTO 19 220 230 Setting the IEEE 488 printer 250 CALL DEVICE ADDR N 260 PRINT 270 PRINT IEEE 488 printer is ready to use 290 300 Check the IEEE 488 printer function 320 PRINT 330 INPUT Send string to p...

Page 50: ... STATUS 42 TRIG GER 48 170 CALL ABORT 180 190 Set the DVM 200 210 ADDR 23 220 D l FlT3RAN5 230 CALL OUTPUT ADDR DS Send instrument setting string 240 GOSUB 430 250 IF ER 0 T13EN PRINT Error when setting DVM END 260 270 Measurement start 280 290 FOR I 1 TO 10 300 CALL TRIGGER ADDR Trigger the DVM 310 D SPACE 40 320 CALL ENTER ADDR D Enter DVM reading 330 GOSUB 430 Error check 340 IF ER 0 TuEN PRINT...

Page 51: ...170 DIM V 16 180 DEF SEG HD000 190 ABORT 9 ENTER 6 OUTPUT 3 STATUS 42 TRIGGER 48 200 TIMEOUT 45 EOL 12 ADDR3478 23 ADDR500 9 210 V LIMIT 2 Voltage limit 220 Set handshake timeout init IEEE 488 bus 230 CALL ABORT FOR Y 0 TO 300 NEXT Y Wait for ADSOOA reset 240 T 5000 CALL TIMEOUT T Set timeout 5 sec 250 Init ADSOOA terminator 260 OUTEOL 2 OUTEOLS CHR 13 INEOL 0 INEOLBYTE 10 270 CALL EOL ADDR500 OUT...

Page 52: ...en setting DVM END 570 580 V I VAL D 590 PRINT I V I 600 IF V I V LIMIT THEN PRINT ALARM1 ALARM 1 610 PRINT 620 NEXT I 630 PRINT 640 IF ALARM 0 THEN 710 650 D DW1 1 7 660 CALL OUTPUT ADDR500 D Set the alarm 670 PRINT Set Alarml PRINT 680 GOTO 420 690 700 710 D DW1 0 720 CALL OUTPUT ADDR500 D Reset the alarm 730 PRINT Reset Alarmi PRINT 740 GOTO 420 750 760 770 Error check routine 780 790 CONDITION...

Page 53: ...0 Initialization 130 140 CLS 150 DEF SEG HD000 160 ABORT 9 ENTER 6 OUTPUT 3 SEND 36 STATUS 42 170 TRIGGER 48 180 ADDR1 23 ADDR2 24 190 CALL ABORT 200 210 220 Set the DVM s 230 240 D l FlT3R2N5 250 CALL OUTPUT ADDR1 D Send DVM 1 setting string 260 CALL OUTPUT ADDR2 D Send DVM 2 setting string 270 GOSUB 550 Error check 280 IF ER 0 TuEN PRINT Error when setting DVM END 290 300 310 Measurement start 3...

Page 54: ... ER 0 TEEN PRINT Error when reading DVM 2 END 470 480 PRINT I D1 D2 490 500 NEXT I 510 520 END 530 540 550 Error check routine 560 570 CONDITION 8 530 CA L STATUS CONDITION ER Read the error number 590 IF ER 0 TEEN PRINT Error ER 600 IF ER 1 TEEN PRINT Device timeoutl 610 RETURN 620 630 End of thie program 570 CONDITION 8 ...

Page 55: ...l and make necessary 150 modification to this program 160 In this example the program only shows when the 170 interrupt happens You can add more actions to 180 the service routine to response to an interrupt 190 200 Initialization 210 220 CLS 230 DEF SEG HD000 240 ABORT 9 ENTER 6 OUTPUT 3 STATUS 42 TRIGGER 48 250 SPOLL 39 DEVCLR 15 260 INIT 0 270 IOPORT H2B8 MYADDR 21 E 280 SETTING HE1C Enable Bus...

Page 56: ...TuEN PRINT Error ER 620 IF ER 1 THEN PRINT Device timeoutl 630 IF ER 2 TuEN PRINT Interface Errorl 640 IF ER 3 TBEN PRINT Abort by Non system Controllerl 650 IF ER 4 THEN PRINT Invalid parameterel 660 STOP 670 RETURN 680 690 700 Timeout service routine 710 720 PRINT Interface Timeoutl 730 740 RETURN 750 760 770 SRQ service routine 780 790 PRINT Interface SRQI 800 RES 0 CALL SPOLL ADDR RES 810 PRIN...

Page 57: ...ocks of up to 64K bytes without processor overhead These features can significantly improve system performance in applications where high speed transfers are required or large blocks of data must be moved This section describes how DMA works and how you can use it to your advantage It also introduces and explains Bit 15 and 14 of SETTING of the INIT routine described in Section 3 3 7 DMA is contro...

Page 58: ...number of bytes specified by the programmer are transferred In block transfer mode control of the system bus is returned to the microprocessor only after all data is transferred Demand transfer mode and Cascade mode are not supported by this interface The IEEE 488 interface disables the auto initialization function and uses only the address register increment direction on the 8237 chip because of ...

Page 59: ...k transfer mode unless you have confidence that the data transfer will be completed within the time limits of memory refresh When using background operation the CPU does not care about the data transfer The data string can be terminated by byte count only The data format problem then must be handled by users It is safe to use DMA in single byte transfer and non back ground operation mode the defau...

Page 60: ...acitance Factors l 4 and 6 are the nature of the PC Factors 7 and 8 are determined by your choice of devices and cables For factor 5 you can choose block transfer mode DMA to get maximum speed with the risk that the PC may be hung For factor 2 the interface driver routine is written with a lot of effort to maximize execution speed by handling the overhead effectively For factor 3 the NEC7210 was c...

Page 61: ...he error number is ERR 128 Check 3 3 18 STATUS routine for the error type Fl9 Timeout The IEEE 488 handshake is hung F20 SRQ The IEEE 488 SRQ line is pulled low active by some device The default condition disables all these interrupts To enable these interrupts you must set bits 9 10 and 11 of SETTING when calling the INIT routine Bit Set O Set 1 IEEE 488 Interrupt Function Key 9 disable enable SR...

Page 62: ... addressing technique To write a data string to secondary address 03 with primary address 23 the program is as follows SEND 36 OUTPUT 3 ADDR 1 OUTPUT to pre defined listeners D ABCD CND UNL UNT MTA LISTEN 23 SEC 03 CALL SEND CMD CALL OUTPUT ADDR D If your computer intermittently fails to execute this code you are having a timing problem To avoid this put the data from D in CMD after the DATA state...

Page 63: ... D O low byte D07 D06 D05 D04 D03 D02 DO1 D00 BASE 1 D7 D6 DS D4 D3 D2 D1 DO write port D O high byte D015D014 D013 D012 DOll D010 DO9 D08 It is fairly straight forward to use your PCL 848A B digital output functions Some areas requires your attentions are the pin assignment Connector 2 CN2 Digital Output The programming is quite easy and it needs only the BASIC statement OUT For example to set al...

Page 64: ... in the ROM The driver routine controls the IEEE 488 INTERFACE CONTROLLER to execute the necessary command E sequence The on board RAM is for the storage of the interface parameters such as the IEEE 488 address of the controller The IEEE 488 INTERFACE CONTROLLER is an IC chip which provides an interface between a microprocessor system and the IEEE 488 interface bus This IC is controlled and config...

Page 65: ...CHAPTER 7 TBEORY OP OPERATION 59 Fig 7 1 PCL 848A B Block Diagram ...

Page 66: ...he golden fingers for the PC I O slot should be cleaned to prevent wax and dirt build up Spray the contacts lightly with a good contact cleaner such as trichflorethlyene and use a cotton swab to rub off the dirt and excess cleaner 8 3 Troubleshooting Procedure The majority of problems are due to poor cabling contacts or incorrect device programming The remedy for these two problems is to keep the ...

Page 67: ...ware or I O address set or I O address settings conflict with tings other add on cards Instrument does not Wrong instrument Instrument address response address setting Bad bus connections Check bus data with bus analyzer Wrong instrument Verify with instru programming sequence ment manual Instrument hangs up Instrument output Send instrument a when sending data control not set OK Selective Device ...

Page 68: ...R2 1 51 ohm resistor RP1 RP3 2 4 7 Rohm resistor array 9 pin RP2 1 4 7 Kohm resistor array 5 pin OSC1 1 8 Muz OSC U1 U5 2 74LS273 U2 1 74LS08 U3 1 74LS126 U4 1 74LS04 U6 1 74LS164 U7 1 74LS138 U8 U12 4 PEEL 18CV8PC 25 AMI U15 U17 U9 1 75160A TI U10 1 75162B TI U11 1 16K SRAM 150ns NEC4016C 3 or Equ U13 1 GP IB Interface Controller NEC NEC7210C U14 1 64K EPROM 150ns NEC2764 or Equ U16 U18 2 74LS244...

Page 69: ... Mfr U19 1 74LS245 SW1 SW2 2 DIP switches 16 pins SW3 1 Slide switch JP1 JP2 2 3 by 2 pin headers JP3 1 6 by 2 pin header CN1 1 24 pin ribbon connector IEEE 488 for PCL 848A or 25 pin D type connector IEC 625 for PCL 848B CN2 1 20 pin header with socket ...

Page 70: ...ly this card uses IEEE 488 bus drivers that are designed to drive long cables and receive noisy data without error The data address and control bus interface between the board and the PC has been designed for minimum current loading and maximum speed Mechanically it has a connector that is identical to all other connectors of the IEEE 488 standard This allows devices to be quickly and easily added...

Page 71: ...to systems It minimizes compatibility problems between devices and has sufficient flexibility to accommodate future products The bus has been formally accepted by the International Electrotech nical Commission I E C as an international standard and by the Institute of Electrical and Electronic Engineers I E E E as an American standard The IEEE 488 bus employs a 16 line to interconnect up to 15 ins...

Page 72: ...tive talker but it allows multiple listeners receiving the same data at the same time Only one controller can be active at a time 9 2 Bus Structure An IEEE 488 bus has 24 lines including 7 ground return lines and one shield line The 16 lines with signals are 8 data lines 3 handshake lines and 5 management lines 9 2 1 IEEE 488 Connector Pin Assignment The IEEE 488 standard uses 24 pin ribbon connec...

Page 73: ...ns COMMAND mode instructions which can be issued by the controller include 1 Talk Address A byte transmitted by the controller enables a specified device to talk Only one device can be the talker at a time When a new talker is assigned the old one is disabled 2 Listen Address A byte transmitted by the controller enables a specified device to listen The IEEE 488 bus allows multiple listeners When n...

Page 74: ...the listeners to a known state Address GTL SOE 01 Go To Local Set all listeners into local mode Address GET BS 08 Group Execute Trigger Trigger all listeners on the bus Address PPC ENQ 05 Parallel Poll Configure Configure a device to respond to parallel poll Address TCT ET 09 Take Control Transfer control to another device Unaddress UNL 3F Unlisten Unaddress the current listeners Unaddress UNT _ S...

Page 75: ...he computer 9 6 Parallel Polling Parallel polling permits the status of up to eight devices on the bus to be checked simultaneously Each device is assigned a data line DIO1 to DI08 during parallel poll configure When the controller conducts a parallel poll ATN and EOI set low at same time the device sets the assigned data line low or high to indicate if it requires service If more than eight devic...

Page 76: ...70 PCL 848AB User s Manual ...

Page 77: ... Data transfer rate is determined by the 3 slowest active device 3 Multiple devices can accept data at the same time The following definitions are used when discussing IEEE 488 bus 1 SOURCE A device sending information on the bus in either the command or data mode 2 TALKER A device addressed to talk in the data mode 3 ACCEPTOR A device receiving information on the bus in either the command or data...

Page 78: ...72 PCL 848AB User s Manual Handshake Timing Sequence ...

Page 79: ...9 10 Bus Operating Considerations When a device is powered on during system operation it may activate IFC and cause the active controller on the bus to halt with an error The controller must send IFC to regain active control Prior to addressing new listeners it is recommended that all previous listeners be unaddressed using the UNL command only one talker can be addressed at a time When a new talk...

Page 80: ...0C 12 0101100 2C 44 LA12 CR 0001101 0D 13 0101101 2D 45 LA13 50 0001110 OE 14 0101110 2E 46 LA14 SI 0001111 0F 15 0101111 2F 47 LA15 DLE 0010000 10 16 0 0110000 30 48 LA16 DC1 0010001 11 17 LLO 1 0110001 31 49 LA17 DC2 0010010 12 18 2 0110010 32 50 LA18 DC3 0010011 13 19 3 0110011 33 51 LA19 DC4 0010100 14 20 DCL 4 0110100 34 52 LA20 NAK 0010101 15 21 PPU 5 0110101 35 53 LA21 SYNC 0010110 16 22 6 ...

Page 81: ... SC12 M 1001101 4D 77 TA13 m 1101101 6D 109 SC13 N 1001110 4E 78 TA14 n 1101110 6E 110 SC14 O 1001111 4F 79 TA15 c 1101111 6F 111 SC15 P 1010000 50 80 TA16 p 1110000 70 112 SC16 Q 1010001 51 81 TA17 q 1110001 71 113 SC17 R 1010010 52 82 TA18 r 1110010 72 114 SC18 5 1010011 53 83 TAl9 s 1110011 73 115 SCl9 T 1010100 54 84 TA20 t 1110100 74 116 SC20 U 1010101 55 85 TA21 u 1110101 75 117 SC21 V 10101...

Page 82: ...PT3 CPT2 CPT1 CPT0 Through 6 Address 0 X DT0 DL0 AD50 AD40 AD30 AD20 AD10 7 Address 1 EOI DTl DL1 AD51 AD41 AD31 AD21 AD11 Write Register Bit Contents 7 6 5 4 3 2 1 0 0 Hyte Out BO7 BO6 BO5 BO4 BO3 BO2 BO1 BO0 1 Interrupt CPT APT DET END DEC ERR DO DI Mask 1 2 Interrupt 0 SRQI DMAODMAI CO LOKC REMC ADSC Mask 2 3 Serial Poll S8 rsv S6 S5 S4 S3 S2 Mode 4 Address ton lon TRM1 TRM0 0 0 ADM1ADM0 Mode 5...

Page 83: ...e EOL 12 ADDR OVTEOL Sets the terminators of input OUTEOL INEOL and output string of a device INEOLBYTE INIT 0 IOPORT MYADDR Initializes the interface and SETTING sets parameters LLO 18 None Local Lockout LOCAL 21 ADDR Sets a device to local mode or releases the REN line OUTPUT 3 ADDR D Outputs data to a device OUTPUTA 54 ADDR DATASEG Outputs a long string of data LENGTB to a device PPOLL 24 RESPO...

Page 84: ...vity SPOLL 39 ADDR RESPONSE Serial Poll STATUS 42 CONDITION 5 Reads the status of the interface TIMEOUT 45 T Sets timeout interval TRIGGER 48 ADDR Triggers a device or devices ERRPTR 60 IOERR IOCOUNT Assign variables for error number and count of string bytes ...

Reviews: