Tektronix SP232 User Manual
Tektronix SP232 User Manual

Tektronix SP232 User Manual

Serial extended function module (for 1502b/c, 1503b/c mtdrs)

Advertisement

Quick Links

A l l t e s t I n s t r u me n t s , I n c .
5 0 0 C e n t r a l A v e .
F a r mi n g d a l e , N J 0 7 7 2 7
P : ( 7 3 2 ) 9 1 9 - 3 3 3 9
F : ( 7 3 2 ) 9 1 9 - 3 3 3 2
a l l t e s t . n e t
s s a l e s @ a l l t e s t . n e t
T h e t e s t & me a s u r e me n t
e q u i p me n t y o u n e e d a t
t h e p r i c e y o u w a n t .
A l l t e s t c a r r i e s t h e w o r l d ' s l a r g e s t s e l e c t i o n o f
u s e d / r e f u r b i s h e d b e n c h t o p t e s t & me a s u r e me n t
e q u i p me n t a t 5 0 % t h e p r i c e o f n e w .
O O u r e q u i p me n t i s g u a r a n t e e d w o r k i n g , w a r r a n t i e d , a n d
a v a i l a b l e w i t h c e r t i f i e d c a l i b r a t i o n f r o m o u r i n - h o u s e s t a f f
o f t e c h n i c i a n s a n d e n g i n e e r s .
• 1 0 + f u l l t i me t e c h n i c i a n s w i t h o v e r 1 5 0 y e a r s o f
s p e c i a l i z a t i o n
• 9 0 d a y w a r r a n t y & 5 d a y r i g h t o f r e t u r n o n a l l
e q u i p me n t
• • 1 - 3 y e a r w a r r a n t i e s f o r n e w a n d
p r e mi u m- r e f u r b i s h e d e q u i p me n t
• E v e r y u n i t t e s t e d t o O E M s p e c i f i c a t i o n s
• S a t i s f a c t i o n g u a r a n t e e d
Y o u h a v e p l a n s , w e w i l l h e l p y o u a c h i e v e t h e m.
A n y p r o j e c t . A n y b u d g e t .
t
G e t a q u o t e t o d a y !
C C a l l ( 7 3 2 ) 9 1 9 - 3 3 3 9 o r e ma i l s a l e s @a l l t e s t . n e t .

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SP232 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Tektronix SP232

  • Page 1 T h e t e s t & me a s u r e me n t e q u i p me n t y o u n e e d a t t h e p r i c e y o u w a n t . A l l t e s t I n s t r u me n t s , I n c .
  • Page 2 User Manual SP232 Serial Extended Function Module (for 1502B/C, 1503B/C MTDRs) 071-0467–00 First Printing: October 1998...
  • Page 3 Copyright E Tektronix, Inc. 1998. All rights reserved. Tektronix products are covered by U.S. and foreign patents, issued and pending. Information in this publication supercedes that in all previously published material. Specifications and price change privileges reserved. Printed in the U.S.A.
  • Page 4: Warranty

    WARRANTY Tektronix warrants that this product will be free from defects in materials and workmanship for a period of one (1) year from the date of shipment. If any such product proves defective during this warranty period, Tektronix, at its option, either will repair the defective product without charge for parts and labor, or will provide a replacement in exchange for the defective product.
  • Page 6: Table Of Contents

    ........2–6 150XB/C MTDR and SP232 Command Sets 15XB/C MTDR’s and SP232 Monitor Instructions .
  • Page 7 ........3–12 150XB/C MTDR and SP232 Instruction Sets Level 1 – Monitor .
  • Page 8: Safety Summary

    General Safety Summary Operator Safety Summary Power Source The SP232 module is designed to operate from power supplied by the host instrument. Grounding the Instrument This product is grounded through the parent instrument. A protective ground connection is essential for safe operation.
  • Page 9: Service Safety

    General Safety Summary Service Safety For Qualified Service Personnel Only Disconnect the instrument from its power source before removing covers, and before soldering/desoldering components. SP232 User Manual...
  • Page 10: Operating Instructions

    Operating Instructions...
  • Page 12: Overview

    Domain Reflectometers (MTDRs). In this manual, all four MTDRs are collectively referred to as 150XB/C. The SP232 allows the 150XB/C to be controlled by an external host computer or other DTE (Data Terminal Equipment) device that uses RS232-C serial protocol. The SP232 acts as a DCE (Data Commu- nications Equipment) device.
  • Page 13: Serial & Parallel Communication

    SP232 module; or through parallel protocol without the module. The actual information communicated, however, is the same. The most common method is by using the SP232 module, and serial protocol which is compatible with most computer systems. The less common parallel method requires a customer-supplied parallel interface cable that connects the 150XB/C to the host computer.
  • Page 14 Operating Instructions The SP232 sends and receives data bytes with 1 start bit, 8 data bits and 1 stop bit. Transmit and receive baud rates are the same and may be set at 300, 600, 1200, 2400, 4800, 9600 or 19200 baud.
  • Page 15: Sp232 Setup

    Port on the front panel. Turn the locking latch clockwise to lock the SP232 in place. 2. Connect the SP232 to the serial port of the host computer using a standard RS232 cable. A female RS232 connector is located on the front panel of the SP232.
  • Page 16: Options

    The following local commands configure the SP232 to accommodate host computer software. In order to invoke the commands, the SP232 must be installed in the 150XB/C; connected via the RS232 cable; the host computer and 150XB/C must be powered-up. The commands may be invoked whether the 150XB/C is making measurements or not.
  • Page 17: Set Response Mode

    <opcode>: <arg1>: Single-Byte Argument 00h – Wait for request (default). SP232 waits for ID byte (*) then sends directive before sending responses from 150XB/C to computer. 01h – Respond immediately. SP232 sends responses as soon as received. This requires a serial interrupt driver or very fast polled pro- gram to catch the responses.
  • Page 18: Sp232 Serial Protocol

    SP232 Serial Protocol...
  • Page 20: Serial Hardware Protocol

    When the host computer senses the CTS signal, it begins sending data to the SP232. The SP232 looks for an asterisk character (*) as the ID byte at the beginning of each data frame from the host computer, and ignores all other characters until an asterisk has been received.
  • Page 21: Protocol Example

    In this example the waveform query and response is described. The first byte sent to the SP232 is the query frame type which is ASCII character value 32. The second byte sent is the opcode for the waveform query which is ASCII character value 130.
  • Page 22 Because this is a hardware function, your program will see this as only a slight delay before it requests response to the waveform query. The next step is to tell the SP232 that you want a response to your query. This is done by sending another asterisk character to the SP232 through your computer’s serial port.
  • Page 23: Serial Software Protocol

    ASCII value is derived from the data bytes, and can be used to make sure that the data was not corrupted in transmission. Your program then sends an asterisk character to tell the SP232 that you want to communicate. The SP232 then sent back a directive byte which told your program the kind of communication wanted by the SP232.
  • Page 24: Basic Frame Descriptions

    All data sent through the SP232 is composed into logical groups of bytes called frames. A frame may be from two to several thousand bytes, depending on frame type and amount of data conveyed.
  • Page 25: Status Frames

    CRC checksum. Status Frames The status frame is fixed length (2 bytes). This allows the SP232 to notify the host computer of a bad frame. If you receive a status frame, it means that the last frame sent from the computer to the SP232 was not understood.
  • Page 26: 150Xb/C Mtdr And Sp232 Command Sets

    150XB/C and SP232 Command Sets...
  • Page 28 The following instrument control instructions can be executed through the SP232 interface when installed in a 150XB/C instrument. In order to invoke the instructions, the SP232 must be installed in the 150XB/C; the SP232 must be connected via RS232 cable to the host computer;...
  • Page 29: Monitor Instructions

    Metric: Distance – Ul4 * 0.001 meters English: Distance = Ul4 * 0.004 feet 1503B/C Metric: Distance – Ul4 * 0.01 meters English: Distance = Ul4 * 0.04 feet <arg4>: Light Boolean: True = light on, False = light off. SP232 User Manual 3–2...
  • Page 30: Instrument Setup

    Velocity of Propagation, Hundredths Digit Byte: 0 – 9 <arg2>: Velocity of Propagation, Tenths Digit Byte: 3 – 9 <arg3>: Distance Per Division Byte: 0 – 10 The following table shows distance-per-division representations based on instrument setup: SP232 User Manual 3–3...
  • Page 31: Hardware Setup

    Sl1: Value returned represents counts of change since last reading of verti- cal scale knob. Positive indicates clockwise rotation, negative indicates counterclockwise rotation. A value of zero indicates overflow or no change. Value of 255 indicates under flow or negative 1. SP232 User Manual 3–4...
  • Page 32 2 – 100 nanosecond pulsewidth 3 – 1000 nanosecond pulsewidth 4 – auto pulsewidth 1503B/C <arg10>: Impedance Byte: the value sent means: 0 – 50 Ohm 1 – 75 Ohm 2 – 93 Ohm 3 – 125 Ohm SP232 User Manual 3–5...
  • Page 33: Waveform

    If averaging is not complete, the instrument will not send the waveform until averaging is complete. If an SP232 request is received while the instrument is waiting, it will override the previous query.
  • Page 34: Point 1

    0: ROM0 self-test bit 1: ROM1 self-test (not currently implemented) bit 2: RAM self-test bit 3: NVRAM self-test (not currently implemented) bit 4: Display RAM self-test (not currently implemented) bits 5-7: Cleared SP232 User Manual 3–7...
  • Page 35: Remote

    <opcode><arg1> <arg1>: Acquisition Status Boolean: TRUE = Acquisition disabled, FALSE = Acquisition enabled Get Byte <desc>: Query for contents of address. <query>: <opcode><arg1> <opcode>: <arg1>: Address to return byte contents Ul2: 2-byte address, low byte first SP232 User Manual 3–8...
  • Page 36: Delay

    <opcode><arg1> <arg1>: Delay Value Ul1: 1-byte value 150XB/C and SP232 Remote Instructions The remote level of operation takes remote control of instrument by: H Configuring instrument setup and front panel settings. H Enabling/disabling access to front panel controls (though the front panel controls can still be monitored using the hardware setup query from the monitor mode command set).
  • Page 37: Queries

    Distance per Division Byte: 0 – 10 The following table shows the distance-per-division representations based on instrument setup: Dist/Div Argument English (feet) Metric (meters) 1502X 1503X 1502X 1503X 1502X 1503X 0.025 0.25 0.05 0.25 1000 2000 5000 1000 SP232 User Manual 3–10...
  • Page 38 Ul2: Vertical position of trace ranges from 0 – 16383 with 8192 being approximately the center. The 150XB/C’s initial vertical position after power- up is set so that the top of the outgoing step is at center screen. SP232 User Manual 3–11...
  • Page 39: Commands

    Acquisitions are disabled until either a Sweep, Remote Off or Resume command is received. <cmd>: 10 1502B/C <opcode> <cmd>: 1503B/C <opcode><arg1> <opcode>: 021h <arg1>: Remote On or Off Boolean: TRUE = Remote On, FALSE = Remote Off SP232 User Manual 3–12...
  • Page 40 Remote is turned off. However, the instrument setup, front panel settings and stored waveform data saved when remote was turned on are not restored. These settings are lost. This permits the SP232 to configure the instrument and then turn it over for manual control.
  • Page 41 Set the 150XB/C current software (programmable) settings. <cmd>: 1502B/C <opcode><arg1><arg2>...<arg8> 1503B/C <opcode><arg1><arg2>...<arg10> <opcode>: 025h <arg1>: Velocity of Propagation, Hundredths Digit Byte: 0 – 9 <arg2>: Velocity of Propagation, Tenths Digit Byte: 3 – 9 <arg3>: Distance per Division Byte: 0 – 10 SP232 User Manual 3–14...
  • Page 42 Vertical Scale Ul1: Vertical scale which is value of instrument gain applied to incoming signal. Value is dependent on instrument setup. This value is the absolute vertical scale and does not reflect any vertical scale reference offset. SP232 User Manual 3–15...
  • Page 43 A sweep must occur following this com- mand to accurately reflect the cursor change. <cmd>: <opcode><arg1> <opcode>: 027h <arg1>: Distance Units to Cursor Ul1: Distance units to cursor is sent. Dependent on horizontal scale instru- ment setup. SP232 User Manual 3–16...
  • Page 44 Ul1: Data Delay <desc>: Sets delay for transmit/receive between instrument and user interface; de- fault in power-up is 255. <cmd>: <opcode><arg1> <opcode>: 1502B/C 02dh 1503B/C 02bh <arg1>: Value of New Delay Resume IP Ul1: 1 – 255 SP232 User Manual 3–17...
  • Page 45 Command Set SP232 User Manual 3–18...
  • Page 46 150XB/C and SP232 Instruction Set...
  • Page 48: 150Xb/C Mtdr And Sp232 Instruction Sets

    150XB/C and SP232 Instruction Sets Level 1 – Monitor Instruction opcode frame type #args Instrument Setup Instrument Setup 1502X Instrument Setup 1503X Instrument Id: 1 = 1502X 2 = 1503X Vertical Scale: 1 = db 2 = mrho Horizontal Scale:...
  • Page 49 Ram bit 2: 0 = pass 1 = fail NvRam bit 3: 0 = pass 1 = fail DRam bit 4: 0 = pass 1 = fail Remote Remote state T = on F = off SP232 User Manual 4–2...
  • Page 50: Level 2 - Remote

    SW Setup Query 020h 10 (11 bytes) 1503X Vp, hundredths: [0-9] Vp, tenths: [3-9] Dist/div: [0-10] 1502X Dist/div: [0-11] 1503X Button: bit 0,1,2,3 cursor pos: [0-250] Vertical scale: 1 byte, 1 count per .25 db Filter: [0-9] SP232 User Manual 4–3...
  • Page 51 8* (9 bytes) 1502X SW Setup Cmd 025h (37) 10 (11 bytes) 1503X Vp, hundredths: [0-9] Vp, tenths: [3-9] Dist/div [0-10] Button: bit 0,1,2,3 cursor pos: [0-250] Vertical scale: 1 byte, 1 count per .25 db Filter: [0-9] SP232 User Manual 4–4...
  • Page 52 Impedance: [0-3] 1503X Cursor Command 027h (39) 1 (4 byte) Put Byte Command 02ah (42) 2 (3 bytes) address: 2 bytes value: 1 byte Delay Command 1502X 02dh (45) Delay Command 02bh (45) 1503X value: [1–255] SP232 User Manual 4–5...
  • Page 53 Instruction Sets SP232 User Manual 4–6...
  • Page 54: Miscellaneous Information

    Miscellaneous Information...
  • Page 56: 150Xb/C Mtdr Software Version Via Computer

    Bank ID byte: either 0 or 1 7FF6h Instrument ID byte: either 01 or 02 The Tektronix part numbers for programmed EPROMS are 9 digit numbers. The first three numbers (prefix) indicates programmed ROM. The middle four numbers are the base part numbers, and the last two digits are the revision control numbers.
  • Page 57: Gain/Offset Via Computer

    Before describing how to determine the zero offset point, it helps to examine the relationship between counts of offset, voltage gain, A/D and LCD pixels. The following table illustrates these relationships: Counts Offset Volts and Gain (dB) A/D Counts Pixels Change (0 dB) (6 dB) (12 dB) SP232 User Manual 5–2...
  • Page 58 A method for finding the system zero_offset value at power-up is: 1. Power-up instrument. 2. Set pulse to OFF with Acquisition Setup command. 3. Send Sweep command. 4. Read where trace is with Waveform query (8-bit values from current). SP232 User Manual 5–3...
  • Page 59 10 logarithm Finally, though the zero_offset value may vary slightly from instrument to instrument, it is constant for every instrument and can be computed only once when a 150XB/C computer system is first set SP232 User Manual 5–4...
  • Page 60: Efmcmd Demonstration Program

    The 150XB/C has now accepted a request for data. To request data: H Enter ‘r’ to request service. The EFMCMD program will show you frametype 6 accepted and the 15 bytes of data sent in response to your query. SP232 User Manual 5–5...
  • Page 61: Commands And Remote Operation

    This means that you must request a new data sweep to see the effects of your changes. Sample Programs The following programs, written in Basic, demonstrate the SP232 to a knowledgeable programmer. EFMGO.BAS Program This program demonstrates the waveform query command ’*******************************************************...
  • Page 62 ’================================================ intro: ’================================================ CLS : PRINT : PRINT PRINT ’’Short Basic Program to show SP232 serial interface at work.’’ PRINT : PRINT PRINT ’’Press the period key <.> to end program.’’ PRINT : PRINT PRINT ’’Press <s> to stop at current waveform & <g> to go again.’’...
  • Page 63 ’clear screen & draw graticule ’================================================ LINE (0, 0)-(251, 255), 1, B ’ draw border FOR x = 0 TO 251 STEP 251 / 10 ’ draw grid marks FOR y = 0 TO 255 STEP 255 / 40 SP232 User Manual 5–8...
  • Page 64: Efmcmd Program

    PRINT ’’All numbers must be entered in decimal/letters in lower’’ PRINT ’’case.’’ PRINT PRINT ’’See the software protocol description and command set sections’’ PRINT ’’of the SP232 manual for explanations of data formats &’’ PRINT ’’specific command syntax.’’ PRINT ’================================================ main: ’Main Loop of Program...
  • Page 65 INPUT ’’e-nter command, r-equest service, s-et serial port, q-uit program’’; o$ RETURN ’================================================ setserial: ’demonstrates changing SP232 Baud rates with Local command ’================================================ ’ t$ is used to temporarily store command string while baud command in q$ PRINT : PRINT ’’Current SetUp is: ’’; sp$: PRINT INPUT ’’Enter baudrate: ’’;...
  • Page 66 PRINT : PRINT ’’Frametypes are: command = 16, query = 32, local = 240’’ PRINT : INPUT ’’Enter frametype’’; c: q$ = CHR$(c) PRINT : PRINT ’’Command OpCodes are summarized in SP232 the manual.’’ PRINT : INPUT ’’Command OpCode’’; c: q$ = q$ + CHR$(c) PRINT : PRINT ’’Command length is # of bytes needed for command arguments.’’...
  • Page 67 PRINT ’’Byte’’; i - 2;’’ = ’’; ASC(MID$(d$, i,1)) NEXT i d$ = ’’ok’’ PRINT RETURN ’================================================ init: ’Reset your program code would go here... ’================================================ PRINT PRINT ’’Received Reset Directive!!!’’ d$ = ’’ok’’ BEEP RETURN ’================================================ SP232 User Manual 5–12...
  • Page 68: Parallel Protocol

    Parallel Protocol...
  • Page 70: Overview

    150XB/C and host computer without using an SP232 module. All commands and instructions remain the same as when using an SP232 module. Note: In order to use the 150XB/C in parallel communication mode, you must have a parallel interface cable that attaches between the 150XB/C Option Port connector and the host computer.
  • Page 71: Parallel Interface Cable Pinouts

    3. Power-up the 150XB/C. Power-up the host computer. Use the host computer as the controlling device. Protocol, commands, instructions, etc. are the same as described for SP232 serial communication mode except where noted in this chapter. Parallel Interface Cable Pinouts...
  • Page 72: Hardware Protocol

    (Data lines are driven by a 74HC245 and are pulled down by 10K at the Option Port interface) Output only (generated by 150XB/C): least significant address bit address bit address bit SP232 User Manual 6–3...
  • Page 73 19 & 21 +5 switched +5 volts supply (100 ma) ret5 + 5 volt return line Tektronix Proprietary DO NOT USE 2, 4, 26 The general timing relationships of the control signals is diagrammed with reference to the 5 MHz instrument clock below (although the clock is not ported).
  • Page 74: Master/Slave Handshake

    0 and then write a directive byte to address 0 of the Option Port device. The identification numbers are arbitrary and assigned by Tektronix. The directive byte indicates what action the device must perform. The possible actions are:...
  • Page 75: Accept Frame Sequence

    < 10 milliseconds 1 < x < 500 microseconds 1 < x < 50 microseconds 1 < x < 50 microseconds 100 < x < 250 microseconds 100 < x < 300 microseconds (typically 200) SP232 User Manual 6–6...
  • Page 76: Send Frame Sequence

    1 < x < 50 microseconds 1 < x < 50 microseconds x < 10 milliseconds 10 < x < 11 milliseconds 1 < x < 50 microseconds 1 < x < 100 microseconds 150 < x < 200 microsecond SP232 User Manual 6–7...
  • Page 77: Software Protocol

    The second level of operation is taking complete remote control of the instrument. In this mode the instrument front panel is locked out (the front panel controls may still be monitored). The instrument SP232 User Manual 6–8...
  • Page 78: Basic Frame Description

    The FIO demonstration program is an interactive way to test commands when in parallel communication mode. The program is useful for testing individual commands and for learning how data frames used in the protocol are constructed. SP232 User Manual 6–9...
  • Page 79 The 150XB/C has now accepted request for data. To request the data: H Enter ‘r’ to request service. H Enter ‘r’ for a response from the 150XB/C. The FIO program will show you frametype accepted and the 10 bytes of data sent in response to your query. SP232 User Manual 6–10...
  • Page 80: Commands And Remote Operation

    The program then branches to the correct routine to handle that directive. The reset directive indicates that the 150XB/C has reset its internal variables (such as at power-on). This means that pending requests for SP232 User Manual 6–11...
  • Page 81: C Version Of Program

    SP232 User Manual 6–12...
  • Page 82 150XB Option Port Protocols\n"); printf("\n\nS. Simpson 4 July 1987\n\n"); printf("\nR Request Service from 150XB"); printf("\nE Edit Commands."); printf("\nQ Quit\n"); printf("\nEnter Selection letter "); scanf("%1s", &ch); return(toupper(ch)); editcommand() system("cls"); printf("\nCommand Definition Section\n"); SP232 User Manual 6–13...
  • Page 83 1); ftype = getbyte(); switch(ftype) case 0x10 : case 0x20 : case 0x30 : command = getbyte(); leni = (command & 128) ? 'V' : 'F'; break; case 0x40 : command = getbyte(); ilen = 0; SP232 User Manual 6–14...
  • Page 84 (ftype == 0x50) out[index] = data; crc = 2 * crc; crc = (crc + (crc / 256) + data) & 255; if(leni == 'V') data = getbyte(); if(data != crc) printf("%s %d\n", "CRC should have been ", crc); SP232 User Manual 6–15...
  • Page 85 %s %d\n", "frame type = ", ftype); printf(" %s %d\n", "command = ", command); for(index = 1; index <= olen; index++) printf(" %d %s %d\n", index," data = ",out[index]); if (ftype == 0x50) printf("\nTest Frame!\n"); SP232 User Manual 6–16...
  • Page 86 = getbyte(); switch(directive) case 7: case 5: acceptframe(); break; case 6: case 4: sendframe(); break; case 2: resetit(); break; default: printf(" %s %d","Illegal Directive!!!", directive); printf("\nPress space bar to return to Main Menu "); SP232 User Manual 6–17...
  • Page 87: Pascal Version Of Program

    /* set IR high unassertted again Pascal Version of Program { output is data from computer to 150XB/C { input is data from 150XB/C to the computer program fio; const Maxbytes = 550; Padr = 768; DevID = 129; SP232 User Manual 6–18...
  • Page 88 128); { test for seventh bit set } end; { putbyte } function getbyte: integer; byte: integer; begin byte := port[Padr]; repeat byte := port[Padr+2]; until odd(byte div 32); { test for third bit set } getbyte := port[Padr]; end; { getbyte } SP232 User Manual 6–19...
  • Page 89 := ch; ClrScr; end; { menuchoice } procedure editcommand; index:integer; ch:char; begin writeln; writeln('Command Definition Section'); writeln; write('Enter Op Code? '); readln(opcode); write('Enter F for fixed or V for variable length command? '); readln(leno); SP232 User Manual 6–20...
  • Page 90 128) then leni := 'V' else leni := 'F'; { above are also conditions for ftypes of COMMAND, QUERY and RESPONSE } case ftype of STATUS : begin ilen := 0; leni := 'F'; end; SP232 User Manual 6–21...
  • Page 91 <> crc) then writeln('CRC should have been ', crc); end; writeln; writeln('frame type = ', ftype); writeln('command = ', opcode); writeln; for index := 1 to ilen do writeln(index,' data = ',indat[index]); if (ftype = TEST) then writeln('Test Frame!'); writeln; SP232 User Manual 6–22...
  • Page 92 = ', opcode); writeln; for index := 1 to olen do writeln(index,' data = ',outdat[index]); if (ftype = TEST) then writeln('Test Frame!'); writeln; write('Press <Enter> to return to Main Menu '); readln(ch); end; { sendframe } SP232 User Manual 6–23...
  • Page 93 := 192; { set 8255 to mode 2 } port[Padr+3] := 1; { set IR high unasserted } repeat item := menuchoice; case item of 'R','r': requestservice; 'E','e': editcommand; end; { case item of } SP232 User Manual 6–24...
  • Page 94: Basic Version Of Program

    390 IF D = 2 THEN GOTO 1170 ' reset directive 400 BEEP : PRINT : PRINT "illegal directive!" 410 PRINT "Enter Directive to use "; : INPUT D : PRINT : GOTO 350 420 RETURN ' should never get to here SP232 User Manual 6–25...
  • Page 95 730 Q = 2 * Q : Q = (Q ((Q AND 256) = 256) + D) AND 740 ' PRINT I;" Data received = ";HEX$(D) 750 NEXT I 760 IF (C AND 128) = 0 THEN GOTO 800 ' not variable length 770 GOSUB 1100 : Q1 = D SP232 User Manual 6–26...
  • Page 96 1080 S = INP(&H302) : IF (S AND 128) = 0 THEN GOTO 1080 1090 RETURN 1100 ' wait for 150XB/C to write us a byte 1110 D = INP(&H300) 1120 S = INP(&H302) : IF (S AND 32) = 0 THEN GOTO 1120 SP232 User Manual 6–27...
  • Page 97 Parallel Protocol 1130 D = INP(&H300) 1140 RETURN 1170 ' reset routine 1180 RETURN 1190 ' Clean up & exit the program 1200 OUT &H303, 1 'put IR line back to high 1210 SYSTEM 1220 END SP232 User Manual 6–28...

Table of Contents