OKESSIONAL APPROA M PELLETRON ACCELERATOR (An Island of Physics) ^ Video and Television which is better? 1 Fitch control for CD players 1 Colour test pattern generator ^ Background to E 2 PROMs M CUMULATIVE INDEX- 1988 Volume-7 Number-1 January-1989 Publisher: C.R. Chandarana Editor: Surendra Iyer T echnical Adviser : Ashok Dongre Circulation : J. Dhas Advertising: B.M. Mehta Production : C.N. Mithagari Address : ELEKTOR ELECTRONICS PVT. LTD. 52, C Proctor Road, Bombay-400 007 INDIA Telex: (Oil) 76661 ELEK IN CONTENTS Editorial Overseas editions : Towards the intelligent house PEUETRON-An island of physics Video and Television which is better? Computer-aided test equipment PROJECT : Pitch control for CD players PROJECT: LFA-1 50-fast power amplifier (final part) Background to E 2 PROMs Logic families compared PROJECT: Bus interface for high-resolution liquid crystal screens PROJECT: Autonomous input/output controller - Part-1 PROJECT: Composite-to-TTL adaptor for monochrome monitors Telecom News Electronics News New products Appointments Printed at : Trupti Offs Bombay -400 013 Ph. 4923261,4921354 Copyright® 1989 Elekti General Interest Looking back: updates applications and improvements for recently published projects 1-62 Radio & Television r jdinjj , PROJECT : Colour test pattern generator 1-54 Information 1 1 .05 ' Front cover The design of microcir- cuits is becoming more challenging every year. Plessey's Roborough silicon wafer fabrication plant In Plymouth produces CMOS chips that re- quire much less power than other types and are particularly suited to telecommuni- cations, computers, traffic controls and robots. Completed wafers are subjected to comprehensive testing to guarantee performance and to provide data for pro- cess control. TOWARDS THE INTELLIGENT HOUSE The rapid growth of electronics inspires us to take a look at what changes we are likely to see in domestic environments of the future. Homes will be equipped increasingly with a domestic computer terminal (put in by the builders like a sink unit). This will control the central heating, hot water supply, cooker, video, lighting, and so on. Eventually, there will be a fully automated kitchen that will carry out most of the Irksome tasks like iron- ing and washing up. This domestic computer will be controlled via the public telephone network. The conventional telephone will be replaced by a wristwatch type, so that the home can be controlled from wherever you are. The conventional door lock will disappear and be replaced by tone- detecting electronic locks that respond to the householders’ voices. Although the combustion-engine-driven car will not disappear for a long time to come there will be an increasing number of electric cars. New, small, large-capacity batteries will make these a commercially viable proposition. All cars will be fitted with a large number of electronic gadgets to take the tediousness out of driving. They will have microprocessors that control fuel in- jection, gear changing, spring rate, vehicle height, shock absorber damping, and others. All cars will be equipped with anti-brake-lock systems and sensors that actuate the braking-system when you get too close to the car in front. Increasingly, shopping will be done from home with the aid of video- telephones and electronic fund transfer. Home entertainment will be based on digital equipment, and probably be interactive, allowing subscriber selection of high-definition, 3D, large-screen, video, television, and music via common networks. Television and video communications will dominate the home even more than they do now. With more and more satellites hovering above the equator, signals from them will be received via dishes not much larger than a dinner plate The screens will be linked in with the telephone network so that all communications will be face-to-face. Cellular radio systems, linked world-wide by satellite systems will be com- monplace so that anyone can communicate with anybody else wherever they may be. Paraplegics may be able to walk again with the aid of electrical stimulation of their muscles. These stimuli will come from pressure, angular, and acceler- ation sensors on their limbs. The deaf will have portable videophones in which a microprocessor displays the incoming telephone speech on to a screen. Electronic devices will continue to get smaller and faster, although the size of finished products will, of course, still be dictated by the needs of the user. Slowly but surely, silicon ICs will be replaced by gallium-arsenide chips, and these, in turn, will be superseded by neural or optical devices. The density of these devices will be staggering by current standards. The future certainly looks exciting, the more so for those of us who play an ac- tive part in the wonderful world of electronics! 1.07 BUS INTERFACE FOR HIGH- RESOLUTION LIQUID CRYSTAL SCREENS Part 2 Construction The LC screen interface is constructed on a double-sided, through-plated printed circuit board (see Fig. 4). The track layout is not given here because this PCB is virtually impossible to make other than from films, while through- plating equipment is usually only available in a professional workshop. The size of the ready-made PCB is such that it can be attached to the controller board of the LM4000I unit with the aid of 4 spacers. The connection between the interface board and the existing con- troller board is conveniently made in a short length of 10-way flat ribbon cable. The mounting of the standard-sized components on the board should not present difficulties. Only the controller, ICs, deserves special attention.- This IC is housed in a 64-pin flatpack enclosure for surface mounting, with pins in a 1 mm, rather than a 0.1 in., raster. Use a low-power soldering iron with a small tip to solder the terminal pins of the con- troller direct on to the relevant copper tracks. Work very carefully, and use desoldering braid to remove solder when a short-circuit is made between adjacent pins. As to orientation of the controller chip on the board, stick to the compo- nent overlay, because pin 1 is not located immediately next to the bevelled edge of the enclosure! Connector Ki, a 40- way PCB header with eject handles, is secured on to the PCB by means of two small bolts and nuts. The pinning of Ki makes it poss- ible to use a direct, pin-to-pin, connec- tion, in flatcable, to the expansion con- nector on the BASIC computer For other computer systems, it is necessary to provide a do-it-yourself connection between Ki and the bus (see Tables 3a and 3b). Whatever connection is used, the total length of the cable between the computer bus and Ki should not exceed 30 cm or so. Programming the I C. screen interface Software for producing ASCII characters on the LC screen is relatively simple to produce thanks to the con- 1 .24 eleklorindia January 1989 -IC6, S9-S16 and R2 may be omitted Fig. 6. Difference between character (text) display and graphic display mode as regards pro- cessing of individual bits loaded from the screen RAM. Fig. 5. Bil assignment in the MODE register of the LCD controller. trailer taking over the task of generating the dot patterns for the characters. Briefly recapitulating what has been said in the above description of the circuit, the five registers of Table 1 are either read or write locations. Four of these registers control the HD61830B, and one, LATCH, IC11, whose output state determines the contrast (bits 0 to 3), the selected 4 Kbyte screen RAM (bil 6), and the selected add-on character font (bit 7). Table 4 shows that the controller chip of- fers quite a few programmable func- tions. Its basic operation will be dis- cussed with a few examples as guidance for further developments. To start with, it is seen that the chip has 14 registers for storing different parameters. One register, number 14, returns the busy flag, which is logic high for about 15 ps after receipt of a con- troller command. The controller can not handle a new command as long as the busy flag is active. Busy can be read from the databus via register CTRL-RD (control read). It will be clear that there is very little point in using this flag in BASIC, because the relatively low pro- cessing speed of this programming language makes it impossible anyway to send a new command to the controller before this has deactivated the busy flag. Machine code programmers, however, are well advised to have the control program read and process the busy flag. Before any character can be displayed on the LC screen, the controller must be in- itialized. For the following description it is assumed that an LC screen Type LM40001 is used. For other types, the relevant data sheets should be examined to analyse the register assignment. The first 4 registers in the HD61830B should always be loaded. Table 4 shows that register 0 is the mode control. The various options available are given in Fig. 5. Writing to a register is done in two passes: first, load the register num- ber in address control-write (CTRL- WR), then write the relevant data to ad- dress data-write (DATA-WR). The BASIC listing of Fig. 9 illustrates this procedure. The subroutine starting at line 1000 loads variable DA in register CTL. The other four registers are loaded in a similar fashion. Lines 60 to 100 in the demonstration program hold the the data for loading controller registers R0 up to and includ- ing R4. The corresponding screen set- tings form a usable default configura- tion, and are best copied for initial ex- periments in programming the LC screen. It is possible to read the data at the cursor address. To do this, first load the required cursor address in register 7 (LS byte) and register 8 (MS byte). Then perform a dummy read via address DATA-RD. Next, read the data ‘underneath’ the cursor from address DATA-RD. Any subsequent read com- mand returns the data at the next ad- dress in the screen memory. A new dum- my read operation is not required until the cursor address is altered by the con- trol program. When the LC screen is set to graphics mode, all graphics data to be displayed corresponds to dot information written into the screen memory. The controller is switched to graphics mode by program- ming a logic 1 for bit 1 in the mode register. The graphics information can then be written direct to the screen mem- ory. Data can be loaded as separate bytes after loading the start and cursor ad- dress, similar to the procedure followed in the text mode. Before sending the databyte it is, however, necessary to call register 12 via CTRL-WR, and then write the data to DATA-WR. The dot usage of the controller is shown in Fig. 6. The listing of Fig. 9 may also help to analyse the operation of the graphics mode in further detail. Like ASCII characters, dot information can be read back from the display — write 13 to CTRL-WR, then perform a dummy Adding a character set As already stated, the controller can use data in an external EPROM to form an additional character set. Figure 7 shows how the controller converts EPROM data into dot patterns on the LC backplane. Using the information given in the figure, a simple computer program may be written to compile a user-defined character table in the EPROM. Alterna- tively, build the table manually by draw- ing the character outlines on squared paper. A ready-programmed EPROM with two additional character sets is available as stated in the Parts List. fclE»2L© Graphics demonstration program for (he Elektor Electronics BASIC c nterface described here (LM40001). The program halts at line 7.90 - the graphics demo. XBY(. . .) is an output instruction, and ** stam matical squaring. PITCH CONTROL FOR CD PLAYERS In general, only professional compact-disc players are provided with a pitch control. Domestic types so equipped are few and far between, and are also pretty expensive. A circuit is described here that makes it possible for a pitch control to be added to most CD players at a fraction of the cost of a professional unit. Correct operation of a CD player is en- sured by a central, crystal-controlled clock operating at 11.2896 MHz. In the block diagram of a typical CD player- see Fig. 1— this clock is contained in the digital filter chip (SAA7220), but the crystal is external to this IC. The clock controls not only the data processing, such as decoding, error correction, and digital-to-analogue conversion, but also the drive motors. In CD players less sophisticated than the Philips CD960 (used for Fig. I), a digital filter is not used and the crystal is con- nected to the XTAL inputs of the decoder chip (here a Type SA7210). For the present purposes, it is fortunate that all the circuits of a CD player con- tinue to operate correctly if the clock fre- quency is altered, although the motors will run faster or slower, depending on whether the frequency is increased or re- duced. In principle, therefore, it is fairly simple to alter the speed of the disc drive motor, and thus the pitch of the sound output. According to most manufacturers, the clock frequency should be within ±10% of the nominal value, but trials in a number of CD players have shown that much greater tolerances are permissible. At very large deviations, however, some special functions, such as skip and search, fail to operate correctly. In the proposed circuit, the clock frequency may be varied between 9 MHz and 13 MHz without any detrimental effects on the electronic circuits in the player. Basically, all that is required is to remove (unsolder) the crystal from the appro- priate printed-circuit board in the CD player and replace it by the coaxial cable r CD PT prTP pa AII ool— *»v ^ ola headphone | — |c *S..« r .l_| output i 5V is adequate trrV HIM is: u- Fig. 1. Block diagram of typical CD player (Philips ( li'IOill Fig. 2. Detail of the cloek oscillator in the digital filter contained in Fig. I. from the proposed pitch control. The os- cillator circuit of a typical CD player is shown in Fig. 2. It should be noted that replacement of the crystal invalidates the initial manufacturer's warranty. PLL synthesizer in professional CD players fitted with pitch control, the variable clock fre- quency is derived from a simple, free- running voltage-controlled oscillator— VCO— in which the voltage is varied with the aid of a potentiometer, as shown in Fig. 3. When the VCO is in cir- cuit, the frequency, and thus the speed of the disc drive motor, may be altered by turning or sliding the potentiometer. Note that this circuit is provided with a switch that allows instantaneous return to the original crystal frequency when re- quired. This type of circuit has some drawbacks, however: owing to temperature drift, the VCO is not very stable; and the speed variation can not be controlled accurate- ly because of the lack of an indicator. The proposed circuit, therefore, has been enlarged and enhanced as may be seen from its block diagram in Fig. 4 and its circuit diagram in Fig. 5. The circuit is based on a phase-locked- loop (PLL) synthesizer. The reference oscillator of the synthesizer is driven by the crystal removed from the CD player. The frequency of the VCO is compared constantly with that of the reference os- cillator and made to keep in step with it. This is effected by dividing the reference signal by 400 and the VCO signal by a factor of between 320 and 460. Any devi- ation of the VCO frequency results in an appropriate correction in the phase com- parator. A LED lights when the PLL is not locked. With the PLL locked, oper- ation of the CD player is just as accurate Fig. 4. Block diagram of the pitch control unit. 1 1.29 and stable as before the crystal was re- moved from its original position. Even when the PLL is not locked, how- ever (indicated by a LED lighting), nothing detrimental happens: the VCO then operates in a free-running mode. The programmable divider in the feed- back loop of the VCO is set with the aid of miniature pushbutton switches that control an 8-bit up-down counter. The output data of the counter may vary the divide factor of counter IC9 between 160 and 230. The up-down counter is also connected to EPROM IC&. This circuit is used as a decoder driving a three-digit display. The binary output of the up-down coun- ter is converted into 0.5% steps on the display: 11001000 represents 00.0%. Starting from a counter output of 1 1001000 (decimal 200), each change of 1 bit (more or less) causes a display shift of 0.5%. The EPROM also limits the frequency shift to -20% and +15%, because bit 6 (Ds) at its output is fed back to block the up-down counter. The EPROM also provides polarity indi- cation: when the up-down counter out- put decreases, diode Di lights to show the minus sign. Since the EPROM content is divided into three, a Type 4017 IC is used for multiplexing the three display segments. Apart from main dividers IC9 and IC10, there are two bistables in ICii that serve as binary scaler. These dividers ensure that the phase comparator is provided with true square-wave pulses to prevent any problems in the phase comparison. The circuit of IC12 is shown in Fig. 6. The time constant of network R27-R28- Cn at pin 13 determines the regulating Fig. 6. Internal circuit of phase comparator chip Type 4046. time of the PLL. The regulating voltage is applied to double variable-capacitance diode Di in the VCO circuit. The frequency of the VCO is determined by L1-C12-C13-D3. The oscillator is basically the same as the original crystal oscillator. The oscillator signal is fed via inverter N12 to the output terminal and also to divider IC9. The potential divider at the output, R32-R3i, provides level matching and forms a low-pass filter with the capacitance of the coaxial cable and the capacitor at the XIN terminal of the SAA7220 in the CD player. Both these measures ensure that the signal at pin 11 of the SAA7220 is a true sine wave at a level of about 1 Vpp. Practical considerations A phase-locked loop synthesizer on CMOS ICs and operating over the range 9 — 13 MHz can be constructed properly only on the carefully designed PCB shown in Fig. 7. It is essential that the supply lines are decoupled properly as, for instance, those to the VCO by Rn and C24. Since the pitch control circuit draws up to 220 rnA, it will normally not be poss- ible to take the power supply from the CD player. A simple +5 V supply will do, however. Note that because of the high fre- quencies the dividers in the PLL should be HC or HCT CMOS types; all other ICs may be standard CMOS. The simple content of the EPROM is given in Fig. 9 to enable constructors to program this device themselves. Coil Li consists of 16 turns enamelled copper wire of 0.2 mm diameter on a Neosid Type 7F1S former. The ends of the winding are soldered to two of the five pins on the base of the former, which themselves are soldered to the PCB. The inductor is trimmed with the aid of a non-conducting trimming tool. The core is situated correctly if UNLOCK diode D2 does not light at the extremes of the frequency range (+15% and -20%). It is best, however, to trim the inductor with the aid of a frequency counter. It is then possible to make the readings on the 3-digit display (in %) and on the counter (in MHz) equal. If the PLL is not locked properly, the reading on the counter becomes unstable and D2 will light. With Li trimmed correctly, the regulating voltage at pin 13 of the phase comparator must be about 0.5 V at + 15% frequency shift, and around 4.0 V at -20%. It is also possible, if a frequency counter Fig. 7. Printed-circuit board for the pitch control 1 1.31 is not available, to measure the voltage across D2. Since that is a pulse-width modulated signal, however, an in- tegrating multimeter must be used, set to the DC range. At both extremes of the frequency shift, the d.c. voltage across D2 must be not greater than 150 mV. If the varicap diode, Dj, is out of toler- ance, so that the correct frequency shift can not be obtained, the values of Cs and Ce may be changed slightly (smaller value = higher VCO frequency). In ex- treme cases, it may be necessary to in- crease the number of turns on Li to 18 or even 19. Fig. 8. The completed pilch control board. 0000: FF FF FF FF FF FF FI 0010: FF FF FF FF FF FF FI 0020: 35 30 35 30 35 30 3 0030: 35 30 35 30 35 30 3 0040: 35 30 35 30 35 30 3 0050: 25 20 25 20 25 20 2 0060: 25 20 25 20 25 20 FI 0070: FF FF FF FF FF FF FI 0080: FF FF FF FF FF FF FI 0090: FF FF FF FF FF FF FI 00A0 : 35 30 35 30 35 30 3£ 00B0: 35 30 35 30 35 30 3£ 00C0 : 35 30 35 30 35 30 3£ 00D0: 25 20 25 20 25 20 2£ 00E0: 25 20 25 20 25 00 FF 00F0 : FF FF FF FF FF FF FF 0100: FF FF FF FF FF FF FF 0110: FF FF FF FF FF FF FF 0120: 31 31 31 31 31 31 31 0130: 31 31 31 31 3F 3F 3F 0140: 3F 3F 3F 3F 3F 3F 3F 0150: 2F 2F 2F 2F 2F 2F 2F 0160: 21 21 21 21 21 21 FF 0170: FF FF FF FF FF FF FF 0180: FF FF FF FF FF FF FF 0190: FF FF FF FF FF FF FF 01A0 : 31 31 31 31 31 31 31 01B0: 31 31 31 31 3F 3F 3F 01C0 : 3F 3F 3F 3F 3F 3F 3F 01D0: 2F 2F 2F 2F 2F 2F 2F 01E0: 21 21 21 21 21 01 FF 01F0 : FF FF FF FF FF FF FF 0200: FF FF FF FF FF FF FF 0210: FF FF FF FF FF FF FF 0220; 39 39 38 38 37 37 36 0230: 31 31 30 30 39 39 38 0240: 33 33 32 32 31 31 30 0250: 24 25 25 26 26 27 27 0260: 22 23 23 24 24 25 FF 0270: FF FF FF FF FF FF FF 0280: FF FF FF FF FF FF FF 0290 : FF FF FF FF FF FF FF 02A0: 39 39 38 38 37 37 36 02B0: 31 31 30 30 39 39 38 02C0: 33 33 32 32 31 31 30 02D0: 24 25 25 26 26 27 27 02E0: 22 23 23 24 24 05 FF 02F0: FF FF FF FF FF FF FF Fig. 9. Content of EPROM IG>. Fig. 10. Pilch control unit connected to one of the prototypes, a Philips Type CD960 CD player. It is also possible to alter the frequency of the oscillators driving the up-down counter to some extent. With the UP or DOWN key depressed, the reading on the display increases or decreases in steps. The rate of change of these steps is determined by time constant R3-C3 or Rt-Cs. Increasing the value of either the resistor or capacitor makes the reading change more slowly. If the supply voltage comes on too slowly, it may be that the value of Ct is too low for power-on-reset. Either the value of the capacitor or that of R? may be increased to speed up the operation (R? may be increased up to 100 k). The PCB in Fig. 7 may be cut into two to give separate synthesizer and display boards. It is then, for instance, possible to fit the display (as in the prototypes) into the CD players behind a small win- dow to make frequent readings possible. It is, of course, also possible to construct the pitch control unit in a self-contained metal case and connect this to the CD player via as short a length of coaxial cable as possible. The case must be ear- thed to obviate external radiation of the 11 MHz clock signal. Fig. 11. Connection of the coaxial cable from the pitch control unit to the relevant board in the CD960. COMPUTER-AIDED TEST EQUIPMENT by A.W. Moore, MA The (relatively) low cost, ease of use and flexibility of the personal computer make it eminently suitable for the control of test and measuring instruments. Many instrument and computer makers have realized this and have brought on to the market a number of parallel and serial buses to link a personal computer to one or more suitable instruments. Not all that long ago, electronic equip- ment could be tested by the measuring of a few parameters (voltage, frequency, and so on) at some selected points in the circuit. Nowadays, much of such equip- ment is controlled by a microprocessor. Testing of this kind of equipment can only be carried out effectively by measuring the relevant parameters at many points in the circuit. Moreover, a number of these measurements needs to be taken simultaneously, owing to their interrelation. With electronic equipment becoming more complex, instruments for testing such equipment have become more com- plex also and many are now controlled by a microprocessor. Such instruments are called automatic test instruments. If the internal microprocessor is controlled by an external computer, we speak of computer-aided test equipment. Computer-aided test equipment may be dedicated, i.e., specifically designed and made for the relevant purpose, or it may consist of a PC controlling general- purpose instruments as shown in Fig. 2. A number of internationally well-known manufacturers, such as Philips, Hewlett- Packard, Tektronix, Schlumberger and Siemens have marketed dedicated computer-aided test equipment, but these are beyond the scope of this article. If several instruments are to be con- trolled by a single PC, as in Fig. 2., it is an obvious advantage if a common bus is used. Such a bus makes the set-up very flexible since it allows extra instruments to be added without much trouble. 1.33 Buses used to link the various items in a test set-up should be of a standard design to enable instruments supplied by different manufacturers to interface. A number of standards has come about as a result of co-operation between various manufacturers, and some of them have been accepted by standards organizat- ions, such as the IEEE and IEC. There are parallel and serial buses, as well as Local Area Networks (LANs). Some buses are used for intra-board con- nection, such as the STD (IEEE961) bus, the VME (Versatile Module Europe) bus, and the Futurebus (IEEE896), whereas others are used for interconnecting in- struments. Of the latter, the best known is the IEEE488. The IEC625 bus incor- porates the IEEE488 standard, but uses a different connector. Local Area Net- works are used to connect a variety of different terminals together over a given The parallel intra-instrument buses are fundamentally compatible and are usually called general-purpose interface buses (GPIBs). A GPIB allows up to 14 instruments and a computer to be con- nected together. The instruments may be listeners (which can only receive data) or talkers (which can only send data). Many instruments manufactured nowadays are provided with a GPIB in- terface and switches that are used to set the bus address. Sixteen active lines are used to imple- ment the GPIB, and these are divided into three groups as shown in Table 1. The eight data lines are bidirectional and data is transferred byte by byte. The control bus consists of five lines. When the ATN (attention)line is ac- tuated (by the PC), it signifies to all in- struments on the bus that they must give up use of the bus and interpret the data bus as commands. The IFC (interface clear) line is asserted by the PC and used to initialize the instruments. The REN (remote enable) line is used by the PC to instruct the instruments to be ready for remote control. The SRQ (service re- quest) line is used by an instrument to interrupt the controller to signal that it requires attention. The EOI (end or identify) line is used to indicate the end of a multiple-byte transfer or, with ATN, to force the PC to execute a polling se- quence. The transfer control lines control the transfer of data on the data bus. The DAV (data valid) line is set by a talker to indicate that valid data are present on the data lines. The NDAC (not data ac- cepted) line is set by a listener during reading the data. The NRFD (not ready for data) is set by a listener to indicate that not all listeners are ready to accept data. Fig. 1. Typical computer- The IEEE488 standard does not define the syntax or code of messages on the bus. Some typical available equipment The Intepro Micro Series power supply test equipment from Limerick-based In- tepro Systems is a PC expanded with a bus extender card that is complete with memory and capable of linking up to 255 plug-in instrument modules. Modules currently available include DVM, scanner, power relay, and ripple- and-noise measurement boards. Fig. 2. Typical GPIB structure. A full range of plug-in data acquisition and controls cards for IBM PCs and compatibles is available from Bleu Chip Technology. Digital interface cards include the PIO- 48 that has 48 programmable input or output lines. Other digital cards have op- tocouplers, Darlington drivers, relays and counter/timers. 1.34, The A 1 P-24, one of the analog"e range, has 24 channels, 12-bit ana.^gue-to- digital converter, sample-and-hold, and a programmable gain amplifier. Other cards include multi-function cards with analogue and digital channels, ther- mocouple inputs and communications cards with RS232, RS422, RS485, and 20 mA standards. ANALYSER software from Number One Systems is claimed to have become the largest selling Circuit Analysis soft- ware package in Britain with versions for the BBC and IBM (and compatible) PCs. By simulating accurately the AC per- formance of a circuit design, it can give the designer confidence that circuits will behave as required, without his needing to resort to expensive test and measuring equipment while “fine tuning” a design. At higher frequencies, unanticipated ef- fects caused by interelectrode capacitances and so on are immediately made clear. ANALYSER performs an AC Frequency Response analysis on circuits entered into the software, and presents results in tabulated and graphical form. Analysis of gain, phase, group delay, input im- pedance, and output impedance versus frequency are made to give the electronic circuit designer a powerful tool with which to assess the performance of designs. Particularly useful is the ability to change one or more component values and recalculate to see what the ef- fects of such changes are. This allows rapid solutions to design problems, and minimizes the need for breadboarding and the resultant waste of components and, more important, time. Strays and parasitics at higher fre- quencies may also be taken into account. ANALYSER allows resistors, capacitors, inductors, transformers, field-effect and bipolar transistors, operational ampli- fiers, transmission lines and microwave striplines to be included as circuit elements. Circuits up to 60 nodes and 180 components may be analysed, and there are libraries of active components available that hold the pre-entered specifications of up to 26 of each type (bipolar transistor, FET, opamp). Data may be changed by the user to suit the types most commonly worked with. Although not strictly a ’’computer- aided” test equipment, Fieldtech's ORGANIZER II and COMMS LINK are of interest to note. The ORGANIZER II takes the place of a PC as controller to drive IFR test in- struments. Since the unit is little bigger than multi-function calculator, it may be used as hand-held controller that can be stored in the test-set lid when not in use. Fig. 3. PSION organizer radically changes RS-232 control & storage potential of IFR lest in- struments. Some useful addresses. Amplicon Electronics Ltd Richmond Road BRIGHTON BN2 3RL Telephone (0273) 608331 Blue Chip Technology Main Avenue Hawarden Industrial Park DEESIDE Clwyd CH5 3PP Telephone (0244) 520222 Fieldtech Heathrow Ltd Huntavia House 420 Bath Road LONGFORD UB7 0LL Telephone 01-897 6446 Fluke Ltd Colonial Way WATFORD WD2 4TT Telephone (09231 40511 Hewlett-Packard Ltd Nine Mile Ride WOKINGHAM RHI1 3LL Telephone (0334) 773100 Intepro Systems Ltd Crescent House 77-79 Christchurch Road R1NGWOOD BH24 IDH Telephone (0425) 471421 Keithley Instruments Ltd I Boulton Road READING RG2 ONI. Telephone (0734) 861287 Number One Systems Ltd Harding Way Somersham Road St. Ives HUNTINGDON PE17 4WR Telephone (0480) 61778 Philips Instruments Mullard House Torrington Place LONDON WC1E 7HD Telephone 01-580 6633 Schlumberger Instruments Victoria Road FARNBOROUGH GUM 7PW Telephone (0252) 544433 Siemens Lid Siemens House Windmill Road SUNBURY-ON-THAMES TW16 7HS Telephone (09327) 85691 Tektronix Ltd Fourth Avenue Globe Park MARLOW SL7 1YD Tblcphone (06284) 6000 1 1.35 BACKGROUND TO E PROMS Memory chips with large storage capabilities invariably steal the limelight these days. There are, however, many interesting low- capacity devices available as well. One of these is the electrically erasable programmable read-only memory - E 2 PROM. Its low cost, versatility and ease of programming make this device an ideal component for many applications involving the permanent storage of, for instance, instrument configuration data. As an example of the operation and ap- plication of a typical E 2 PROM (or EEPROM), this article discusses the 256-bit Type NMC9306 from National Semiconductor. Readers of this maga- zine will recognize this device from the Microcontroller-driven power supply (Ref. 1), where it is used to for storage and retrieval of voltage and current set- tings associated with 3 user-selectable in- strument configurations. Basically, an E 2 PROM couples the non- volatily of an EPROM to the flexibility of a RAM. In this sense, it is functional- ly similar to a RAM with battery back- up, or a zero-power RAM (e.g. the 48Z02). Among the advantages of the E 2 PROM discussed here are its low cost and simple-to-use serial interface, which is of particular interest when the device is to be incorporated in existing systems. Features and applications An E 2 PROM is a read-only memory, and can, in principle, only be read from. Its special internal configuration, how- ever, makes it possible to erase the device electrically, and re-load it, during nor- mal operation. This obviates the need for exposure to ultraviolet light, and the application of a high programming voltage, required for erasing and pro- gramming a conventional EPROM. The NMC9306 is fed from a single supply voltage, 5 V, and has an on-chip step-up converter that supplies the programming voltage. Each of the sixteen 16-bit registers can be erased individually. An important difference with respect to a conventional RAM is, however, the time needed for loading (= writing to) a register. In the case of the NMC9306, this programming cycle takes at least 10 ms per register. Also, the number of write operations is limited to about 10,000 per register. The maximum guaranteed data retention period is 10 years, so that data will need to be ‘refreshed’ at least once during this time, by means of a erase-write cycle. As already noted, the E 2 PROM is ideal for quasi-permanent storing of equip- ment configuration data. As an example 1.36 elektoi india January 1 989 of that application. Philips Test Instru- ments fit a number of their top-grade frequency meters with an E 2 PROM that holds data corresponding to the tem- perature response of the central quartz crystal built into a temperature- compensated oven. The temperature coefficient of each quartz crystal in- tended for use in these instruments is in- dividually recorded as a curve, which is then digitized and loaded into the E 2 PROM. The microprocessor that con- trols the instrument measures the tem- perature of the oven, loads the relevant temperature coefficient from a look-up table, and corrects the central clock fre- quency to ensure minimum deviation. Component availability note: The NMC9306 is available from Elec- troMail, P.O. Box 33, Corby, Northants NN17 9EL. Telephone: (0536) 204555. Practical use An essential difference between an Stock number: 301-656. E 2 PROM and other memory chips is Fig. 1. Block and connection diagrams of E 2 PROM Type NMC9306. « register AltMIAO Fig. 2. Instruction set of the NMC9306 16x 16-bit E ! PROM. - -JxruTJTJTJ-LTLT T_n_rLr uun. n_rLrLn_n_ apparent from the block diagram in Fig. I. Data is sent to, and read from, the E 2 PROM via a serial interface, which not only makes it possible to house the chip in an 8-pin DIL package, but also makes its use independent of data- and address-bus structures — the E 2 PROM is simply a small peripheral device. The serial input and output pins (DI and DO) may be controlled by separate serial formats. The serial interface is also used for reception, from the host micropro- cessor, of control commands for the E : PROM. These are 9-bit serial datawords, in which the start bit is always logic high. The next 4 bits form the opcode (see Fig. 2), followed by another 4 bits that form the register ad- dress. The function of the E-PROM control commands can be summarized as follows: ■ Read: data is first loaded into the data shift-register, and then shifted out via the serial output DO. The shift- out operation is clocked by the low-to- high transition of the signal applied to the SK input. A dummy bit (logic 0) precedes the 16-bit data output string. Only the read instruction causes serial data to be output via the DO line. ■ Erase/write enable (EWEN): this command should always precede data erasure or loading operations. ■ Erase register: unlike a RAM, an E 2 PROM register should be cleared (erased) before loading it with new data. ■ Erase all registers: similar to the above command, but works on the whole chip rather than on an individual register. ■ Write: load data in a previously cleared register. ■ Write all registers: the same data is written to all registers. ■ Erase/wrile disable: this command prevents accidental clearing or over- writing of registers. Fig. 3. Timing of the E ! PROM write cycle. Two control lines on the E 2 PROM ar- range the timing. Low-to-high clock transitions on line SK (serial data clock) control the shifting in and out of data and commands. The maximum clock frequency is 250 kHz. Line CS (chip sel- ect) is active high, and enables or disables all data and command I/O op- erations. It also serves to time the erasure and programming pulses, which should have a duration of 10 to 30 ms. After the loading of a clear or write command, the relevant cycle starts when CS goes low. Programming lasts until CS reverts to logic 1. In the mean time, in- put SK is disabled. After programming has been completed, CS may remain logic high to enable loading a new com- mand. When CS is made logic low, the E 2 PROM is switched to the low-power mode. In between commands, the minimum low-time of CS is 1 ps. N ELECTRONICS NEWS SUPER TYPEWRITER An electric typewriter which can work upto a speed of 9.600 bauds per second will be brought out by Hindustan Tele- printer Ltd. HTL’s new modems, which can work upto 2400 bauds per second, based on the inhouse R & D, has already been approved by DOT. HTL achieved a record performance in 1987-88, with increased production and the emphasis was on new technology product line, electronics typewriters, both Roman and bilingual. The com- pany exceeded the target by 50 per cent in electronic teleprinters, by KM) percent in electronic typewriters and 1 16 per cent in modems. INDIAN SOFTWARE ATTRACTS EEC Ten Indian companies which recently demosrated their software package to buyers in the Eruopean market received about 100 inquiries, according to a re- port by the India Trade Centre at Brus- sels. Indian companies showed their software alongside international giants like the IBM, Unisys and Honeywell. The Indian companies which were chosen tor the exhibition included Ambalal Sarabhai Enterprises, CMC, Datamatics Consul- tants, Hinditorm Computers, ICIM, Radix computers, Tata Consultancy Ser- vices. Wipro Information Technology and Blue Star. Most of the Indian com- panies found they were highly competi- tive both for products and services. Meanwhile, another delegation compris- ing 18 members participated in COM- DEX ’88, America’s biggest trade fair in software, microcomputers and peripher- als. 1.37 CUMULATIVE INDEX 1988 Components, design ideas and application n unable logic lion and applicanor Symmetrical volt Noise resi.'lanl V Power supply me Informative articles Altitici.il inlrJigenoe Brcaklhrocgh u» '-peicondiKiing materials C uinpulcr and telecommunications revolution will hung its legal problems Computer management systems lake over Data encryption De'-.cate i ep.in s to cosily microchips Geneva calling ISDN and salt-lines at Telecom 87 Holography and lasers produce super-precise measun Making the weather work for you New computer system enhances teitile production . A new multilayer process for integrated passive devie Optic (litre communication Optoelectronics Paintbox the high-tech approach to artistic creativity Radio communications for the future The reason lor miniature transducers The r.se and rise ot the micro Science mobilizes to combat murder in the ait . Shielding computers with metal-coated glass Signal processing and electronic encryption . Simulating sight in robots Sit Clive Sinclair super electronics emtepeneur Synchrotron X-rays reveal howi ice flows Telecom 87 a preliminary report The value of silence A very intelligent computer letminal Mathematical Principles of Natural Philosophy by Isaac Newton Informat.on theory and Encryption Electronic A Magnetic Quantities N..mbeis and the machine What is waif 9 127 9 128 9 132 9 136 9 137 9 146 9 152 . 12.27 Radio, television and video r, Amplitude modulated calibration generator I Chrominance locked clock genciatoi j Ducct -conversion receiver foi Ml meter Hat aerial (or satellite TV reception y Frequency read-out (or shortwave receiver , low-noise preamplifier (ot EM receivers j MacroVision decoder/blankcr Microprocessor-controlled radio synthesizer - I S Microprocessor-controlled radio synthesizer - 2 s OMA-2500 time standard receiver I Polaratot control > Reception and transmission of radiotelctypc 7 RTTY r.llcr for l70Hzsh.fi « Signal divider (or satellite TV receivers 1 Tuneable prcamplifers lor VHE and UHF TV y Video distribution amplifiet 2 VLF converter ; Voltage-controlled SHF test oscillator 1 Wideband aenal booster and splitter 7 VAM vidccVaudio modulator 5 Crystal filter (or RTTY Preselector (or SW receiver Computers and microprocessors Autonomous I/O controller I 48 MHz clock generator 64 Kbyte RAM extension lor MSX computers Bus intetface lor h.gh-tesolution I.C screens - I Centronics interlace for slide fadei Computer controlled slide lader I Compute, -con trolled slide fadei 2 g I/O extension foi Amiga SOU j I CD foi /ftllslnven computeis Non interlaced picture lor Electron 5 Peripheral modules foi BASIC computer , Plotter I Plotlei 2 [, Printer shanng hox 2 Prototyping board lor computer extensions 4 Universal multiplexei Single -chip RS 232 transceiver Automatic 50160 HZ switch foi monitors Slide fader for C64 Centronics relay dnve I/O bus adaptor for IBM PCs and compatibles Special Feature A Supplement Electronics India 88 Exhibition Information Strength & Weaknesses of Indian Electronics An Exclusive Interview-Chairman Electronics Commission NCST; MECCA of software Computers in Air Defence Electronic Confederation The nse and rise of a missionary SAM PITRODA The Jumbo Success of Chbabna (An Exclusive Interview] Corrections and updates 36 BASIC compute. 45 Microprocessor controlled radio synthesize! 35 Multi function frequency meter 71 Mulu-function frequency metei 14 Software update foi P-comrollcd fiequenry metei 14 Electrometer 9 124 9 131 9 138 DMM js frequency meiet 9 67 Humidity indicator for potted plants 7 62 8.59 10 50 II 64 9.82 9 76 Test and measuring equipment review - 1(B) Test and measuring equipment review - 1(C) 2 35 Car tilt alarm 3 4g Centronics interface for slide fader 4 40 Computer-controlled slide fader - 1 9 70 '. t 24 5 52 Test and measuring equipment review - |(E) 5 29 Computer-controlled slide fader - 2 Transistor -curve tracer u's2 Discrete + 5 Vto^l 5 V convene. v 117 Wideband level-independent trigger preamplifier 9 107 Dnvet for bipolar stepper motors LCD VU meter* 1.22 Fast NtCd charger Multi-function Frequency meter Top of the range preamplifier (3) 1 49 Fishing aid 9 105 Cncap light meter 2 39 Headlights indicator 9.90 Spot sine wave generator Wideband RF signal tracer 9 102 High-voltage BC547 9.74 Logjriihmic read-out Versatile continuity tester 9 128 lolta-red remote control (or stepper motors 9 )35 Lead acid battery charger 12.24 9 99 Pnjscaler for frequency meter 9 140 1 rght powered thermometer Small fight meter 9 149 Power multivtlnator 9 91 Piogrammable switching sequence 9.94 n sg , , S 9 ‘81 Background-noise suppressor 9 118 Secondary powei -on relay 9 69 9 75 Five-hand stereo graphic equalizer 9 88 Single-chip solid slate relay 9 121 Stepper motor duvet 9 113 Harmonic enhancer 12 59 Step up switching regulator Portable MIDI keyboard 12 37 Touch-sensitive light swileh 991 Preamplifier for purists II 37 Ultrasonic distance meter 9 97 Single-chip 150 W AF power amplifier 9 81 Wiper delay . 9 97 6 54 S| 655 9 6 7 Ram Synthesiser 7.27 The Uniphase loudspeaker system 433 Fucl-eeonomiscr * ^ o..,.. 1 34 Up/Down com rol lor digital potentiometer 9 123 9 124 Parametric equiltser Audio-analyser Using an equaliser Instrument amplifier Electronic s-.gr.aldivider 5 30 Manual slide (ader 7 52 Computer or sensor controlled dimmer 7 28 Synchronisation separator 9 125 Water alarm .... 9 134 Soft-stan for halogen lamps 9 126 9.131 9.133 9 133 Automatic volume limiter 9 130 Two-wire remote conlrol 9-Channel touch sensitive switch 9 141 Selex 1 1.39 AUTONOMOUS INPUT/OUTPUT CONTROLLER A user-configurable I/O controller that gives digital and analogue interfacing power to your computer’s RS232 outlet. Fast, simple to build and program, and intelligent enough to deal with up to 64 digital and 12 analogue channels, this microcontroller-driven I/O distribution box should prove invaluable in many applications where a computer runs a small or large-scale automated control job, be it industrial or domestic. Part 1 The autonomous I/O controller de- scribed here is basically a versatile, in- telligent, computer peripheral that can be connected in the bus structure pro- posed for the microcontroller-driven power supply published earlier this year (Ref. 1). Like the power supply, the I/O controller derives its intelligence from a Type 8751 microcontroller from Intel. The control program that resides in this chip has been written exclusively for this project in the Elektor Electronics design department. Applications of the I/O box arise almost automatically when a computer is to communicate with the outside world. These applications range from essen- tially simple, such as the control of LED matrices, relays or electronic switches, to more sophisticated, interactive, ones in- cluding the control of motors, but also alarm, heating and air conditioning systems. The list of applications can be extended even further with PC- controlled battery chargers, light shows and audio distribution equipment. The 8-channel ADC in the system allows analogue values provided by a wide var- iety of sensors to be captured, stored and processed by the computer. One button — seventy-six I/O lines The basic operation of the autonomous I/O controller is best understood after looking at the front panel first (Fig. 1) — not a multitude of switches and other controls on this, just the on/off switch and a push-button labelled disable out- puts with an associated LED. There is no need for any other form of local op- eration, because the unit is controlled entirely by commands sent by the host computer it is connected to. There is nothing to look for at the rear side of the unit either: all that is there is the mains input socket and the 9-way D-socket that links the I/O box to the computer. Part 2 of this article will detail the actual programming of the I/O controller with the aid of a set of commands similar to those used for the microcontroller- driven power supply. BASIC command PRINT (or LPRINT) is perfectly ad- equate for sending these commands via the RS232 port, so that even beginners need not worry about bus interfacing, machine language programs, or the in- tricacies of the microprocessor inside the host computer. Most computers provide some sort of printer output redirection facility, so that the use of the RS232 port obviates the need for complex programs to ‘talk and listen’ to the peripherals connected to the I/O box. There is, of course, a price to be paid for all these benefits, and this is mainly the limited speed of the system. None the less, 9600 baud should be fast enough for any of the applications mentioned earlier, since the minimum pulse duration that can be programmed on a digital output line is about 6 ms. Three printed circuit boards Figure 2 shows that the autonomous I/O controller can be expanded to user re- quirements. The system is in principle composed of 3 types of sub-unit: • controller board — this holds the microcontroller, power supply and the 10-bit analogue-to-digital con- verter (ADC) with its associated 8- channel input multiplexer; • bidirectional digital board — this is identical to that for the 8052AH- BAS1C computer (see Refs. 2 and 3); • analogue output board — this is vir- tually identical to that for the 8052AH-BASIC computer (see Refs. 2 and 3). There is a slight difference to note be- tween the autonomous I/O controller and the system discussed in Ref. 3. This difference entails the maximum number of peripheral boards (digital and analogue output). In the autonomous I/O controller, there may be 0, 1, 2, 3 or 4 boards of each type, povided each is allotted a unique address (this will be reverted to in Part 2). It is not allowed to replace, for example, two analogue out- put boards with two bidirectional I/O boards, or the other way around. Push-button disable outputs provides a toggle function for simultaneously switching on and off all digital outputs. The current state of this function is indi- cated by a LED. of the autonomous I/O controller. A further LED, labelled remote con- trol lights when the autonomous I/O controller communicates with the host computer. An interesting and original feature of- fered by the system described here is its ability to interconnect pairs of corre- sponding input and output lines with the aid of software (command ‘G’). A prac- tical application of this feature is shown in Fig. 5 where a pair of I/O lines is used with manual switch control. On the controller board As already noted, the controller board holds the ‘brains’ of the system, the microcontroller Type 8751, and the ADC with its associated 8-way input multi- plexer. The circuit diagram is given in Fig. 3. Since the basic operation of the microcontroller, ICi, is briefly covered in Refs. 1 and 4, the device can be treated as a ‘black box' that takes care of the serial communication, the control of peripherals (digital I/O, DACs and ADC), the multiplexing of the analogue inputs, and the timing for the I/O latches. The microcontroller has on-chip RAM and ROM. Circuit IC 2 is a supply monitor chip that ensures the correct initialization of the microcontroller at power-on. It also works as a watchdog, checking the presence of 1.1 ms long pulses on con- troller output line P2.0. When these pulses fail, the microcontroller is im- mediately reset. This is done to prevent the system generating uncontrolled signals when the supply voltage drops below the level needed for correct oper- ation, or when the system ‘hangs up’ due to some internal malfunction. CPU port line P2.0 is also fed to the bidirectional digital boards. Conflicts with the watch- dog arc avoided by the microcontroller ensuring that WR is never activated when a pulse is sent to the watchog chip. Diodes Di and D 2 determine the ad- dress, or identification code, assigned to the autonomous I/O controller — see Table 1. With 2 diodes, a choice of 4 ad- dresses is available. This will do for most applications, given the large number of lines provided by a single autonomous I/O controller. Analogue-to-digital converter (ADC) IO is a 10-bit, 8-bit databus compat- ible, type from National Semiconductor. The recommended supply voltage for this chip is 5 V. For optimum conversion Technical features: INPUT/OUTPUT MODULES: • Modular structure. Largest system configuration supports: 32 digital outputs; 32 digital inputs; 4 analogue outputs; 8 analogue inputs. • Digital interface card has 8 buffered outputs and 8 protected inputs. Up to 4 of these modules can be bused in I/O system. • Analogue output card has 1 output with 10-bit resolution. Output voltage span: 0 to + 10.23 V, programmable in 10 mV steps. Up to 4 of these modules can be used in the I/O system. • Analogue-to-digital converter on controller board has 8 multiplexed in- puts. Input voltage span: 0 to + 10.23 V. Resolution: 10 mV/LSB. • Medium-power open-collector digital outputs are surge-protected, and can handle 50 V; 500 mA loads direct. • Optional internal connection of digital inputs and outputs. • Ideal for multitasking of peripherals on a single serial computer chan- nel. PROGRAMMING AND SERIAL INTERFACE: • Standard serial interface and data format allow system to be controlled by almost any microcomputer or terminal. Simple line settings: 9600 bits/s; 2 stop bits; no parity bit. • Line settings and selective addressing of peripherals is compatible with microcontroller-driven power supply. Up to 4 autonomous I/O con- trollers can be individually addressed via a single serial channel. • Communication with or without echo. • Status control codes provided for host computer. • All functions are programmable via serial interface. • Programmed output voltages are read on analogue outputs; real out- put voltages on analogue inputs. • Digital output lines are individually programmable, or in blocks of 8 bits. • Analogue output voltages are individually programmable. • Automatic syntax-checker for control commands. accuracy, the reference voltage should be as high as possible, but it must never ex- ceed the supply voltage. The reference voltage is, therefore, set to +5 V, sup- plied by the well-known precision stabilizer Type REF-02 (ICs), and the supply voltage to +5.25 V, supplied by an LM317 (ICv). The voltage difference of 0.25 V is a safety margin that should prevent fluctuations on the output voltage of the LM317 damaging the ADC. The +5 V, -5 V and -12 V power sup- plies on the controller board are of con- ventional design and merit no further discussion. The operation of the serial interface will be discussed in Part 2, as part of the software command descriptions. Fig. 2. Modular structure of the autonomous I/O controller. Analogue-to-digital conversion The 8 analogue inputs on connector Ki are connected to protective diode- resistor networks. The CPU, ICi, con- trols the ADC direct, and the input multiplexer, ICj, via 4 level converters, T’ to Ts. The INH (inhibit) input of the Type 4051 CMOS analogue multiplexer, in combination with capacitor Ci and opamp IC4, makes it possible to realize a basic sample-and-hold function. C4 is dimensioned such that it provides an ac- ceptable compromise between rise and fall time — the conversion error it in- troduces is less that '/iLSB. Potential divider Ru-Pi-Rio scales the sampled analogue voltage down to a value be- tween 0 and 5 V. The analogue inputs form a high im- pedance when they are not sampled. When they arc, the impedance drops to about 10 kQ. The procedure for loading and conversion to 8 bits of the 10-bit data in ADC Type ADC1005 is largely similar to that adopted for the Type DAC1006 (for details, see Ref. 3). An important feature of the ADC1005 is its insensitivity to current peaks during the actual conversion process, as well as to occasional negative voltages supplied by opamp [C4. No attempt should be made to suppress the current peaks by fitting a capacitor at the input of the ADC, since this would result in significant conver- Bidirectional digital card and analogue output card The circuit diagrams of these modules are given in Figs. 4 and 6 respectively. For a description of the operation, refer to Ref. 3 (but note the value of R: on the analogue voltage board, and the supply voltages). The address assign- ment can be deduced from Table 2. The digital I/O cards can only be addressed by fitting jumpers E0 to E3 (on Kj), the analogue output^ boards by fitting jumpers E4 to E7 (also on Kj). Do not swap cards of a different type. Construction The printed circuit boards for building the autonomous I/O controller are shown in Figs. 7 (controller board; double-sided, through-plated), 8 (digital I/O board) and 9 (analogue output board). The 26-way flat-ribbon cable Fig. 5. Kcy-debounce application of the bidirectional digital card. Fig. 7. Component mounting plan of the double-sided, through-plated, controller board of the autonomous I/O controller. that ‘buses’ connectors Ki of the digital transformers (a single type that provides . and analogue boards connects these to approximately 9 V at 0.8 A, and 15 V at the controller board. 250 mA, may be difficult to obtain). Construction of the controller board should not cause difficulty. Note that all The drawing of Fig. 10 and the ready- electrolytic capacitors arc radial types made, self-adhesive, front-panel that are fitted upright. Component R2J available for this project are used as is an 8-way, 9-pin, single-in-line (S1L) re- templates for preparing the aluminium sistor network. Make sure that the pro- front panel of the enclosure. Remember tective diodes are fitted the right way to drill recessed holes for the counter- around (Ds to Du: cathode up; Du to sunk screws that secure the D-type Dm: cathode down). The 5 V regulators sockets and anything else attached to the may be fitted on to the cabinet side panel inside of the front panel, such as with the aid of insulating washers. horizontal support pillars between this It is recommended to fit supply decoup- and the rear panel. Small additional ling capacitor C« at the track side of holes are drilled in the front panel as the board, straight across pins 20 and 40 shown in Fig. 10 to give access the of the microcontroller. multiturn presets on the analogue out- The photograph in Fig. 11 shows the put boards (these holes are not provided prototype of the autonomous I/O con- in the self-adhesive front panel foil, and trailer fitted in an enclosure of the same must be punched after carefully lining size as that used for the microcontroller- up the completed analogue boards driven power supply. There is plenty of behind the aluminium front panel). A space left for fitting two mains sharp hobby knife is used for clearing 1 .44 elektorindia January1383 the holes for the sub-D connectors in the foil. Adjustment of the analogue output board is carried out as described in Ref. 3. The board with identification liiiiiiiH; iiuliunili’dlK^ IC1-74HCT377 IC2 = 74HCT541 IC3-ULN2803A K2* 25-way D connec angled pins. Ka= double-fow 16-w< 1 jumper for mounting PCB Type 880163 Autonomous analogue ou O ">0000000000000* o w "OOOPOOOOOPPOOS Di =LM336-2V5 D2;D3 = 1N4148 ICi = DAC1006 (Na IC2=OP-77 (PMI) handles. double-row 16-way straight PCB nper for mountino on Ka. Fig. 9. Printed circuit board for the analogue output board. PCB Type 880162 Fig. 10. Front panel drilling template. number n is programmed to provide 10.00 V with the aid of instruction Un, 10.00. The ADC on the controller board is cali- brated by applying a precision voltage of 10.00 V and adjusting Pi until the host computer reads exactly this value. Details on programming the autonomous I/O controller will be given in next month’s final instalment. Finally, note that the logic ground and the analogue ground are interconnected at one point only, close to the ADC1005. Fig. 11. Internal view of the prototype. GUIDING THOSE WAVES by W.D. Higgins An increasing number of engineers have to consider processing signals in the gigahertz frequency range: satellite TV, information/data systems, point-to-point microwave links, and radar are but a few examples of fields where a basic understand- ing of the operation of waveguides is required, and where this brief ‘guide to waveguides' may prove useful as an introduction. A waveguide is essentially a precision- engineered length of hollow, usually rec- tangular, aluminium, invar, copper or brass (70/30 and 90/10) tubing that serves to carry microwave RF signals. Whereas professional-grade coaxial cable is used up to about 3 GHz with considerable attenuation, certain types of waveguide are suitable for carrying RF signals at frequencies of 50 GHz and higher, at an insertion loss that remains negligible even for relatively long runs. Waveguide technology can be treated as a very fine art, but is in principle very similar to conventional plumbing. Since waveguides and ancillaries such as coup- ling flanges, preformed twists, T- junctions and coaxial transitions are available ready-made in a variety of sizes, the engineer will have to decide on the most appropriate practical size of the waveguide, bearing in mind cost and machinabilily. To these factors must be added the technical consideration whether or not a particular waveguide size can be used at the frequency of in- terest. The physical size of a waveguide determines the lowest frequency at which it can be used, i.e., at which it is capable of propagating RF energy in a relatively loss-free manner. Any type of wave- guide, therefore, has its specific cut-off frequency, below which attenuation rises rapidly. The dominant propagation mode in a waveguide is referred to as TEio. The distribution of the electric and magnetic field in TEio mode is illustrated in Fig. 1. The electric field strength is maxi- mum at the centre of long walls of the waveguide, and decreases sinusoidally to nought towards the short walls. The magnetic field has a loop-like configura- tion, and is distributed in parallel with the long wall of the waveguide. To prevent excessive attenuation, the TEio mode requires a minimum size of the internal waveguide width, w, of 0.5A. The previously mentioned cut-off fre- quency therefore corresponds to a wavelength, Ac, equal to 2 w. Width tv should not exceed A to prevent the domi- nant mode changing trom TEio to another electromagnetic pattern whose structure causes matching problems at the input and output of the waveguide. In practice, w is made slightly greater than 0.5A because the wavelength of a signal in a waveguide, A g , is greater than the free-space wavelength, Ao: }/\ - (Ao/2w) This equation applies to the TEio mode, and shows that A g approaches infinity as w approaches 0.5A. In practice, the minimum value of w is chosen between 0.6A and 0.95A to prevent components or joints in the waveguide causing propa- gation discontinuities or electrical losses. Similarly, to prevent polarization reversal between the input and output of the waveguide, the internal height, h, is chosen lower than 0.45A. The maximum frequency of operation of a waveguide is usually 2f c . Standard range Most manufacturers of precision waveguides produce a standard range of sizes (and materials) that conforms to various European and US specifications. European specifications include IEC153 (1&2), DIN47302, BS9220, DEF5351 and CCTU10-20. US specifications in- clude MIL-W-85C, EIA, RS261-A and JAN-MIL. Waveguide size is denoted by a WG num- ber. The most commonly used sizes are in the range WG5 to WG28 — the higher the WG number, the smaller the wave- guide, and the higher the cut-off fre- quency (remember that this is (helowesc frequency at which the waveguide can be used). Table 1 gives data of a number of waveguide sizes. As a rule of thumb, the attenuation of a waveguide increases with length and the WG number. A few examples of typical attenuation figures are included in Table 1. WG16 is particularly popular among radio amateurs for use in 3-cm (X-band) and home-made Ku-band equipment (satellite TV reception). Ex- military waveguide systems are often of- fered in a variety of configurations at rallies, and by electronic surplus stores. Often, such units come complete with associated SHF electronic parts, such as Gunn-diodes, klystrons, adjustable at- tenuators, mixer diodes and even horn aerials. Waveguide circulators also exist, but are hard to get hold of. The usual way of joining lengths of waveguide is by means of flanges. These are slipped over the waveguide and then brazed or soldered in place. Excess wave- guide is usually milled or filed away. Great care should be taken to keep the inside of the waveguide free from Fig. 1. Relative intensity of the electric and magnetic component in TEio mode. Fig. 4. A piece of WG16 waveguide fitted with one flange, a small horn aerial, and a home- made two-stage Ga-As FET preamplifier for Ku-band satellite TV reception, fitted on to a length of brass waveguide. Input and output coupling to the waveguide is effected with internal 1 1.47 residual solder, as this introduces high losses. In general, discontinuities smaller than 0.1 A are tolerable, so that it is per- fectly possible to make one’s own wave- guide (and even flanges) from available brass or aluminium tubing. Waveguide tee-pieces, adjustable matching pieces, cross-couplers, dummy loads, tuneable filters, coax adaptors, twists and bends, flexible connecting pieces and direc- tional couplers are available for most types of waveguide. Factors to consider when joining lengths of waveguide, or inserting connectors in a waveguide sys- tem, include the frequency range, VSWR of all ports, power division, port-to-port RF isolation, phase balance, power handling, polarization and, of course, physical parameters. Future trends As greater use is made of the microwave bands, the demand for waveguides, and with it SHF research and development, is found to increase. In the field of metallurgy, new alloys may be invented with better physical characteristics, to re- duce attenuation, improve machinabili- ty, and allow greater power handling. H Addresses of companies handling waveguides: Du-Keren c/o Frequency Techniques • Cornwallis House • Howard Chase • Basildon • Essex SS14 3BB. Tble- phone: (0268) 293401. Evered • P.O. Box 21 • Lewisham Road • Smethwick • Warley • West Midlands B66 2BW. Telephone: (021 555) 5885. Flann M.I. • Dunmere Road • Bod- min • Cornwall PL31 2QL. Tele- phone: (0208) 3161. LFA-150: A FAST POWER AMPLIFIER (FINAL PART) from a basic idea by A. Schmeets Protection circuit. The protection circuit serves to: • delay the energizing of the output relay by a few seconds from power- on; • on switch-on, monitor the d.c. resist- ance of the loudspeaker: if this is lower than 2.2 ohms, the output relay is not energized; • deactuate the output relay if the direct voltage across the output ter- minals of the amplifier rises above 1 volt; • deactuate the output relay if the peak current flowing in the output tran- sistors rises above 10 A; • deactuate the output relay if one, or both, of the secondary a.c. voltages fails— this also ensures that the loudspeakers are disconnected from the output when the amplifier is switched off. The circuit diagram of the protection unit is shown in Fig. 9. Note, however, that the output relay and the peak- current detector are located on the current-amplifier board. The 24-V output relay is actuated by T« and T43. These transistors form a Schmitt trigger, so that the relay is ac- tuated when the potential across C47 has risen to about 12 V and is de-energized when that voltage has dropped to about 6 V. The hysteresis is determined by Rto and R100. Inverter Tu in the collector circuit of Tji conducts when the protection circuit is on, and this causes D29 to light. When the power is switched on, Cu charges via R97. Once the potential across the capacitor has reached a value of about 12 V, T« begins to conduct. Transistor T13 is then switched on and the output relay is energized. Capacitor C47 is shunted by transistor T*>, which enables it to discharge very rapidly if a fault arises. The base circuit of the transistor is connected to a poten- Fig. 9. Circuit diagram of the Fig. 10. Printed-circuit board for (he protection unit. tial divider, R93-R94-R95, which is dimen- sioned to ensure that the output relay is deactuated as soon as one, or both, of the secondary a.c. voltages fails. The junction Rm-Rios-Os- is at a negative d.c. potential that is derived from the secondaries of mains transformer Th. Junction R93-R* is connected to the base of T», which with D32 and R91 forms a sort of comparator. Several of the protective measures are controlled via this transistor. When the base poten- tial of the transistor drops below around 23 V (56 V minus the 33-V drop across D32), Tjo begins to conduct and the out- put relay is de-energized. The value of the d.c. resistance of the loudspeaker is monitored by ICi. The inputs of the circuit are connected to a Wheatstone bridge, one arm of which consists of R75 and the loudspeaker re- sistance, and the other of R77 and Ris. Measurements can, of course, only be effected when the output relay is not ac- tuated, because only then is the voice coil connected to pins 5 and 6 of connec- tor K2 via the relay contacts. Since the d.c. resistance is determined from direct voltages of only a few millivolts, net- work R76-C40 has been incorporated to prevent error signals arising from am- bient noise. Diode D20 limits the poten- tial across C«. If the d.c. resistance of the loudspeaker drops below the value of Rts (2.2 Q), ICi toggles which causes T38 to conduct. Diode D27 then lights to indicate that the loudspeaker resistance is too low. At the same time, the base voltage of T» is reduced to almost zero via D25: the relay can then not be energized. When the loudspeaker resistance is higher than 2.2 Q, the relay is energized a few seconds after power on. The voice coil is then no longer connected to pins 5 and 6 of K2 and ICi can not monitor its d.c. resistance. A fresh check on the loudspeaker resistance can only be made when the amplifier is switched on again or another malfunction has caused the relay to be deactuated. The power supply for ICi is derived from the ±56-V lines via zener diodes D21 and D22 and series resistors Rso and R92. The direct voltage at the output of the amplifier is measured by the differential amplifier formed by Tjs and Tw,. The output signal is fed to T3S via potential divider Rsi-Rs;, and to Tj 6 via a bipolar electrolytic capacitor formed by C« and Cjs. The difference signal across the col- lectors of the transistors is applied to low-pass section Rs3-R85-Gi2-C«. If the d.c. voltage is greater than ± 1 V, the col- lector voltage of either T35 or Tst drops to such an extent that T39 is switched on via D23 or D24 and this causes the relay to be de-energized via T80 characters per line) is being used. LOOKING BACK Updates, applications and improvements for recently published projects Stereo limiter (Elektor India, February 1988, p. 2.41. The operation of this design can be im- proved with a few minor alterations, which have to do mainly with the DC bias of the gain cells in ICj. To begin with, Cj and Cio are replaced by wire links. This upsets the DC bias of As and Ac., however, so that further modifications are required. The positive (non-inverting) inputs are taken to pin 6 and pin 10 of IC) instead of to ground. Further, R-C networks are fitted across Rs and R12 to reduce the direct voltage gain to about unity. The R-C networks only provide negative feedback for direct voltage, and do not, therefore, affect the AC gain. The last modification entails connecting an electrolytic capacitor in series with Rs (Ru). The modified cir- cuit diagram of the stereo limiter is given in Fig. 1. On the printed circuit board, replace Cj and Cio by wire links. The R-C net- works are soldered direct across Rs and Ru. Remove IC2 from its socket and bend up pins 3 and 5 before re-inserting the chip. Use short lengths of insulated wire to connect pins 3 and 5 with the in- dicated pins of ICj. HF operation of fluorescent tubes (Elektor India, July 1988, p. 7.41. Control of more than one tube. As stated in the article, the controller is, in principle, suitable for powering one tube only. When two tubes ar connected in parallel, a problem arises during start- ing. Normally, when one tube is connec- ted, resonance will occur at some point when the VCO frequency swings from 80 kHz to 30 kHz, and it is at this point that the tube is started. With two tubes in parallel, one will always start first, causing damping of the resonance circuit and making it impossible for the other to start. Simultaneous starting of the tubes is possible, but a matter of pure chance. Moreover, the current control 1 .62 elektor india January 1989 Fig. 1. Modified circuil diagram of the stereo limiter. circuit and power output stage of the tube controller are not capable of hand- ling double the current. Series connection of fluorescent tubes offers better prospectives, but works only with relatively low-power tubes of up to 2x20 W. The connection diagram is shown in Fig. 2. Capacitor Ci is omitted from the board, and ‘split up’ in Cia and Cit. During starting, Cia and Cib ensure a current flow through all tube filaments, and at the same time provide equal distribution of the start voltage. Since Cia and Cib are connected in series, their value should be double that of Ci (sec Tabic 1 in the article) to give the correct equivalent capacitance. Two series-connected fluorescent tubes of 20 W each are now equivalent to a single 40 W tube. Following the simultaneous ignition of the tubes, these can be dimmed as if they were one tube. It will be noted, however, that the point of minimum brightness (set with P2) is slightly less favourable Fig. 2. One controller board connected to two fluorescent tubes, than with one tube. This is so because at a certain point one tube will go out, but its parallel capacitor will tend to keep the other on. This effect can be explained by the highly irregular impedance charac- teristic of the fluorescent tube, which behaves like a current-dependent resist- ance. Series connection of fluorescent tubes is best done with types of the same manufacturer, wattage and age. There is no way to go round building the required number of HF controller boards when connecting, for instance, two tubes of more than 30 W, or 4 tubes of 20 W. Fortunately, these can still be dimmed simultaneously with a central control as shown in Fig. 3. In this set-up, it is important that the mains connec- tions to the controller boards are in Cable length between controller and A cable of several metres length is, in principle, no problem as long as its capacitance is low relative to that of Ci. In practice, this means that cables from Ki should not be allowed to run too close to those from K2. It is still strongly recommended to fit the con- troller board as close as possible to the tube, with adequate ventilation, because the use of a relatively high switching fre- quency on a long cable is bound to in- troduce a strong electromagnetic field which causes radio and TV interference. The use of shielded wire, however, is not recommended because it increases the capacitance to ground. Oscillator stability. The bias current of zener diode D12 in the control circuit is relatively low to re- duce the current consumption of the control circuit. In some cases, the bias current is too low, however, and gives rise to instability of the zener voltage. This results in temperature dependence of the Fig. 3. Showing how controller boards can share the intensity control potentiometer. oscillator start frequency. To ensure A timer/controller for aquarium lighting reliable start behaviour of the circuit, it is currently under development, is recommended to redimension a num- ber of components: Ri6 is changed from 6K8 to 2K7; Ri? is changed from 39K to 15K; C? is changed from 100 pF to 220 pF. 1.63 LOGIC FAMILIES COMPARED by Pete Chown A brief look at the most important characteristics of recently introduced logic families, and the way in which they can be interfaced to one another. Today, there exists a bewildering variety of logic families, and the rate at which new families are introduced and older ones become obsolete is perplexing to many. Metal-gate CMOS and standard 74 series TTL are now reaching the end of their useful life. Low power Schottky (LS) TLL is often still the first choice, although this family is now being superseded by HC-MOS. The continued use of of LS and S (high-speed) TTL probably results from lack of infor- mation about the alternatives. It is not enough to say that LS TTL does the job, however, because alternatives offer re- duced power consumption. The reason for the existence of so many different types of logic integrated circuit is that there is always a trade-off between speed and power consumption. The graph in Fig. 1 shows speed plotted against power. The modern logic families are those nearest to the bottom left, the point which would represent the ideal logic device, offering instantaneous operation at a power consumption of nought. The devices shown in the graph tends to form a line moving between the axes, showing different trade-offs be- tween speed and power. The older devices, LS, 74, 4000 and S, appear above this line. Among the new families is ALS-TTL, Advanced Low-power Schottky, offering devices which are faster and more economical as regards power consumption than pure LS-TTL versions. High-speed CMOS The new 74HC and 74HCT series of silicon-gate CMOS devices offer speeds equivalent to LS-TTL, but with negligi- ble power consumption. The 74HC device is the most useful, as it consumes least power, and offers the best range of output voltages for driving external devices (maximum output low voltage Voi=0.1 V; maximum output high voltage Voh= 4.9 V). The problem comes with their inputs. It is here that HC and HCT devices are different. Although +2.4 V might seem a strange value to’ mean logic high, standard 74 series TLL can give exactly that in the worst case. This level is, however, outside the specifications for HC devices. IC Manufacturers have been aware of this, and have developed HCT devices by changing the inputs of HC types, so that the worst-case TTL logic high level will be accepted. Full compatibility of HCT with LS-TTL is thus achieved at the cost of a small increase in the power con- sumption. HC and HCT devices are excellent for applications where low power and high noise immunity are important design considerations. The quiescent current consumption of an HC-MOS gate is about 0.0025 pW, increasing to about 170 pW at 100 kHz. Silicon-gate CMOS is the superior family when a high fan- out is required, since one output can drive about 1000 inputs. Many devices in the 74 LS-TTL family can practically be replaced by corresponding HCT devices as pin-compatible replacements. It is easy to become over-excited about the very fast devices, although these will probably have far more impact on us in years to come, probably becoming what LS-TTL is today. We can, however, look forward to getting rid of noisy fans, and to lifting the lid of our PC without the usual blast of hot air. There are two device families that fall be- tween the ones discussed. These are the 74AS/74ALS series and the FAST' 1 series. These two families are really rivals from different manufacturers — ALS is made by Texas Instruments, and FAST® by Fairchild and Motorola. The 74AS and 74ALS series offer a substantial re- duction in power consumption over the 74S and 74LS series respectively. The fan-out is doubled, propagation delays have been considerably reduced, and the maximum bistable frequency has been increased to 200 MHz. tp t [ns] 1 90. W 1 1 1 1 III i i n r T L LS ’■ HC/ HCT _J ALS - AC/ ACT .FAS T AS s :cl r °( PfmWl Fig. 1. Speed-power relationships of a number of commonly used logic families. Interfacing logic families One of the reasons that designers have been reluctant to use the new logic families is that they are worried about in- terfacing these devices to existing cir- cuits. The rules for interfacing are quite simple. Many devices are designed to be compatible without any external device. Most others simply need a resistor. The overview in Table 1 gives information on interfacing a number of logic families. The actual value of the pull-up resistor (when required) is chosen to lie roughly between the low value and the high value, which are calculated as follows: Ri 0 . . Vte-V°u-i [Q] IOL+flliL where Vcc = supply voltage; IoL(max) = maximum output low voltage; Iol = maximum sink current of driving n = number of . device inputs being driven; lit. = input current to driven device when input is low. VCC — VlHImii hIih-Ioh [ 2 ] V iH(min) = minimum input high voltage; Iih = input high current; Ioh = output high current. It will be found that NMOS does not normally need a resistor because this would have a very high value. Not sur- prisingly, therefore, circuits work well without one. Table 2 lists some com- monly used logic families and their parameters, allowing resistance values to be worked out. The resistor should ob- viously be inserted pulling up to Vcc. To choose the correct values to use in the above formulae, take the output parameters for the driving gate, and the input parameters for the driven gate. Conclusion If you think the logic market is complex now, it will be even more so in a few years’ time, because gallium-arsenide (Ga-As) devices promise operating speeds of around 4 GHz. These new devices will be around in parallel with FACT (Fairchild Advanced CMOS Logic) and existing TTL for a good time, because they will initially be so expens- ive. The ACT family, like HCT, is fully LS-TTL compatible, while AC gives basically the same drive problems as HC. Both new series are typically 2 to 3 times faster than LS-TTL or HCMOS. It should be noted that AC and ACT devices have a different supply pinning than LS-TTL, while the number of logic functions currently available is limited to certain bus drivers, and encoders/ decoders. The range of AC/ACT devices is expected to emend considerably, how- ever, in the next year or so. H Good documentation is essential for anyone designing, analyzing and testing circuits based on devices from the new logic families. 1.65 Macrovision decoder/blanker November 1988 11.48 The hsync LED, Ds, may fail to light even when a video signal of sufficient amplitude is applied. This can be resolved by replacing the Type 7805 voltage regu- lator in position IC4 with an 7806 or 7808. which Ri4 to be increased to 15 kQ. ENSURE YOUR COPY AT YOUR DOORSTEP Subscription to elekt©* is accepted from the current issue INDIA 1 Year Rs. 85/- 2 Years Rs. 160/- 3 Years Rs. 230/- OVERSEAS (SOUTHEAST & 1 Year ONLY BY AIRMAIL Rs 425/- SOUTHWEST ASIA ONLY) Enter details on botU sides of this iorm Please send, this form duly filled with your payment lor subscription PERIOD YR/S RS... CHEOUE/D.D/M.O. No DATE ... Payment to: Add. Rs 10 /- for outstation cheques Elektor Electronics Pvt Ltd 52-C, Proctor Road Grant Road (E) Bombay-400 007 LEARN-BUILD- PROGRAM The Junior Computer book Is for anyone wishing to become familiar with microcomputers, this book gives the opportunity to build and program a personal computer at a very reasonable cost The Indian reprint comes to you f elekto? Send full payment by M.O./I.P.O./D.D. No Cheque Please Packing & Postage free to. eIeI(TOR ElECTRONiCS pVT M. 52-C. Proctor Road. Grant Road |E|, Bombay-400 007.