The text of a manual · part 21 of 28
Troubleshooting Nuclear Instruments, pages 201 to 210
Pages 201 to 210 of 273
The original document is the PDF (12 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
Filed in the catalog under the Camac Output register Driver CAMAC
Page 201
-5-
Chapter 10
The path control requirements have been met in the null-modem cable. As we have mentioned above, two different types of devices (DTE and DCE) are existing, so we have to ASCERTAIN THE "SEX" OF THE EQUIPMENT before we can connect them together. The best way to determine whether an equipment using RS-232 ports is configured to emulate DTE- or DCE-provided signals, is to review the device documents. Consult the user's manual for this information. If documentation is not available, a break-out box may be used to determine which leads are provided by a device. For specifications of a break-out box, see Chapter 3, Section 3.2.17. Connect the break-out box to the RS-232 port and make sure that the device is powered and the port in question is active or enabled. The LED's on the box should display which leads are being generated from the device. From this display a determination can generally be made as to whether the device is emulating DCE or DTE; green LED's indicate negative voltage, red LED's indicate positive voltage . REMEMBER;
RS-232 output levels for LOGIC 0 (SPACE) between +5V to +15V LOGIC 1 (MARK)
between -5V to -15V
RS-232 input levels for LOGIC 0 (SPACE) between +3V to +15V LOGIC 1 (MARK)
between -3V to -15V
INPUTS are ENABLED when positive, DISABLED when negative OUTPUTS are ASSERTED when positive, FALSE when negative
We will ascertain the "SEX" of the computer first. If the PC is a DTE device, pin 2 should be the transmitter, and its negative voltage will illuminate the green LED. The receiver terminal, if left unconnected, may illuminate an LED if a pull-up resistor is present. If pin 20, Data Terminal Ready, or pin 4, Request To Send, is on, the port is more likely emulating Data Terminal Equipment and is expecting to be connected to a modem or a device emulating DCE signals. On the other hand, if the display shows that signals such as Clear To Send (pin 5), Data Set Ready (pin 6), or Data Carrier Detect (pin 8) are present, the port is probably emulating DCE and will allow a straight-through cable to be used when connecting a terminal configured as DTE, as if connecting to a modem. If you don't have a break-out box, the levels can determined by an oscilloscope or a DVM.
also be
If you want you can build up a LED Voltage Detector by yourself to test your interface pin by pin (Fig. 10.1)
(215)
Page 202
Chapter 10
-6-
Red LED FLAT SPOT
Green LED
470 ohm
V RED Fig.
BLACK
10.1: Simple LED voltage detector
To avoid confusion, it is best to use charts to show the status of the seven pins. For example, use NEC for negative, POS for p o s i t i v e . Inactive pins that illuminate neither LED should not be left blank - otherwise you may not know if you have already tested the p i n . Instead, use an X to represent any undefined logic state. Beside each number is the a b b r e v i a t i o n of its name as well as an 0 for o u t p u t and I for input. When the connector is c h a r t e d , you'll have a good idea of what control logic is being used. Two examples, one for a DTE and one for a DCE , are given. DCE:
DTE: Pin
Pin
I/O
I/O
Volts
2 TD
2 TD
3 RD
I
X
3 RD
0
NEC
4 RTS
0
POS
4 RTS
I
X
5 CTS
I
X
5 CTS
0
POS
6 DSR
I
X
6 DSR
0
X
8 DCD
I
X
8 DCD
0
X
20 DTR
0
POS
20 DTR
I
X
The important factor is that all requirements of the with regard to pins' being on or off, must be met.
(216)
ports,
Page 203
-7-
Chapter 10
You can easily test how the control inputs are working. If you apply a negative voltage (< -3V) to DSR (pin 6) of the DTE, you disable it. The cable between the d e v i c e s to be connected is important for successful implementation. However, after a cable has been b u i l t or s u p p l i e d , a n u m b e r of other items must be c o m p a r e d and set properly before the interfacing will be complete. Following, you will find a checklist for found on c o m p u t e r s and peripherals.
options generally
Item
Opt ions
Speed Flow control Parity character length # of stop bits Mode Echoplex Line feeds Transmission mode
75 bps to 19,200 bps ETX/ACK, XON/XOFF, Hardware Odd, Even , None 5, 6, 7 , 8 bits 1, 1.5, 2 Simplex, Half-Full duplex Yes, No 0, 1, 2, CR implies LF, LF implies CR Asynchronous, Synchronous Positive, N e g a t i v e
Polarity
In s u m m a r y , all items should be checked for proper optioning to p e r m i t successful installation. Both devices have to be SETUP to m a t c h each other. For example, if one d e v i c e is set to 4800 bps, the o t h e r one has to be set to the same b a u d r a t e . The same has to be done with all other items listed above. In most cases these changes can be done either by DIP-switches l o c a t e d on the i n t e r f a c e board or by software in a PC. Let us have a closer look at the basic hardware of such an interface. Normally you have data on a parallel data b u s , in most cases 8-bits wide. This data has now to be converted into a serial one which is done in a so-called USART (Universal Synchronous Asynchronous R e c e i v e r Transmitter) This c i r c u i t also takes care a b o u t the h a r d w a r e handshaking lines as shown in Fig. 10.2. RS232 29-pin connector pin W for mod«m/computer
Fig.
10.2: Parallel to serial conversion with a USART (217)
Page 204
Chapter 10
-8-
C o m p u t e r RS-232 interface supports via USART (Fig. 10.2), DTR, DSR, RTS and CIS control lines. The 25-pin connector pins are labeled from the terminal's point of view, computer labels appear on the USART. Note works with or without the control handshake lines are pulled up.
while the inverted that this interface protocol, since the input
Most of the interfaces work in this way, so you only need to define pins 2 and 3. connect the ground pins 1 and 7.
But don't forget to
Fig. 10.3 shows the widely used TTL to RS-232 converters. The receiver includes a hysteresis input to reduce its noise s e n s i t i v i t y . The + /- supply v o l t a g e for the 1488 does not have to be s y m m e t r i c . Positive voltage can range from + 7V to + 15V and the n e g a t i v e from -3 to -15v. it) «tceivtm
(«I OftlVIN
, 0 IS
MCMM-0.tf.MM in
Fig.
10.3:
Pin-out of RS-232 drivers and receivers
As a t y p i c a l example, we
MCA
35+ from Canberra.
will take the interface board of a
Fig. 10.4 shows you the where A69 is the USART, receiver.
A57 is the circuit transmitter, diagram and A67 is the
One t y p i c a l example is to connect a MCA like Canberra 35+ to a PC, in our case an I B M - c o m p a t i b l e . The MCA is set as DCE, the PC as a DTE. In this case you can use a cable w h i c h is connected s t r a i g h t through.
(218)
PC
Pin
Pin
MCA
TD
2
2
RD
RD
3
3
TD
CTS
5
5
DTR
DSR
6
6
DSR
DCD
8
8
DCD
I > pulled to +5V through 3k
Page 205
-9-
Chapter 10 aß
Fig. 10.4 :
Interface circuit diagram for the RS-232 port of a MCA 35+
(219)
Page 206
-10-
Chapter 10
ATTENTION:
1 | 1 1
Don't connect Pin 20; it can damage your driver in the PC!
Next you have to provide the options in your c o m p u t e r to the setup chosen on the serial interface in the MCA. You will find a detailed description on the setup of the interface board in the Operators Manual of the MCA. Take care: you cannot exceed a b a u d r a t e higher than 4800 b p s , because no handshake is s u p p o r t e d . Some hints if you run into trouble interface are presented in Table 10.1.
when installing your
TABLE 10.1: Partial list of p r o b l e m s with an RS-232 interface Symptom
Equipment
Cause/Remedy
No data is being displayed or printed
Terminal or printer
Check to be sure that power is on. Ensure that device is in on-line mode. RS-232 requirements may not be satisfied. Polarity of signals could be improperly set. Both devices should have the same setting. Speed of ports may not be set the same. Big difference in baudrates.
Device controller or driver circuits may be d e f e c t i v e . Cables may not be plugged snuggly into port or may be broken. Printer
Possibly out of paper.
Printer l i d , if raised,may inhibit further printing. Computer or terminal port to which printer is attached may be incorrectly configured as DCE or DTE; verify this. Printer ribbon may be d e f e c t i v e or worn o u t ; replace it .
Computer port driving the printer may not be e n a b l e d , check address of t he port.
(220)
Page 207
-11-
Chapter 10
Garbled or lost data
Terminal, printer or computer
Port speeds may not be consistent. Cable could be faulty. Character l e n g t h could be wrong. Flow control may not be occurring. Parity may be improperly set. Cable too long or too high c a p a c i t y for selected Baudrate --> max. length 15 ra!
Communicat ion line cannot be established or ma int ained
Terminal , p r i n t e r or computer
Power may be off on the device. This would disable DTR (pin 20) which should not allow the connection to be made. Device or port must be in on-line mode to keep DTR on and maintain the line. Duplex should be the same at each end. C o m p u t e r at the far end may a u t o m a t i c a l l y disconnect if it determines that the call is being made by an invalid user. Cable between the devices may be faulty or not p r o p e r l y wired.
Improper spacing Double spacing
Terminal or printer
Line feeds; see if c o m p u t e r outputs a line feed with each carriage return. If so, option for zero line feeds at the device or option the computer to only o u t p u t a carriage return.
No spacing
Terminal or printer
Computer is only o u t p u t t i n g a carriage return, while the d e v i c e is not adding a line feed. Option either the computer or the device to add a line feed with each carriage return.
If you look with an oscilloscope to the t r a n s m i t t e d or received signals, don't expect very fast leading or trailing edges. 10.4
PARALLEL INTERFACE CENTRONICS
This type of interface is mostly used to connect p r i n t e r s to a PC. Synchronization is done by STROBE pulses supplied by the t r a n s m i t t i n g d e v i c e , in our case the PC. Handshaking takes place through ACKNLG or BUSY signals. Data and all interface control signals are compatible with TTL level. Both the rise and fall times of each signal must be less than 0.2 us. As to the wiring for the i n t e r f a c e , be sure to use a twisted pair cable for each signal and never fail to complete connection on the Return side. To prevent noise e f f e c t i v e l y , these cables should be shielded and connected to the chassis of the host computer and tha p r i n t e r
(221)
Page 208
Chapter 10
-12- respectively. Interface cables should be kept as short as possible to avoid p r o b l e m s (max. length 4ra). Most of the input and o u t p u t drivers are very sensitive against connecting devices together while power is a p p l i e d . They may be damaged. Below you will find the pin assignment and description signals, seen from the p r i n t e r side, in our case an EPSON.
of
Signal Pin No.
Re t urn Pin No.
Signal
Direction
1
19
STROBE
In
Used to strobe (Latch) data in. A pulse > 0.5 us at receiving terminal is required.
2-9
20-27
DATA 1-8
In
Eight TTL-compatible data lines. Each has its own signal ground return for use w i t h twisted pair cables.
10
28
ACKNLG
Out
O u t p u t pulsed low for approx. 12 us and indicates t h a t d a t a has been received and that the p r i n t e r is ready to accept more data.
11
29
BUSY
Out
"HIGH" indicates that the p r i n t e r cannot r e c e i v e data. The signal becomes "HIGH" in the following cases: during d a t a e n t r y , d u r i n g p r i n t i n g operation, in OFF-LINE s t a t e , during printer error status.
12
30
PE
Out
A "HIGH" signals that the p r i n t e r is out of paper.
13
SLCT OUT
Out
A "HIGH" signals that the printer is in the selected s t a t e , in most p r i n t e r s pulled up to +5V through 3k3.
14
A U T O FEED XT
Out
When this input is low, the paper is automatically fed one line after print ing.
15
NC
16
0V
(222)
Description
No t used. In
Logic ground level.
Page 209
Chapter 10
-13Out
Printer chassis ground. Normally isolated from logic ground.
17
GND
18
NC
19-30
GND
In
Twisted-pair return signal ground level.
31
INIT
In
When this input is "LOW" the p r i n t e r controller is reset to its i n i t i a l state and the p r i n t buffer is cleared. A pulse of > 50us is r e q u i r e d .
32
ERROR
Out
This o u t p u t goes "LOW" when the printer is in PAPER END s t a t e , OFF-LINE s t a t e , or ERROR state.
33
GND
In
Same as pin 19 to 30
34
NC
35
ON
Out
Pulled up to +5V through 3k to i n d i c a t e the +5V supply.
36
SLCT
In
Data entry to printer is only possible when this signal is "LOW".
Not used.
Not used.
If you are going to make your own cable to connect a p r i n t e r You will find instead of a to an I B M - c o m p a t i b l e PC, be careful. 36-pin c o n n e c t o r , a 25-pin one, similar to the one used for RS-232. will help you to find the right The c i r c u i t diagram (Fig. 10.5) signals on the PC b o a r d . At the same t i m e , it will show you how a p a r a l l e l interface is b u i l t up. The 8-bit d a t a b u s is connected over t r i-s t a t e-dr iver c i r c u i t s d i r e c t to the connector. To transmit d a t a U l o , U4 , U 1 1 and U16 are used. To receive d a t a U9, U 1 6 , U8 and Ul are used. The following timing diagram (Fig. 10.5) shows you the relation b e t w e e n STROBE, DATA, ACKNLG and BUSY SIGNAL. You can check it w i t h a normal dual beam oscilloscope. As mentioned b e f o r e , it is very important that rise and fall times of each signal must be less than 0.2 us. BUSY x 05 M î(Mm)
Fig.
10.5: Parallel interface timing
(223)
Page 210
(p72)
"LS1SS rrr) a yha Bary = ad, jy, pu iy iw 42 Peter nS aA STs isetyy 4 ha M2 iy peed cart 1y BLOR Loic yz putes ~ = 1G 1d 25 Pin Ch Cy C20 ‘0 SHELL (91) oo22 uF COnmal (TOR _e - 4 , I : Cay cre ars CONS CHT] Coe, Ciel cre; C20 ; us 7 + ] T = é ASdIN (ard 279 3 LS2e% A06 60 tT) 8 4 "3 : 2 gata g i gan TS + $Oe sore 2 85 « 1 1 ft Gata 3 See (0 agyi7f2? or 1 al Gata } wyplay iv sony 22 = 29 16 tOata TB ee ae OC) weno 80g 12 Cala § npar an sn 7)*? ° : : 1 bala’ . mR mu rr i er i $_. ep 2S a tay tyape 4 Rocketeer “sy nigt ” . « ve y! 2 = $Teg et UN 5EES iat ty 22 rm 7 = fan bY (ST sy iu 1 ise ty i eto fo at Lszs0 (SetT 4) ch) $04 9 Sot yy Be be set Tt uote ashe ppt, (Stay p ter ra ve ta) rant Bk Qe iy ~SUCT tw Synz ore ps (set 1) MRL QI osuer . 15% | Lt vty iv if i] hed T aan its at zad ava eats, SO qin) tos x zara? pid Parapet fe 2, ~T ™ us LSo% “A \ 1 ve +10 £m of ae 130% OS - 180 EN L<sias Pama t Gary 3 a) i s ow 4 oa Huy >U earn wi- - - - - _¢= am 3 APD Siz Seat ay a, + (SAT tp isnt) 244 s a2 LiviiidtdiéilidtidiilihitLitiidozellidriivvaiitl?ii2vdiliivtivcgvfili.did
Fig. 10.6: IBM parallel interface
Ol ra 3deyD