The Datasheet Archive - 100 Million Datasheets from 7500 Manufacturers.    


Datasheet Search Engine   
 
Part # or Description: • 5V RS232 Driver • 2SC5066* • "Real Time Clock" • "USB connector" • "blue led" 5mm • 10 watt zener diode • 2N3055* motorola
 
Search Tip: Try entering the part number only. Include a wildcard (eg. lm317* or 1n4148*)

 

 

PCL-848A/B MULTIFUNCTION IEEE-488 INTERFACE CARD USER'S MANUAL This do


Datasheet Thumbnail

  

Download PDF



Top Searches for this datasheet



PCL-848A/B MULTIFUNCTION IEEE-488 INTERFACE CARD
PCL-848A/B MULTIFUNCTION IEEE-488 INTERFACE CARD USER'S MANUAL This documentation software routines contained PCL848A/B software diskette copyrighted 1989 Advantech Ltd. rights reserved. Advantech Co., Ltd. reserves right make improvements products described this manual time without notice. part this manual reproduced, copied, translated transmitted, form means without prior written permission Advantech Co., Ltd. Information provided this manual intended accurate reliable. However, Advantech Co., Ltd. assumes responsibility use; infringements rights third parties which result from use. PC-LabCard trademark Advantech Co., Ltd. trademarks International Business Machines Corporation. MSDOS QuickBASIC trade marks Microsoft Corporation BASIC trademark Dartmouth College. Intel trademark Intel Corporation. PC-II trademark National Instruments.
Part 2003848000 Printed Taiwan
Rev. 2001
Contents
GENERAL INFORMATIQN
1.1. Introduction Product 1.2. Description Documentation
INSTALLATION
2.1. Inspection 2.2. Switch Jumper Setting
2.2.1. 2.2.2. 2.2.3. 2.2.4. 2.2.5. Base Address Wait State Setting Firmware Address Setting Operating Mode Setting Level Setting Interrupt Level (IRQ) Setting
2.3. Installing Card
2.3.1. Preparation 2.3.2. Installing Card into 2.3.3. Function Check
PROGRAMMING REFERENCE
3.1. 3.2. 3.3. 3.4. Introduction Using BASIC CALL Statement Using QuickBASIC BASIC Compiler IEEE-488 Driver Routines
3.4.1. AHORT 3.4.2. DEVCLR (Device Clear) Purpose 3.4.3. DEVICE 3.4.4. ENTER Purpose 3.4.5. ENTERA 3.4.6. 3.4.7. INIT 3.4.8. 3.4.9. LOCAL 3.4.10. OUTPUT Purpose 3.4.11. OUTPUTA 3.4.12. PPOLL 3.4.13. PPOLLC 3.4.14. PPOLLU 3.4.15. REHOTE 3.4.16. SEND 3.4.17. SPOLL 3.4.18. STATUS Purpose 3.4.19. TIMEOUT Purpose
3.4.20. TRIGGER Purpose 3.4.21. ERRPTR
PROGRAMMING TECBNIQUES
4.1. 4.2. 4.3. 4.4. 4.5. 4.6. 5.1. 5.2. 5.3. 5.4. Interactive Data Transfer IEEE-488 Printer Voltage Measurement with AD500 Programming Multiple Device Triggering Interrupt Handling Direct Memory AcceAs (DMA) Transfer Speed Interrupt Hore about SEND Command
ADVANCED PROGRAMM1N~ TECBNIQUES
DIGITAL OUTPUT TBEORY OPERATION.
7.1. Introduction 7.2. Block Diagram Description
TROUg3LB5BOOTING
8.1. 8.2. 8.3. 8.4. Introduction Periodia Maintenance Troubleshooting Procedure Part List
TUTORIAL
9.1. General Description 9.2. Structure 9.3. Management Lines 9.4. Commands 9.5. Servioe Request Serial Polling 9.6. Parallel Polling 9.7. Code Summary 9.8. Randshake Lines 9.9. Other Lines 9.10. Operating Considerations
9.2.1. IEEE-488 Connector Assignment 9.2.2. IEC-625 Connector Assignment
ASCII TABLE NEC7210 RBAD WRITE REGISTSR SUMMARY IEEE-488 LIBRARY FUNCTIONS
Figures
Fig. Location switches jumpers Fig. PCL-848A/B Block Diagram
GENERAL INFORMATIQN
1.1. Introduction Product
PCL-848A/B IEEE-488 interface card valuable addition your that allows communicate with over 2000 products, made over manufacturers, over countries. IEEE488-1978 standard that this IEEE-488 card implements most widely used international standard information transfer between computer electronic instruments. There numerous publications articles that used conjunction with this manual assist understand interface standard. IEEE reference document ordered writing IEEE Service Center, Uoes Piscataway, 08854, USA. IEEE-488 interface card provides hardware (electrical mechanical) software required interface your IEEE-488 bus. software packaged read-only-memory (firmware) provide versatile easy-to-use IEEE488 function extensions your current programming language operating system. Firmware cannot accidentally erased overwritten always available application programs. This manual provides programming reference (Section programming techniques (Section assist writing your application programs. features this interface card include: Operating modes (switch selectable). Mode Compatible with PCL-748 on-board firmware driver. Mode Software compatible with National Instrument PC-II IBM-PC GPIB adaptor driver software developed them. Implementation entire IEEE-488 standard. Powerful easy-to-use software command set. Fewer arguments simple initialization. Software driver on-board firmware. Requires additional disk operation when using BASIC Turbo Pascal. On-board working space. system memory space needed IEEE-488 interface operation. Built-in digital output port provides convenient economical solution signal switching digital control applications. port compatible with daughter boards: PCLD-785 Relay Output Eoard, PCLD-786 Relay Driver Board PCL-789 Amplifier Multiplexer Board.
CHAPTER GENERAL INFORMATIQN
BASICA, BASIC compiler Quick-BASIC supported standard languages. Pascal language support packages ordered separately PCL-748-C PCL-748-P. software change printer port IEEE-488 device. PrtSc (print screen) key, print statements, word processing spreadsheet programs that printer driver BIOS IEEE-488 printers. High speed direct memory access (DMA) with ability handle byte arrays. Programmable system controller, active controller device functions. device functions, addresses, interrupt conditions, parallel poll responses programmable. Automatic initialization. Interface parameters default when starting using interface. Parameters still changed calling initialization routine. switch selectable wait states (0/2/4/6 wait states) ensure compatibility very high speed PC's. PCL-848A offers connectors IEEE-488 standard while PCL-848B uses type connectors IEC-625 standard. Each device IEEE-488 assigned with terminator.
1.2. Description Documentation
Information this manual given several levels detail organized allow work through TUTORIAL, PROGRAHMING REFERENCE PROGRAMMING TECHNIQUES sections. have IEEE-488 experience, Section after this section. IEEE-488 TUTORIAL Section designed give thorough understanding IEEE-488 General Purpose Interface (GP-IB) works. Topics TUTORIAL should read sequence have IEEE-488 background intend write application programs. With solid understanding basic IEEE-488 concepts, followed returning PROGRAMMING REFERENCE, PROGRAMMING TECHNIQUES, should able program almost IEEE-488 system without interface problems.
PCL-848AB
User's Manual
familiar with basic concepts IEEE-488 want begin reading Section PROGRaI~MING REFERENCE. This section describes statement syntax techniques IEEE-488 driver firmware. Section PROGRAMMING TECHNIQUES will show functions used typical applications also provide with some useful program examples your applications. examples written BASICA language. want know more details about this IEEE-488 interface card, please refer Section ADVANCED PROGRAMMING TECHNIQUES. This section tells DMA, modify transfer speed interrupts. This manual intended accurate organized give quick reference programming ideas concepts IEEE-488 bus.
CHAPTER GENERAL INFORMATIQN
INSTALLATION
2.1. Inspection
When unpacking, check unit signs shipping damage (damaged box, scratches, dents, etc). there damage unit fails meet specifications, notify your localt sales representative immediately.
2.2. Switch Jumper Setting
This IEEE-488 interface card switch (SW1 SW2), slide switch (SW3) three jumpers (JP1, JP3). The: setting must coincident with application program.
Legend:
CN1: GP-IB connector CN2: Digital output connector
SW1: port base address wait states SW2: Firmware base address SW3: Operation mode (PCL-748
JP1: DACK channel JP2: channel JP3: level Fig. Location switches jumpers
Fig. Location switches jumpers
PCL-848AB
User's Manual
2.2.1. Base Address Wait State Setting ports base address number wait states selectable position switch SW1. base address anywhere address area from wait states Refer Fig. 2.2. locations switches SW1. Factory settings these switches zero wait state. This multifunction interface card takes addresses port following base address. digital output port takes addresses BASE+0 BASE+1 IEEE-488 interface takes addresses from BASE+8 BASE+15. When using IEEE-488 driver routines, IEEE-488 interface base address must BASE+8 where BASE switch SW1. default address IEEE-488 interface then 2B8. switch settings various base addresses wait states illustrated below: Note switch positions W0.W1 correspond wait state A4.A8 correspond address lines means factory setting Switch position (SW1) Occupied Addresses 200-20F 210-21F 2B0-2BF 3E0-3EF 3F0-3FF -Switch position (SW1) Wait state(s) -CHAPTER INSTALLATION
2.2.2. Firmware Address Setting IBEE-488 interface driver routine stored on-board EPROM. memory address this firmware selected SW2. memory segment firmware from 8000 FC00. Factory setting D000. range these locations 640K system memory PC/AT. However, choice this location must made avoid conflict with other interface cards. When more IEEE-488 interface cards used location settings must different order have different working space although firmware code same. positions determine address bits Al4. Address always Address bits below (included) cared. Memory Location Segment (hex) SW2-1 SW2-2 SW2-3 SW2-4
-8000 8400 8800 A000 Display B000 Factory Setting D000 System F000 FC00 Reserved
This multifunction IEEE-488 interface card takes bytes memory space including byte byte RAM. starting address working offset bytes from starting address.
PCL-848AB
User's Manual
2.2.3. Operating Mode Setting slide switch select operating mode. When "A", this card compatible with easy-to-use PCL-748 IEEE-488 interface card except there real time clock. When "N", this card becomes PC-II compatible. depends users which mode selected. software package already developed PC-II, then mode used eliminate software effort. Dowever, software developing, mode recommended benefit PCL-848A/B. PCL-848A/B does support software driver mode this manual offers information mode operation only. 2.2.4. Level Setting PCL-848A/B designed permit (Direct Memory Access) data transfer between IEEE-488 system level JP2. DACK signal path while DRQ. settings must coincident. example, DACK then must 2.2.5. Interrupt Level (IRQ) Setting PCL-848A/B designed permit access interrupt level level interrupt initiated NEC7210 GP-IB interface controller. selection made setting JP3.
Note
Although level from board, firmware supports only.
2.3. Installing Card
2.3.1. Preparation Discharge static electricity touching back system unit before handle board. should avoid contact with materials that create static electricity such plastic, vinyl, styrofoam.
CHAPTER INSTALLATION
IEEE-488 interface card setup factory default setting: Jumper/Switch Selection port base address Wait states Firmware base address Operating mode DACK level level level Default setting D000
Refer Section 2.2. other configurations.
2.3.2. Installing Card into procedure install IEEE-488 interface card following: Turn computer peripheral devices (such printers monitors). Disconnect power cord other cables from back computer. Turn system unit back unit faces you. Remove system unit cover (See your computer user's guide necessary). Locate expansion slots rear unit choose unused slot. Remove screw that secures expansion slot cover system unit. (Save screw secure IEEE-488 interface card retaining bracket). Carefully grasp upper edge IEEE-488 interface card. Align hole retaining bracket with hole expansion slot, align gold striped edge connector with expansion slot socket. Press board firmly into socket. Replace screw expansion slot retaining bracket. Replace system unit cover. Connect cables ~emoved step
PCL-848AB
User's Manual
2.3.3. Function Check Confirm proper operation connecting IEEE-488 instrument attempting operate with program written BASIC. Here example procedure using HP3478A digital voltmeter short BASIC program.
Connect HP3478A IEEE-488 connector this card back with standard IEEE-488 cable. PCL-848B, connector type defined IEC-625 PCL-15488-2 IEC-625 IEEE-488 cable must used. device address HP3478A Turn HP3478A into BASICA GWBASIC environment. following BASIC statements: SEG=&BD000 OUTPUT%=3 ENTER%=6 ADDR%=23 `GP-IB address up3478A TMP$="F1" ~UP3478A programming code CALL OUTPUT%(ADDR%,TMP$) D$=SPACE$(80) CALL ENTER%(ADDR%,D$) PRINT NEXT
Execute program. will display readings measured HP3478A thus confirm proper operation. system fails this test, check these common problems: instrument requires special terminator. Check instruments instruction manual Section this manual. programming command syntax instrument incorrect. Check examples instrument manual. Check electrical connections. there still problem, contact your local sales representative further assistance.
CHAPTER INSTALLATION
PROGRAMMING REFERENCE
3.1. Introduction
PCL-848A/B interface card contains resident firmware that provides IEEE488 language extensions your firmware (software programmed into readonly-memory) appears transparent users function inside called IEEE-488 commands. routines firmware written assembly language insure maximum data transfer rates. Each routine combines error checking. routines also check parameter values insure that appropriate protocol followed. routines firmware transfer commands data IEEE-488 through statements that given English language names like OUTPUT, ENTER INIT. Statement OUTPUT sends data string IEEE-488 much same <PRINT "string"> sends data screen. Statement ENTER looks data coming from IEEE-488 BUS, similar <INPUT waits keyboard entry assign string variable Statement INIT clears interface sets specific operating modes interface card clears screen establishes specific operating conditions. data strings that include SEND statement general strings would <PRINT> statement. SEND function interprets IEEE-488 commands data order that choose. also allows build powerful commands that assigned single string variable that name purpose that meaningful you. IEEE-488 commands separated more spaces. There difficult syntax learn only standard IEEE-488 mnemonics used. function each mnemonic performed exactly defined IEEE-488-1978 standard. firmware converts your command data strings specific control codes IEEE-488 controller chip. also passes back received data interface status conditions your program. Received information used directly your program status codes (those returned STATUS function) used determine various interface operating conditions detect syntax errors statements. next section discusses CALL statement BASICA QuickBASIC. examples given BASICA, syntax each function similar those QuickBASIC version 2.0, 4.0.
PCL-848AB
User's Manual
3.2. Using BASIC CALL Statement
firmware routines IEEE-488 interface card, thought BASIC language extensions. extensions consist statements ABORT, CLEAR, ENTER, ENTERA, EOL, INIT, LLO, LOCAL, OUTPUT, OUTPUTA, PPOLL, PPOLLC, PPOLLU, REMOTE, SEND, SPOLL, STATUS, TIMEOUT, TRIGGER ERRPTR. These routines allow execute much faster because they written assembly language. Another advantage that statement names only represent address offsets these offsets given name that prefer. Calling routines firmware when using BASICA requires three steps.
location firmware routines must defined using statement. This statement defines current egment address firmware determined setting SW2. Since factory setting D000, statement following required. &HD000
Note:
most cases, default setting (hex D000) right operation. Keep this setting unless another add-on card occupies this memory space cannot changed.
called routine must located within segment defined offset variables. example, OUTPUT routines offset statement define offset variables OUTPUT%
Note:
OUTPUT% variabLe other variable names.
parameters needed this routine must defined according requirement application. Then, routine executed using CALL statement. state ments such ADDR% "F1RA" CALL OUTPUT%(ADDR%,D$) Additional information CALL statements available your BASIC manual.
CHAPTER PROGRAMMING REFERENCE
Every called routine must define entry address with offset from current segment. ease reference IEEE-488 routine offsets three byte increments start segment. example, INIT routine offset (zero), OUTPUT routine offset ENTER routine offset Please note that program offsets must entered exactly shown each interpreter routine. offsets determine where program will branch improper location cause ignore inputs except power switch. This true BASIC CALL subroutines limitation interface board. When assign offset, explicitly telling where look next instruction. Because running assembly language routine, cannot check validity, purpose, each instruction does with BASIC instructions. that reason, depends receiving proper offset address then assumes that instructions correct. statement offset address assigned with single BASIC statement never require reassignment within your program. That means "set forget with solving your program rather than being concerned about addressing details. Each routine also access parameters those received from passed back BASIC program. These parameters shown parentheses following program offset variable each statement. There some limitations BASICA that have, unfortunately, placed restrictions called routines. order, number, type variables passed routines must exactly shown each routine. This because BASIC only passes pointers variables does provide variable type identifier. BASIC interpreter compiler (such Compiled BASIC QuickBASIC) have different string variable requirements. default BASIC interpreter. BASIC compiler, must call INIT routine SETTING% tell firmware routines handle parameters different way. Passed parameters must variables cannot constants. BASIC change source code statement changes contents passed string. This situation avoided assigning value string argument before calling firmware routines. statement define blank string receive data recommended SPACE$(255).
PCL-848AB
User's Manual
programming examples interpreter routines have been written work around these limitations they should placed restrictions your IEEE-488 applications.
3.3. Using QuickBASIC BASIC Compiler
Calling IEEE-488 routines firmware when using BASIC compiler QuickBASIC almost same using BASICA except following areas. When using IEEE-488 routines BASICA programming, user does need call INIT routine (initialization) except default setting used. Uowever, user need call INIT routine before calling other IEEE488 routines when programming BASIC compiler QuickBASIC. When calling INIT routine, parameter SETTING% must "1".
syntax call IEEE-488 firmware routines when programming BASICA CALL OUTPUT%(ADDR%,D$) however, BASIC compiler QuickBASIC, syntax CALL ABSOLUTE(ADDR%, D$,0UTPUT%)
Note:
QB/L
When using QuickBASIC, user needs enter developing environment command
load library USERLIB.EXE. Otherwise, word "ABSOLUTE" cannot recognized.
3.4. Driver Routines
following twenty routines called programs written BASICA, BASIC Compiler QuickBASIC access IEEE-488 interface. QuickBASIC same syntax BASIC Compiler.
CHAPTER PROGRAMMING REFERENCE
3.4.1. AHORT Purpose: This command aborts activities interface
Offset AHORT%=9
Syntax CALL AHORT% CALL AHSOLUTE(AHORT%) -BASIC -BASIC Compiler
Parameter: None.
Activity pulsed microseconds. true false.
Remark This command called only system controller mode error will occur this command called nonsystem control mode.
PCL-848AB
User's Manual
3.4.2. DEVCLR (Device Clear) Purpose This command sends Selective Device Clear (SDC) command specified device sends Device Clear (DCL) interface bus.
Offset DEVCLR%=15
Syntax CALL DEVCLR%(ADDR%) CALL ABSOLUTE(ADDR%,DEVCLR%) -BASIC -BASIC Compiler
Parameter ADDR% address device cleared. ADDR% executes Selective Device device specified, otherwise, executes Device Clear bus.
Activity addr true. sent. sent. sent. sent. addr addr true. sent.
CHAPTER PROGRAMMING REFERENCE
3.4.3. DEVICE Purpose: This command installs IEEE-488 device driver place LPT1:, LPT2:, LPT3:, COM1: COM2: driver. IEEE-488 devices then accessed using system commandst MS-DOS.
Offset DEVICE%=57 Syntax: CALL DEVCLR%(ADDR%,PORT%)-BASIC CALL ABSOLUTE(ADDR%,PORT%,DEVCLR%) Parameter: ADDR% address device which assigned LPTn: COMn:. ADDR% ADDR% replacement LPTn: COMn: disabled. PORT% port number which replaced with IEEE-488 device. assigned LPT1: assigned LPT2: assigned LPT3: assigned COM1: assigned COM2: Activity: None. -BASIC Compiler~
PCL-848AB
User's Manual
3.4.4. ENTER Purpose This command enters string from device from interface. Reading terminated upon receiving terminator specified command maximum length data bytes reached. Offset ENTER%=6
Syntax CALL ENTER%(ADDR%,DS) -BASIC -BASIC Compiler
CALL ABSOLUTE(ADDR%,D$,ENTER%)
Parameter ADDR% Device address. ADDR% then enters string from specified device, otherwise, enters string from interface.
Activity
string from specified device from interface.
addr true. true. sent. sent. set. false. Data string entered. addr addr false. Data string entered. Remark: entered string length read STATUS.
CHAPTER PROGRAMMING REFERENCE
3.4.5. ENTERA Purpose This command enters long string (can 65535 bytes) from specified device from interface. Reading terminated upon receiving terminator, when specified length reached, timeout. string into specified segment memory. starting address received string offset that segment.
Offset ENTERA%=51
Syntax CALL ENTER%(ADDR%,DATASEG%,LENGTH%) -BASIC CALL -EASIC Compiler
Parameter ADDR% address device input string comes from, ADDR% specified device talker, otherwise, talker previously defined one. memory segment where string put. starting address offset input string length. range from 65535.
DATASEG% LENGTH%
Activity addr true. sent. sent. set. false. Data string entered. addr addr false. Data string entered.
PCL-848AB
User's Manual
Example:
SEG=&HD000 Define location firmware ENTERA%=51 STATUS%=42 Define routine offset
ADDR%=8 GP-IB Device data source DATASEG%=&u3000 data this segment LENGTH%=&RFFFF buffer length 65535 byte CALL ENTERA%(ADDR%,DATASEG%,LENGTu%) `Enter data CONDITION%=9 COUNT%=0 CALL STATUS%(CONDITION%,COUNT%) `Read data length SEG=&u3000 Define location data COUNT%<0 THEN CNT=655361+COUNT% ELSE CNT=COUNT% PRINT CER$(PEEK(I-1)); `Print data string NEXT SEG=&HD000
CHAPTER PROGRAMMING REFERENCE
3.4.6. Purpose This command sets terminators input output strings specified device. terminators devices default values this command called. Offset EOL%=12 Syntax CALL -BASIC CALL -BASIC Compiler Parameter ADDR% OUTEOL% address device assigned terminator. range from Terminator type appended output string. default value Terminated with both OUTEOL$ EOI. Terminated with only. OUTEOL$ used. Terminated with OUTEOL$ only. disabled. OUTEOL$ End-Of-Line string which sent following output strings. string characters long maximum. default string (CARRIAGE RETURN LINE FEED). condition which input string terminated. default value Terminated when INEOLBYTE$ received true input string full. Terminated when true input string full. INEOLBYTE$ ASCII code character upon which input string will terminated when INEOL% default (LINE FEED).
INEOL%
Activity None.
PCL-848AB
User's Manual
3.4.7. INIT Purpose This aommand initializes interface card sets relative parameters. neglected parameters used default values.
Offset INIT%=0
Syntax CALL INIT%(IOPORT%,MYADDR%,SETTING%) -BASIC
CALL -HASIC Compiler
Parameter IOPORT% port NEC7210, from increment 010. value base address plus default value since base address (determined SW1) this card factory. IEEE-488 address IEEE-488 interface card. range-is from default value integer bit) LEVEL, LEVEL other parameters. default value i.e., 8ASIC interpreter, system controller, DMA.
MYADDR% SETTING%
CHAPTER PROGRAMMING REFERENCE
more information about 12,14,15 setting, please refer Section ADVANCED PROGRANMING TECUNIQUES. Activity This command takes following action when called. Initialize NEC7210 GP-IB controller. relative parameters NEC7210. Store base address, level level into working RAM. Examples IEEE-488 interface card mode Non-system controller, IRQ, DMA. address port address (SW1 2B0). INIT% MYADDR% IOPORT% &u2B8 SETTING% &H008F CALL INIT%(IOPORT%,MYADDR%,SETTING%) IEEE-488 interface card mode System controller, level level IEEE-488 address port address (SW1 3C0). INIT% MYADDR% IOPORT% &H3C8 SETTING% &H001D CALL INIT%(IOPORT%,MYADDR%,SETTING%) IEEE-488 interface card BASIC Compiler mode, System controller, IRQ, level address port address 2B8. INIT% MYADDR% IOPORT% &H2B8 SETTING% &H0102 CALL INIT%(IOPORT%,MYADDR%,SETTING%)
PCL-848AB User's Manual
3.4.8. Purpose This command executes Local Lockout (LLO) disable device's front panel. received devices bus, whether they addressed listen.
Offset LLO%=18
Syntax CALL LLO% CALL ABSOLUTE(LLO%) -BASIC -BASIC Compiler
Parameter None.
Activity true. sent.
CHAPTER PROGRAMMING REFERENCE
3.4.9. LOCAL Purpose This command executes Local (GTL) clears line enable device's front panel controls.
Offset LOCAL%=21
Syntax CALL LOCAL%(ADDR%) CALL ABSOLUTE(ADDR%,LOCAL%) -BASIC -BASIC Compiler
Parameter ADDR% address device local. addr <=30, then executes Local (GTL) command specified device. Otherwise, sets line false (High).
Activity addr true. sent. sent. sent. sent.
addr addr false. false.
PCL-848AB
User's Manual
3.4.10. OUTPUT Purpose This command outputs string specified device interface bus. After string sent, terminator specified command sent.
Offset OUTPUT%=3
Syntax CALL OUTPUTi(ADDR%,D$) CALL ABSOLUTB(ADDR%D$,OUTPUT%) -BASIC -BASIC Compiler
Parameter ADDRt Device address. addr then outputs string specified device. Otherwise, outputs string interface bus. data string variable output.
Activity addr true. true. sent. sent. sent. false. Data string sent. string and/or sent. addr addr false. Data string sent. string and/or sent.
CHAPTER PROGRAMMING REFERENCE
3.4.11. OUTPUTA Purpose This command outputs long string (can 65535 bytes) specified device interface. output string terminated when length output string approached, when handshake times out. output string memory area with specified segment. start address output string offset that segment.
Offset OUTPUTA%=54 Syntax CALL -BASIC CALL -BASIC Compiler Parameter ADDR% address device which output string sent 0<=addr<=30, then specified device listener. Otherwise, listener(s) is(are) previously defined one(s). memory segment where output string put. start address offset output string length. range from 65535.
DATASEG% LENGTu%
Activity addr true. sent. sent. set. false. Long string sent. addr addr false. Long string sent.
PCL-848AB
User's Manual
Example: ADDR%=8 OPEN "DATA.001" INPUT `line SEG=&H4000 COUNT=0 WHILE EOF(2) `read byte `read data strinq This program loads data file from disk into then outputs this data IEEE-488 device
A$=INPUT$(1,X2)
POKE COUNT,ASC(A$) COUNT=COUNT+1 WEND CLOSE SEG=&HD000 OUTPUTA%=54 DATASEG%=&H4000
COUNT 327681 THEN LENGTH%=COUNT ELSE LENGTH%=COUNT -655361 CALL STOP
CHAPTER PROGRAMMING REFERENCE
3.4.12. PPOLL Purpose This command conducts parallel poll interface bus. returns value (0255) eight-bit byte represent- response those devices interface which have been configured respond parallel poll (see PPOLLC command).
Offset PPOLL%=24
Syntax CALL PPOLL%(RESPONSE%) CALL ABSOLUTE(RESPONSE%,PPOLL%) -BASIC -BASIC Compiler
Parameter RESPONSE% integer equals result parallel polling. Value 0-255 eight byte represents parallel poll response devices interface bus.
Activity true microseconds. parallel poll byte read. false. false.
PCL-848AB
User's Manual
3.4.13. PPOLLC Purpose: This command performs Parallel Poll Configure. preparation parallel poll command, enables tell device respond parallel poll, which data line respond. general, enables contfigure parallel poll response byte reflect response desired arrangement devices. define bits reflect responses particular instruments logical-OR several instrument responses. Offset: PPOLLC%=27
Syntax: CALL PPOLLC&(ADDR%,CONFIG%) CALL ABSOLUTE(ADDR%,CONFIG%,PPOLLC%) -BASIC -BASIC Compiler
Parameter: ADDR% address device configured. addr then specified device configured. Otherwise, previously defined listener(s) configured. integer sent configure specified device indicating which data line respond. Indicates line (DI01-8) Responds with Responds with 4-15 used.
CONFIG%
CHAPTER PROGRAMMING REFERENCE
Activity: addr true. sent. sent. sent. sent. sent.
ADDR% ADDR% true. sent. sent.
PCL-848AB
User's Manual
3.4.14. PPOLLU Purpose: This command executes Parallel Poll Unconfigure. directs device respond parallel poll. addressed interface specific device.
Offset: PPOLLU%=30 Syntax: CALL PPOLLU%(ADDR%) CALL ABSOLUTE(ADDR%,PPOLLU%) -BASIC -BASIC Compiler
Parameter: ADDR' address device unconfigured. addr specified device uncon figured. Otherwise, devices unconfigured.
Activity: addr true. sent. sent. sent. sent. sent. addr addr true. sent.
CHAPTER PROGRAMMING REFERENCE
3.4.15. REHOTE Purpose: This command places device Remote Mode. addressed specific device interface, which just sets line true.
Offset: REMOTE%=33
Syntax CALL REMOTE&(ADDR%) CALL ABSOLUTE(ADDR%,REMOTE%) -BASIC -BASIC Compiler
Parameter ADDR% address device remote. 0<=addr<=30, specified device remote. Otherwise, just line true.
Activity addr true. true. sent. sent. sent. addr addr true.
PCL-848AB
User's Manual
3.4.16. SEND Purpose: This command sends user specified IEEE-488 Interface commands interface. example, send output string several instruments simultaneously, establish multiple listener status with SEND command, then issue OUTPUT command with address >30.
Offset: SEND%=36
Syntax: CALL SENDi(CMDS) CALL ABSOLUTE(CMDS,SENDi) -BASIC -BASIC Compiler
Parameter: CMD$ Pointer string standard mnemonic IEEE-488 interface commands. following used: LISTEN TALK DATA Example: CMD$=''UNL LISTEN DATA `ABCD'EOI" Section 5.4. more information.
CHAPTER PROGRAMMING REFERENCE
Activity following commands true then send corresponding character. Mnemonic ASCII (Hex) (3F) (5F) (08) (14) (15)
(01) (05) (70)
Mnemonic ASCII (hex)
(04)
(19)
(18)
*MLA (09)
*MTA
(35) (55) (11)
address
following commands take some actions other than sending characters.
LISTEN TALK DATA
Take following values listener address. Take following values talker address. false. true last data byte. Take following values Parallel Poll Config. Pulse true microseconds. true. Take following values secondary commands.
PCL-848AB
User's Manual
3.4.17. SPOLL Purpose This command conducts serial poll interface bus. returns value (0255) eight-bit byte representing device's status.
Offset SPOLL%=39
Syntax CALL SPOLL%(ADDR%,RESPONSE%) CALL -BASIC -BASIC Compiler
Parameter ADDR% RESPONSE% address device serial polled. Must within integer with value 0-255 eight byte representing status device specified.
Activity true. sent. sent. set. sent. false. Data byte read. true. sent. sent.
CHAPTER PROGRAMMING REFERENCE
3.4.18. STATUS Purpose Purpose This command reads status from interface returns this value calling statement. Offset STATUS%=42 Syntax CALL STATUS%(CONDITION%,5%) CALL ABSOLUTE(CONDITION%,5%,5TATUS%)
-BASIC -BASIC Compiler
Parameter CONDITION% This number specifies which status read. NEC7210 read register Error Number last called command. Count string bytes that output entered. Timeout interval milliseconds. port address NEC7210. setting. Activity None. Remark error number returned with condition represents different types errors. Error Number Error Type error Handshake timeout Interface error Call ABORT when non-system controller Invalid passed parameter(s) Variable which represents interface status response.
PCL-848AB
User's Manual
3.4.19. TIMEOUT Purpose Purpose This command sets timeout period. When handshake stuck, called functions will terminate time specified timeout flag will set.
Offset TIMEOUT%=45
Syntax CALL TIMEOUT%(T%) CALL ABSOLUTE(T%,TIMEOUT%) -BASIC -BASIC Compiler
Parameter: Disable timeout command. 32767 Timeout period units. -32767 Timeout period (65536+T%) units.
Activity None.
Remark unit timeout period depends execution speed CPU. 4.77 clock rate, unit millisecond. PC/AT higher clock rate CPU, unit less. timeout period 10000 units each time INIT command called.
CHAPTER PROGRAMMING REFERENCE
3.4.20. TRIGGER Purpose Purpose This command sends Group Execute Trigger (GET) device interface bus.
Offset TRIG%=48
Syntax: CALL TRIGi(ADDRi) CALL AHSOLUTE(ADDR',TRIG%) -BASIC -BASIC Compiler
Parameter ADDRi address specified device triggered. addr specified device triggered. Otherwise, listeners triggered.
Activity addr true. sent. sent. sent. sent. addr addr true. sent.
PCL-848AB
User's Manual
3.4.21. ERRPTR Purpose This command assigned variables error number count string bytes.
Offset: ERRPTR%=60
Syntax CALL ERRPTR%(IOERR%,IOCOUNT%) -BASIC CALL -BASIC Compiler
Parameter IOERR% IOCOUNT% Variable which represents error number last called command. Variable which represents count string bytes that outputed entered.
Activity None.
Remark: This command must executed before calling other t~command except "INIT" command.
ERROR NUMBER
ERROR TYPE error Handshake timeout Interface error Call ABORT when non-system controller Invalid passed parameter(s)
STATUS command (condition other information.
CHAPTER PROGRAMMING REFERENCE
Example SEG=&HD000 ADDR%=23 CALL ERRPTR%(IOERR%,IOCOUNT%) TMPS="FlRAT3NS" CALL OUTPUT%(ADDR%,TMP$):GOSUB ANs$=sPACE$(40) CALL ENTER%(ADDR%,ANS$):GOSUH PRINT ANS$ STOP `Error number string counts check routine PRINT "TBE COUNT STRING BYTES ";IOCOUNT% IOERR%=0 TEEN PRINT ERROR" IOERR%=1 TREN PRINT "3ANDSBAKE TIMEOUT" RETURN
PCL-848AB
User's Manual
PROGRAMMING TECBNIQUES
4.1. Interactive Data Transfer
'FILE NAME EXAMPLE.1 'Program Example INTERACTIVE DATA TRANSFER 'Purpose This program outputs data strings entered users enters data from IEEE-488 bus. 'Initialization LIN.Y=1 SEG=&BD000 ABORT%=9 OUTPUTi=3 ENTER%=6 STATUS%=42 CALL ABORT' 'Command entry point KEY(1) KEY(2) KEY(3) KEY(4) KEY(5) KEY(6) OFF: KEY(7) OFF: KEY(8) OFF: KEY(9) OFF: KEY(10) .KEY 0UTPUT .KEY 6.KEY ENTER EXIT ":KEY 10," KEY(1) GOSUB REY(2) GOSUB KEY(3) GOSUB KEY(4) GOSUB GOSUB GOTO `Loop here waiting function 'Display message COLOR 15,7:LOCATE 22,1,0:PRINT ";SPACE$(79):LOCATE 22,1 PRINT "Select function l":COLOR 7,0:LOCATE RETURN 'Clear Screen CLS:GOSUB RETURN
CHAPTER PROGRAMMING TECBNIQUES
'OUTPUT UTILITY TMP$=SPACE$(80) 22-LIN.Y<6 TREN CLS:LIN LOCATE 22,1,0:PRINT ";SPACE$(79):LOCATE LIN.Y,1 INPUT which address ",ADDR LINE INPUT `'OUTPUT string ",TNP$ E.FG%=0 CALL OUTPUT%(ADDR%,TMP$) GOSUB S%=0 THEN PRINT "Data transmitted PRINT PRINT LIN.Y=CSRLIN GOSUB RETURN 'ENTER UTILITY PRINT D$=SPACE$(80) 22-LIN.Y<6 TUEN LIN.Y=1 LOCATE 22,1,0:PRINT ";SPC(79):LOCATE LIN.Y,1 INPUT l'From which address ",ADDR% CALL ENTER%(ADDR%,D$) GOSUB `Error check S%c>0 THEN `Error happened PRINT "ENTERED STRING PRINT PRINT LIN.Y=CSRLIN GOSUB RETURN 'TIMEOUT CUECK ROUTINE CONDITION%=8 CALL STATUS%(CONDITION%,S%) S%=1 THEN PRINT "TIMEOUT S%<>0 S%<>1 THEN PRINT "INTERFACE ERROR RETURN 'TUEN THIS PROGRAM
PCL-848AB
User's Manual
4.2. IEEE-488 Printer
'FILE NAME EXAMPLE.2 Program Example IEEE-488 PRINTER 'Purpose This program converts IEEE-488 printer system printer 'Initialization SEG=&HD000 DEVICE%=57
Enter IEEE-488 printer setting INPUT "Enter IEEE-488 printer address ",ADDR% ADDR&<0 ADDR~>30 THEN PRINT "Bad entry." GOTO INPUT "Enter printer port (1/LPT1 2/LPT2;) ",N%\ N%<>1 N%<>2 TuEN PRINT "Bad entry.' GOTO 'Setting IEEE-488 printer CALL DEVICE%(ADDR%,N%) PRINT PRINT "IEEE-488 printer ready use." 'Check IEEE-488 printer function PRINT INPUT "Send string printer (Y/N) ",Y$ Y$<>"y" Y$<>"Y" THEN LINE INPUT "Enter string ";D$ LPRINT GOTO
CHAPTER PROGRAMMING TECBNIQUES
4.3. Voltage Measurement with
'FILE NAME EXAMPLE.3 'Program Example VOLTAGE MEASUREMENT WIT)3 'Purpose This program measure voltage readings 'and displays them 'Remark This program written HP3478A DVM. 'another model voltmeter used, please check 'the operating manual make necessary 'modification this program. 'Initialization SEG=&HD000 ABORT%=9 ENTER%=6 OUTPUT%=3 STATUS%=42 TRIGGER%=48 CALL ABORT% ADDR%=23 D$=l'FlT3RAN5'' CALL OUTPUT%(ADDR%,DS) Send instrument setting string GOSUB ER%<>0 T13EN PRINT "Error when setting DVM." 'Measurement start CALL TRIGGER%(ADDR%) Trigger DVM. D$=SPACE$(40) CALL ENTER%(ADDR%,D$) Enter reading GOSUB `Error check ER%<> TuEN PRINT "Error when reading DVM." PRINT I,D$ NEXT 'Error check routine CONDITION%=8 ER%=0 CALL STATUS%(CONDITION%,ER%) `Read error num'oer ER%<>0 TSEN PRINT "Error ";ER% ER%=1 T13EN PRINT "Device timeout RETURN 'End this program
PCL-848AB User's Manual
4.4. AD500 Programming
'FILE NAME EXAMPLE.4 'Program Example AD500 PROGRAMMING 'Purpose This program measures channel voltages 'display them. voltage channel 'greater than certain level then close 'relay drive alarm. 'Remark AD500 channel multiplexer alot 'and channel relay actuator slot 'voltage measurement done HP3478A DVM. 'The AD500 address HP3478A 'address 'Initialization V(16) SEG=&HD000 ABORT%=9 ENTER%=6 OUTPUT%=3: STATUS%=42: TRIGGER%=48 TIMEOUT%=45 EOL%=12 ADDR3478%=23 ADDR500%=9 V.LIMIT=2 Voltage limit 'Set handshake timeout init IEEE-488 CALL ABORT% NEXT `Wait ADSOOA reset T%=5000 CALL TIMEOUT%(T%) timeout sec. 'Init ADSOOA terminator OUTEOL%=2 OUTEOLS=CHR$(13) INEOL%=0 INEOLBYTE%=10 CALL 'Set Multiplexer D$="FlT3RAN5" CALL OUTPUT%(ADDR3478%,D$) Send setting string GOSUB Error check ER%<>0 THEN PRINT "Error when setting DVM." D$="DW0,16;DW1,0"; CALL OUTPUT%(ADDR500%,D$) Open relays Multiplexer 'and Actuator GOSUB Error check ER%<>0 THEN PRINT "Error when setting AD500."
CHAPTER PROGRAMMING TECBNIQUES
'Measurement start ALARM%=0 D$="DW0,"+STR$(I) CALL OUTPUT%(ADDR500%,D$) Close channel NEXT Delay relay operation. CALL TRIGGER%(ADDR3478%) Trigger DVM. D$=SPACES(40) CALL ENTER%(ADDR3478%,DS) Enter reading GOSUB Error check ER%0 THEN PRINT "Error when setting DVM." V(I)=VAL(D$) PRINT I,V(I), V(I)>V.LIMIT THEN PRINT "ALARM1", ALARM%=1 PRINT NEXT PRINT ALARM%=0 THEN D$="DW1,1" CALL OUTPUT%(ADDR500%,D$) alarm PRINT "Set Alarml" PRINT GOTO
D$="DW1,0" CALL OUTPUT%(ADDR500%,D$) Reset alarm PRINT "Reset Alarmi" PRINT GOTO 'Error check routine CONDITION%=8 CALL STATUS%(CONDITION%,ER%) Read error number ER%0 THEN PRINT "Error" ER%=1 THEN PRINT Device timeoutt" RETURN 850' this program
PCL-848AB
User's Manual
4.5. Multiple Device Triggering
'FILE NAME EXAMPLE.5 'Program Example MULTIPLE DEVICE TRIGGERING 'Purpose This program triggers voltmeters same 'time make measurement simultaneously. 'Remark This program written HP3478A DVM. another model voltmeter used, please check operating manual make necessary modification this program. 'Initialization SEG=&HD000 ABORT%=9 ENTER%=6 OUTPUT%=3 SEND%=36 STATUS%=42 TRIGGER%=48 ADDR1%=23 ADDR2%=24 CALL ABORT% 'Set DVM's D$=l'FlT3R2N5'' CALL OUTPUT%(ADDR1%,D$) Send setting string CALL OUTPUT%(ADDR2%,D$) Send setting string GOSUB Error check ER%<>0 TuEN PRINT "Error when setting DVM." 'Measurement start CMD$='UNL LISTEN GET" CALL SEND%(CMD$) Trigger DVM's D1$=SPACE$(40) CALL ENTER%(ADDR1%,D$) Enter reading GOSUB Error check ER%<>0 TuEN PRINT "Error when reading #1."
CHAPTER PROGRAMMING TECBNIQUES
D2$=SPACE$(40) CALL ENTER%(ADDR2%,D$) Enter reading GOSUB Error check ER%<>0 TEEN PRINT "Error when reading #2." PRINT I,D1$,D2$ NEXT 'Error check routine CONDITION%=8 STATUS%(CONDITION%,ER%) Read error number ER%0 TEEN PRINT "Error" ER%=1 TEEN PRINT "Device timeoutl" RETURN 'End thie program CONDITION%=8
PCL-848AB
User's Manual
4.6. Interrupt Handling
'FILE NAME EXAMPLE.6 'Program Example INTERRUPT HANDLING 'Purpose This program measures voltage readings 'displays them. also goes service 'subroutines when interrupts happen. 'Remark interrupt handing Advanced BASIC 'Version A3.00 higher only. other BASIC 'Version, this work because 'different memory arrangement. 'This program written HP3478A DVM. 'other models voltmeters used, please 'check operating manual make necessary 'modification this program. this example, program only shows when 'interrupt happens. more actions 'the service routine response interrupt. 'Initialization SEG=&HD000 ABORT%=9 ENTER%=6 OUTPUT%=3 STATUS%=42 TRIGGER%=48 SPOLL%=39 DEVCLR%=15 INIT%=0 IOPORT%=&H2B8 MYADDR%=21 SETTING%=&HE1C Enable Error, Timeout select IRQ7 'for interrupt CALL INIT%(IOPORT%,MYADDR%,SETTING%) 'Set UNMASK Front Panel ADDR%=23 CALL DEVCLR%(ADDR%) II=1 1000 NEXT D$="KM20FlT3RAN5" CALL OUTPUT%(ADDR%,DS) Send instrument setting string ERROR GOTO KEY(l9) GOSUB KEY(l9) KEY(20) GOSUB KEY(20)
CHAPTER PROGRAMMING TECBNIQUES
'Measurement start CALL TRIGGER%tADDR%) Trigger DVM. ANS$=SPACE$(40) CALL ENTER%(ADDR%,ANS$) Enter reading PRINT I,ANS$ NEXT 'Error check routine ERR<128 THEN PRINT "BASIC Error";ERR ELSE ER%=ERR-128 ER%<>0 TuEN PRINT "Error" ER%=1 THEN PRINT "Device timeoutl" ER%=2 TuEN PRINT "Interface Errorl ER%=3 TBEN PRINT "Abort Non-system Controllerl" ER%=4 THEN PRINT "Invalid parameterel" STOP RETURN 'Timeout service routine PRINT "Interface Timeoutl" RETURN service routine PRINT "Interface SRQI" RES'=0 CALL SPOLL'(ADDR%,RES%) PRINT "BP3478A STATUS BYTES IS";RES% A=INP(IOPORT%+2) CC=0 NEXT RETURN 'End this program
PCL-848AB
User's Manual
ADVANCED PROGRAMM1N TECBNIQUES
5.1. Direct Memory AcceAs (DMA)
Direct memory acaess (DHA) improves system performance allow- external devices directly transfer information from system memory without operation system CPU. port source data read-write memory location receive data. IEEE-488 interface data transfer programmed proceed with without DMA. When DMA, IEEE-488 interface card provides number unique powerful features.
These features include ability application programs simultaneously. means data transfer between IEEE-488 background operated. Selection operating modes single byte transfer mode block transfer mode. ability IEEE-488 disk simultaneously. ability continuously transmit receive data blocks bytes without processor overhead. These features significantly improve system performance applications where high speed transfers required large blocks data must moved. This section describes works your advantage. also introduces explains <SETTING%> INIT routine described Section 3.3.7. controlled 8237 controller chip PC's system board. performs dynamic refresh, supports data transfer between floppy disks hard disks addition serving IEEE-488 interface. Like chips, 8237 chip designed perform basic function. That function transfer data between memory devices. performs transfer simultaneously addressing memory location device providing appropriate read write signals. 8237 chip four channels, four operating modes, four operating conditions. Each channel mode register that determines four operation conditions channel. These conditions are: direction transfer (input output).
CHAPTER ADVANCED PROGRAMM1N TECBNIQUES
operating mode (single, demand, block, cascade). Autoinitialization (enabled disabled). Address register direction (increment decrement).
little additional explanation required understand these operating conditions. This interface allows choose from three four possible channels. Channel used PC's memory refresh controller, channels only ones available peripherals. <SETTING%> INIT rout+ne make this selection. interface supports four possible operating modes: Single-byte-transfer mode single-byte-transfer mode, chip system processor share control system bus. This allows both processing continue simultaneously. Hlock-transfer mode block-transfer mode, transfers activated request service continue until number bytes specified programmer transferred. blocktransfer mode control system returned microprocessor only after data transferred.
Demand-transfer mode Cascade mode supported this interface. IEEE-488 interface disables auto-initialization function uses only address register increment direction 8237 chip because nature IEEE488 data transfer. <SETTING%> INIT routine determines operating mode. Setting lets operate single-byte-transfer mode rate high throughput. Setting lets operate blocktransfer mode high rate throughput. <SETTING%> INIT routine determines sequence software handle DMA. When "0", software waits completion before goes further. When "1", software initializes then goes away. also called BACXGROUND operation. When data transfer timing related with software, BACKGROUND operation cannot used.
PCL-848AB
User's Manual
operation this IEEE-488 interface quite transparent users. Once select mode calling INIT routine, further data transfer proceeds this mode. Bowever, when select block-transfer mode, channel memory refresh held long enough corrupt memory content. block-transfer mode unless have confidence that data transfer will completed within time limits memory refresh. When using background operation, does care about data transfer. data string terminated byte count only. data format problem then must handled users. safe single-byte-transfer non-background operation mode (the default condition). other modes used only when have solid understanding 8237 chip your IEEE-488 devices. recommend using these modes.
CHAPTER ADVANCED PROGRAMM1N TECBNIQUES
5.2. Transfer Speed
data transfer speed determined several factors: instruction execution speed computers. (4.77 PC/XT PC/AT software overhead. interface chip operating speed. clock rate chip. MBz) operating mode. operating speed other processors that occupying data bus. (e.g. 8087 coprocessor) speed handshake peripheral devices. IEEE-488 cable length capacitance.
Factors nature Factors determined your choice devices cables. factor choose block-transfer mode maximum speed with risk that hung. factor interface driver routine written with effort maximize execution speed handling overhead effectively. factor NEC7210 chosen because interface chip that operate handshaking with speeds. user choose appropriate speed according actual situation setting <SETTING%> when calling INIT routine. This setting will change handshake timing
Speed
Slow Fast
PCL-848AB
User's Manual
5.3. Interrupt
interface capability interrupt PC's processor when certain event happen. Dowever, most version BASIC language MS-DOS operating system only handles interrupts from keyboard, light pen, communication port, game port BASIC error. interrupt capability BASIC, software replace Function interrupts some ERROR's inform BASIC that there interrupt from IEEE488 interface. When these interrupts enabled, Function Keys cannot used their normal mode program will confused.
EVENTS ERROR
INTERRUPT Error. This interface detects error. error number 128. Check 3-3-18 STATUS routine error type. Timeout. IEEE-488 handshake hung. SRQ. IEEE-488 line pulled active some device.
default condition disables these interrupts. enable these interrupts, must bits 9,10 SETTING' when calling INIT routine. disable enable disable enable disable enable IEEE-488 Interrupt Timeout Error Function Error
BASIC syntax claim interrupt traps
(20) GOSUB (19) GOSUB ERROR GOSUB
'Handle 'Handle Timeout 'Handle Error
interrupt handling IEEE-488 interface software written BASICA Version A3.0 A3.3 only. Since other BASIC versions have different traps Function Keys different address error number, IEEE-488 interface inter- rupt handling discussed above work.
CHAPTER ADVANCED PROGRAMM1N TECBNIQUES
5.4. Hore about SEND Command
SEND routine allows user control IEEE-488 interface directly. Therefore, some unusual functions IEEE-488 function done calling SBND. example PASSING CONTROL another device. This done executing following statements. This example passes control device SEND%=36 CND$="UNL TALK TCT" CALL SEND%(CMD$)
Some instruments secondary addressing technique. write data string secondary address with primary address program follows: SEND%=36 OUTPUT%=3 ADDR%=-1 OUTPUT pre-defined listeners D$="ABCD" CND$="UNL LISTEN CALL SEND%(CMD$) CALL OUTPUT%(ADDR%,D$)
your computer intermittently fails execute this code, having timing problem. avoid this, data from CMD$ after DATA statement.
CMD$="UNL LISTEN DATA `ABCD'"
SEND command allows program activities. IEEE-488 interface does have special functions handle PASS CONTROL secondary addressing. They done calling SEND.
PCL-848AB
User's Manual
DIGITAL OUTPUT
PCL-848A/B provides digital output channels. These digital output channels port registers address BASE+0 BASE+1. register's data format listed below. BASE (write port) byte
BASE (write port) high byte
DOll
D010
D015D014 D013 D012
fairly straight forward your PCL-848A/B digital output functions. Some areas requires your attentions assignment.
Connector (CN2) Digital Output
programming quite easy needs only BASIC statement `OUT'. example, output channels high: IOPORT%=&U2B0 IOPORT%, &hFF IOPORT%+1, &hFF
CHAPTER DIGITAL OUTPUT
TBEORY OPERATION
7.1. Introduction
This section describes operation theory this IEEE-488 interface card. thorough understanding theory will increase usefulness help avoid future problems.
7.2. Block Diagram Description
Figure 7.1. block diagram this interface card. interface transfers data bi-directional fashion between PC-Bus IEEE-488 instrument bus. IEEE-488 driver stored on-board ROM. When application program calls driver, driver routines generates necessary command sequence then transparently passes data string from device. major elements this card interconnected data bus. When IEEE-488 driver routine called, starts routine stored ROM. driver routine controls IEEE-488 INTERFACE CONTROLLER execute necessary command sequence. on-board storage interface parameters, such IEEE488 address controller. IEEE-488 INTERFACE CONTROLLER chip which provides interface between microprocessor system IEEE488 interface bus. This controlled configured through 8-bit mapped registers enables aspects IEEE-488 standard implemented, including talker, listener controller functions. When computer executes data output from device, driver routine writes data byte IEEE-488 interface controller chip chip will handshake byte IEEE-488 driver/receiver. When entering data from device, driver routine sets IEEE-488 interface controller chip accept data waits handshake completed. data byte received driver/receiver then into system memory.
PCL-848AB
User's Manual
Fig. 7-1`PCL-848A/B Block Diagram
CHAPTER
TBEORY OPERATION
TROUBLESHOOTING
8.1. Introduction
This section provides information maintaining, troubleshooting repairing IEEE-488 interface card.
8.2. Periodia Maintenance
IEEE-488 interface card internal adjustment does require periodic calibration. Bowever, following actions recommended preventive maintenance once-a-year basis more often, high humidity environments). IEEE-488 connector (CN1) golden fingers slot should cleaned prevent dirt build-up. Spray contacts lightly with good contact cleaner, such trichflorethlyene cotton swab dirt excess cleaner.
8.3. Troubleshooting Procedure
majority problems poor cabling, contacts incorrect device programming. remedy these problems keep connector golden fingers clean tight also read each device's manual gain understanding unique initialization setup requirements. other problems, troubleshooting guide lists symptom, probable cause suggested corrective action.
PCL-848AB
User's Manual
SYmDtom Computer hangs when calling driver routine
Possible Fault connections between golden fingers slot
Check Clean golden fingers
On-board firmware address switch setup same software setup
Change switch setup softis ware
firmware address address setconflict with other add-on cards
Change firmware address settings tings
Instrument does response
Wrong instrument address connections Wrong instrument programming sequence
Instrument address setting Check data with analyzer Verify with instrument manual
Instrument hangs when sending data
Instrument output control
Send instrument Selective Device Clear
Instrument output terminates wrong characters
procedure change terminator
Change instrument terminator possible
CHAPTER TROUBLESHOOTING
8.4. Part List
Item C1-C6, C8-C21 C7,C22, RP1,RP3 OSC1 U1,U5 U8,U12, U15,U17 U16,U18 Description microfarad capacitors microfarad capacitors picofarad capacitor resistor resistor Rohm resistor array pin) Kohm resistor array pin) 74LS273 74LS08 74LS126 74LS04 74LS164 74LS138 PEEL 18CV8PC-25 75160A 75162B SRAM, 150ns GP-IB Interface Controller NEC7210C EPROM 150ns, 74LS244 NEC2764 Equ. NEC4016C-3 Equ.
PCL-848AB
User's Manual
Item SW1,SW2 JP1,JP2
Description 74LS245 switches pins) Slide switch headers header
ribbon connector (IEEE-488) PCL-848A type connector (IEC-625) PCL-848B header with socket
CHAPTER TROUBLESHOOTING
TUTORIAL
9.1. General DeBCriPtiOn
IEEE-488 easy allows great flexibility data communications between independent devices. These features have made world's most popular methods connecting multiple devices interface. IEEE-488 bus's popularity comes from ability interface between computer computer's peripherals. Every interface should handle hardware book keeping timing while maintaining four areas compatibility between computer peripherals. These areas include:
Electrical
insure proper voltage current requirements.
Mechanical connector physically connect computer peripherals. Functional hardware software convert computer data data vice versa.
Operational commands data interpreted similar ways devices system.
This interface card implements IEEE-488 interface standard does these well. Electrically, this card uses IEEE-488 drivers that designed drive long cables receive noisy data without error. data, address, control interface between board been designed minimum current loading maximum speed. Mechanically, connector that identical other connectors IEEE-488 standard. This allows devices quickly easily added removed from system. connector designed withstand over 1000 insertions provide maximum electromagnetic radiation protection when used with shielded cable. Functionally, this card provides complete computer peripheral interface using IEEE-488 controller chip. IEEE-488 chip provides complete compliance with latest update IEEE-488 standard. Full compliance with interface standard means that control IEEE-488 compatible peripheral become device that controlled other computers. send data multiple devices simultaneously instruct devices send data each without supervision computer. Full compliance means that fourteen devices attached interface card. Multiple inter face cards used
PCL-848AB
User's Manual
Operationally, interface thoughtfully supported with professional software support package. software provides high level language extensions that support IEEE-488 data command transmission reception. function mnemonics identical those found IEEE-488 standard. These mnemonics used most manufacturers IEEE-488 compatible equip ment. solve your interface problems need standard that goes beyond hardware software provide consistency between different equipment manufacturers. world's largest manufacturers instrumentation, computers, computer peripherals have chosen IEEE-488 means transferring information between dissimilar devices. This gives ability attach printer from manufacturer, plotter from another, instruments from third know that system will work. When compare this number serial parallel interface cards would take support fifteen incompatible peripherals, decision IEEE488 becomes obvious. IEEE-488 carefully defined instrumentation interface which simplifies integration instruments, peripherals computers into systems. minimizes compatibility problems between devices sufficient flexibility accommodate future products. been formally accepted International Electrotechnical Commission (I.E.C.), international standard, Institute Electrical Electronic Engineers (I.E.E.E.) American standard. IEEE-488 employs line interconnect instruments. This normally sole communication link between interconnected units. Each instrument connected parallel lines bus. Eight lines used transmit data remaining eight used communication timing control. Data transmitted eight data lines series eightbit characters referred "bytes". Normally, seven-bit ASCII (American Standard Code Information Interchange) code used with eighth available parity check, desired. Data transferred means interlocked "handshake" technique. This sequence permits asynchronous communication over wide range data rates. Communication between devices IEEE-488 employs three basic functional elements listed below. Every device must able perform least these functions: LISTENER. device capable receiving data from other devices. Typical listeners printers, programmable power supplies, programmable signal generators like.
CHAPTER
TUTORIAL
TALKER. device capable transmitting data other devices. Typical talkers voltmeters,counters, audio analyzers many other measurement instruments. CONTROLLER. device capable managing communications over IEEB-488 such addressing sending commands. with IEEE-488 interface typically controller. IEEE-488 system allows only device time active talker, allows multiple listeners receiving same data same time. Only controller active time.
9.2. Structure
IEEE-488 lines including ground return lines shield line. lines with signals data lines, handshake lines management lines. 9.2.1. IEEE-488 Connector Assignment IEEE-488 standard uses ribbon connector standard signal assignment
DATA Lines -DIO1 DI02 DI03 DI04 DI05 DI06 DI07 DI08
MANAGEMENT Lines -IFC HANDS8AKE Lines -DAV NRFD NDAC
PCL-848AB
User's Manual
9.2.2. IEC-625 Connector Assignment IEC-625 standard uses type connector standard signal assignment DATA Lines -DIO1 DI02 DI03 DI04 DI05 DI06 DI07 DI08 MANAGEMENT Lines -IFC HANDSHAKE Lines -DAV NRFD NDAC
9.3. Management Lines
active controller manages communications. state line, driven controller, determines whether data data lines will interpreted command received other devices data. When true, IEEE-488 COMMAND mode. Otherwise, DATA mode. COMMAND mode controller active other devices waiting instructions. COMMAND mode instructions which issued controller include: Talk Address. byte transmitted controller enables specified device talk. Only device talker time. When talker assigned, disabled. Listen Address. byte transmitted controller enables specified device listen. IEEE-488 allows multiple listeners. When listeners assigned, listeners still active. Universal Commands. devices will respond these commands whether they addressed not. Address Commands. These commands recognized only devices that addressed listeners. commands recognized only talker. Unaddress Commands. ASCII unaddresses listeners that have been previously addressed listen. This command called "Unlisten" (UNL). ASCII unaddresses talker that been previously addressed talk. This command called "Untalk" (UNT).
CHAPTER
TUTORIAL
9.4. Commands
COMMAND mode, commands placed sent devices. These commands have same meaning regardless kind device. Each device designed respond those commands that have useful meaning device will ignore others. operating manual each device will state those commands recognize. Command Table Type -Universal Universal Universal Universal Universal Address Address Address Address Address Unaddress Unaddress Mnemo -LLO Purpose -Local Lockout. Disable front panel local devices. Device Clear. devices known state. Parallel Poll Unconfigure. Serial Poll Enable. Serial Poll Disable. Selective Device Clear. Clear listeners known state. Local. listeners into local mode. Group Execute Trigger. Trigger listeners bus. Parallel Poll Configure. Configure device respond parallel poll. Take Control. Transfer control another device. Unlisten. Unaddress current listeners. Untalk. Unaddress current talker.
9.5. Servioe Request Serial Polling
Some IEEE-488 devices have ability request service from controller. device request service when completed measurement, when detected critical condition, other reasons. IEEE-488 device requests controller service setting line low. controller determine when service request will serviced. following sequence used respond service request: controller checks presence service request.
PCL-848AB
User's Manual
service request present, controller sets serial poll mode. serial poll mode initiated controller sending command (Serial Poll Enable). controller sequentially polls those devices that have requested service. Each polled device responds with status byte. controller then checks (weight byte service requested this device. each device that requested service, controller takes appropriate action. When devices have been polled, controller terminates serial poll mode issuing command (Serial Poll Disable). full sequence operations necessary cases. reason request simple controller knows action, serial polling necessary. software convenience, controller sends just after status byte read computer.
9.6. Parallel Polling
Parallel polling permits status eight devices checked simultaneously. Each device assigned data line (DIO1 DI08) during parallel poll configure. When controller conducts parallel poll (ATN same time), device sets assigned data line high indicate requires service. more than eight devices used with their parallel poll capability, some them share data line. Very instruments have capability respond parallel poll. Therefore, neglect parallel poll only study when becomes necessary.
9.7. Code Summary
code assignment shown table next page. These assignments apply only command mode. data mode there specific code assignments data strings recognized devices which receive data. codes labeled "Primary Command Group" codes commonly used communicate bus. "Secondary Command Group" used when addressing extended listeners talkers, enabling Parallel Poll Mode (PPE).
CHAPTER
TUTORIAL
PCL-848AB
User's Manual
9.8. Randshake Lines
Each character byte transferred data lines employs three wire handshake sequence. This sequence following characteristics:
Data transfer asynchronous. Data transferred rate suitable devices operating bus. devices wait others complete byte transfer. Devices with different input output speeds interconnected. Data transfer rate determined slowest active device. Multiple devices accept data same time.
following definitions used when discussing IEEE-488 bus: SOURCE. device sending information either command data mode. TALKER. device addressed talk data mode. ACCEPTOR. device receiving information either command data mode. LISTENER. device addressed listen data mode.
handshake lines have following name meaning: Data Valid NRFD Ready Data NDAC Data Accepted
handshake timing sequence shown following:
CHAPTER
TUTORIAL
Handshake Timing Sequence
PCL-848AB
User's Manual
9.9. Other Lines
three remaining lines are: (Remote Enable) system controller sets then addresses devices listen before they will operate under remote control. (Interface Clear) Only system controller activate this line. When true, talkers, listeners active controllers their inactive states. (End Identify) This line used indicate multiple byte transfer sequence conjunction with ATN, execute parallel poll sequence.
9.10. Operating Considerations
When device powered during system operation, activate cause active controller halt with error. controller must send regain active control. Prior addressing listeners recommended that previous listeners unaddressed using command (?). only talker addressed time. When talker addressed former talker automatically unaddressed. maximum cumulative length IEEE-488 cable system must exceed more than meters cable device meters, whichever less, unless Expanders Extenders used. more information about IEEE-488 bus, please refer IEEE reference document.
CHAPTER
TUTORIAL
ASCII TABLE
CHAR NULL BELL SYNC BINARY 0000000 0000001 0000010 0000011 0000100 0000101 0000110 0000111 0001000 0001001 0001010 0001011 0001100 0001101 0001110 0001111 0010000 0010001 0010010 0010011 0010100 0010101 0010110 0010111 0011000 0011001 0011010 0011011 0011100 0011101 0011110 0011111 COMMAND CHAR SPACE BINARY 0100000 0100001 0100010 0100011 0100100 0100101 0100110 0100111 0101000 0101001 0101010 0101011 0101100 0101101 0101110 0101111 0110000 0110001 0110010 0110011 0110100 0110101 0110110 0110111 0111000 0111001 0111010 0111011 0111100 0111101 0111110 0111111 COMMAND LA10 LA11 LA12 LA13 LA14 LA15 LA16 LA17 LA18 LA19 LA20 LA21 LA22 LA23 LA24 LA25 LA26 LA27 LA28 LA29 LA30
PCL-848AB
User's Manual
CHAR
BINARY 1000000 1000001 1000010 1000011 1000100 1000101 1000110 1000111 1001000 1001001 1001010 1001011 1001100 1001101 1001110 1001111 1010000 1010001 1010010 1010011 1010100 1010101 1010110 1010111 1011000 1011001 1011010 1011011 1011100 1011101 1011110 1011111
COMMAND TA10 TAll TA12 TA13 TA14 TA15 TA16 TA17 TA18 TAl9 TA20 TA21 TA22 TA23 TA24 TA25 TA26 TA27 TA28 TA29 TA30
CHAR
BINARY 1100000 1100001 1100010 1100011 1100100 1100101 1100110 1100111 1101000 1101001 1101010 1101011 1101100 1101101 1101110 1101111 1110000 1110001 1110010 1110011 1110100 1110101 1110110 1110111 1111000 1111001 1111010 1111011 1111100 1111101 1111110 1111111
COMMAND SC10 SCll SC12 SC13 SC14 SC15 SC16 SC17 SC18 SCl9 SC20 SC21 SC22 SC23 SC24 SC25 SC26 SC27 SC28 SC29 SC30 SC31
CHAPTER
ASCII TABLE
NEC7210 RBAD WRITE REGISTSR
Read Register Data Status Status Serial Poll Address Contents
SRQI PEND
LOKC REMC ADSC
SPMS LPAS TPAS
MJMN
Command Pass CPT7 CPT6 CPT5 CPT4 CPT3 CPT2 CPT1 CPT0 Through Address Address AD50 AD40 AD30 AD20 AD10 AD51 AD41 AD31 AD21 AD11
Write Register Hyte Interrupt Mask Interrupt Mask Serial Poll Address Mode Auxiliary Mode Address String
Contents
SRQI DMAO DMAI
LOKC REMC ADSC Mode
TRM1 TRM0
ADM1 ADM0
CNT2 CNT1 CNT0 COM4 COM3 COM2COM1 COM0
PCL-848AB
User's Manual
SUMMARY IEEE-488 LIBRARY FUNCTIONS
Routins ABORT DEVCLR DEVICE ENTER ENTERA Offset Parameters None ADDR% ADDR%,PORT% ADDR%,D$ ADDR%,DATASEG%, LENGTB% ADDR%,OVTEOL%, OUTEOL$,INEOL%, INEOLBYTE% INIT IOPORT%,MYADDR%, SETTING% LOCAL OUTPUT OUTPUTA None ADDR% ADDR%,D$ ADDR%,DATASEG%, LENGTB% PPOLL PPOLLC PPOLLU RENOTE SEND RESPONSE% ADDR%,CONFIG% ADDR% ADDR% CMD$ Initializes interface sets parameters. Local Lockout. Sets device local mode releases line. Outputs data device. Outputs long string data device. Parallel Poll. Parallel Poll Configure. Parallel Poll Unconfigure. Sets device remote mode sets line. Sends IEEE-488 mnemonics commands bus. Activity Aborts activity pulsing line. Device clear selective device clear. Replaces LPTn: COMn: port with IEEE-488 device. Enters data from device. Enters long string from device. Sets terminators input output string device
CHAPTER SUMMARY IEEE-488 LIBRARY FUNCTIONS
Routins SPOLL STATUS TIMEOUT TRIGGER ERRPTR
Offset
Parameters ADDR%,RESPONSE% CONDITION%,5% ADDR% IOERR%,IOCOUNT%
Activity Serial Poll. Reads status interface. Sets timeout interval. Triggers device devices Assign variables error number count string bytes.
PCL-848AB
User's Manual

Other recent searches


RE46C140 - RE46C140   RE46C140 Datasheet
KRX104U - KRX104U   KRX104U Datasheet
K4H510438G - K4H510438G   K4H510438G Datasheet
K4H510838G - K4H510838G   K4H510838G Datasheet
K4H511638G - K4H511638G   K4H511638G Datasheet
CED4201 - CED4201   CED4201 Datasheet
CEU4201 - CEU4201   CEU4201 Datasheet
BSS78 - BSS78   BSS78 Datasheet
AP3003 - AP3003   AP3003 Datasheet

 

Privacy Policy | Disclaimer
© 2012 Datasheet Archive