INDIA December 1984 universal NiCad charger 10W valve amplifier TV receiver as monitor mini printer Volume 2 - Number 12 EDITOR: SURENDRA IYER PUBLISHER: C R. CHANOARANA PRODUCTION: C. N MITHAGARI ADVERTISING & SUBSCRIPTIONS ElEkTOR ElECTRONiCS pVT lid. Chotani Building 52 C. Proctor Road Grant Road (E) Bombay- 400 007. DISTRIBUTORS: INDIA BOOK HOUSE radership survey results 12-14 news, views, people 12-16 selektor 12-18 New materials for optical memories. the story of valves 12-20 sential for some applications. Here we review what used to be common knowl- edge among electronics hobbyists and see what valves are, where they are used, and*how to look for a fault if they do not work. circuit boards and soldering 12-24 How to make printed circuit boards at home and techniques (or good soldering PRINTED AT: TRUPTI OFFSET 103. Vasan Udyog Bhavan. Off Tulsi Pipe Road, j Lower Parel, BOMBAY- 400 013. Elektor India is published monthly under agreement with Elektuur B.V. Holland. August/ September is a double issue. SUBSCRIPTION INLAND mini printer 12-28 A full Centronics interface connects this thermal printer to almost any computer. It prints 40 characters per line at a speed of 80 c.p.s. Vesatility combined with low cost make this printer a must for any personal computer user. burglar deterrent 12-36 A LED to alarm would-be housebreakers. It protects your valuables without waking half the neighbourhood and without annyoing the Police by falsely crying 'wolf. RS232/V24: the signals 12-39 The signals recommended by this standard are dealt with in this article. Particular modems. 1 Yr Rs. 75/- 2YrsRs. 140/- 3YrsRs.200/- FOREIGN One year Only Surface mail Rs. 125/- Air mail Rs. 210/- use your TV receiver as a monitor The special video amplifier featured here will enable most TV sets to be converted 12-42 INTERNATIONAL EDITIONS EDITOR: P HOLMES COPYRIGHT i ELEKTUUR B.V. - •HE NETHERLANDS 1984 switchboard 12-63 missing link 12-70 index of advertisers 12-70 1984 12.03 National semiconductor manufacturers For an ever expanding spectrum of microelectronic applications — We can offer co-fired substrates and interconnects with precise tolerances for high-lead-count packages, complex motherboards and a wide variety of intricate modules. For technical and commercial details, write to: SUDHIR SURT! 2B, Parekh Mahal. Vir Nariman Road, Churchgate, Bombay 400 020. Phone: 297895, 250352 COLOUR TV MRNUFflCTURCRS FOR YOUR REQUIREMENT OF We are manufacturing electronic components and are interested in diversifying our activities. Are you interested in developing or suggesting microprocessor based commercially viable projects? Suitable ideas will be taken mutual benefit. CONTACT: DANNIES ELECTRONICS ENTERPRISE I m porters and Fxporters 77, High Street # 10-12, High Street Plaza. Singapore 061 7. Phone: 3372297, 3397696 Telex: RS 28612 ESQIPE Please rush with your ideas to M/s R.P. Associates, 3/35 Lokmanya Nagar, (June - 411 12.04 ALL YOUR COMPONENT REQUIREMENTS CAN BE MET FROM A SINGLE SOURCE IN SINGAPORE © danha Elaalicaias Fla. lid. I we stock: eletet©? I ^ izumiyaicinc T teledyne Magazines P.C.B. Drafting Aids relays I1CS1 KOIMTAKT (SHERMS ^Raytheon] Semiconductors Cleaners Semiconductors F=/=\l RCM 1 L_CD Semiconductors Texas Instruments Semiconductors vun Trimmin g Potentiometers Bread Boards as Semiconductors Transistors Metal Film Resistors Zener Diodes Bulk importers/end users in India may kindly forward their specific enquiries TO Device Electronics Pte. Ltd. 101 Kitchner Road # 02-04, Singapore Electrical, Electronics and Hardware Centre, Singapore 0820. TELEX: DEVICE RS 33250 PHONE: 2986455 We also invite enquiries for items not mentioned above. 12.05 394, Lamington Road, BOMBAY-400 004. FOR EVERY APPLICATION Manufactured and Marketed by: PADMA ELECTRONICS (P) LTD PRN Building, 24, Theradikadai Street, Tiruchirapalli— 620 002, Tamil Nadu. DOT MATRIX I PROGRAMMABLE GRAPHIC PRINTERS WITH SERIAL & PARALLEL INTERFACES. FLOPPY DRIVE SLIM TYPE 5V." FOR APPLE II MONITORS CRT 12" — Green — P31 phosphor. Small Quantity available, Exstock tML&IIDQte)© 15 New Queen's Road. Opera House. Bombay-400 004 Phones 350747 382968 CABLE DOMIRA Aplab 3030 Aplab 3131 15 MHz compact single trace oscilloscope * ' 15 MHz dual trace triggered oscilloscope DC-15 MHz bandwidth ‘ ' DC-15 MHz bandwidth 5mV/div. sensitivity * * 5mV/div. sensitivity on both channels Built-in component tester ' * Built-in component tester One x 10 probe free * * Two x 10 probes free Other models available at short deliveries 3033-15MHz, Battery operated • 3034-15MHz, Dual, Battery operated • 3035-10MHz, Wide screen » 3337-30MHz. Dual • 3339-30MHz. Dual, VDU scope • 3536-50MHz, Delayed sweep, Dual • 3537-50MHz, Dual • 3538-50MHz. Dual Storage scope Applied Electronics Limited Aplab House, A-5 Wagle Industrial Estate, Thane 400 604. Phone: 591861 (3 lines) Telex: 011-71979 APEL IN. 8/A Candhi Nagar, Secunderabad 500 003. Phone: 73351. 22C. Manohar Pukur Road. Calcutta 700 029. Nos. 44 & 45 Residency Road. Bangalore 560 025. Phone: 578977 Telex: 0845-8125 APLB IN. MF-3 Stutee Building. Bank Street. Karol Bagh. New Delhi 110 005. Phone: 578842 Telex: 031-5133 APLB IN dplab — Leadership through technology 12.13 New materials for optical The storage of information by optica! | methods has many advantages over I the conventional method of magnetic recording. Philips research laboratories are currently studying tellurium-selenium alloys, organic compounds, and magneto-optical | materials that can function as optical memories. Depending on the j material used, digital data (alphanumeric data and digital audio) and video information can be stored. | The advantages are rapid access to the information and a very large ' storage capacity. It is becoming apparent that the scope for the I application of optical recording is j very varied. It will be possible to meet the specific requirements of new categories of users. Magnetic materials for use as a memory for storing information have been studied for many years at | Philips research laboratories. One I result of the fundamental studies of | iron oxides is magnetic tape for many applications, including storage of large quantities of alphanumeric data and audio and video recording. As the use of magnetic tape increases and user requirements become more specific, various fail- I ings of this medium become j apparent. The storage capacity is limited and the information is only reliable for a certain time owing to | demagnetization. But sometimes the law requires that information should be stored for a long time. It then becomes necessary to copy the information every few years to | guarantee its reliability. A further disadvantage of magnetic tape is that it may take a long time to locate | a particular item. Philips research have long been seek- ing new methods of storage. The electro-optical techniques originally developed for LaserVision and the | Compact Disc have provided a good | starting point, since they are used for the storage of images and sound and are centrally produced. However, it is also possible for the user himself to store and retrieve information. In some cases, this information stored locally can be erased and replaced by new information. The major advan- tages of the new optical techniques are the larger storage capacity and more rapid access to the information. In brief, an electro-optical recording system consists of a disc the size of an LP covered with a sensitive layer in which a laser makes microscopi- cally small pits. Depending on the basic material, a particular physical effect occurs during read-out by the laser so that the information becomes available in coded form. The nature of the material deter- mines whether digital data (alpha- numeric information and digital audio) or video information can be stored. This depends on the required signal-to-noise ratio. The require- ments for video in this respect are more difficult because of the large number of grey levels. For digital data (only two levels) things are much easier. The material also deter- mines whether the information can be erased. As optical recording obviously had much to offer, an intensive search began for materials on which infor- mation could be stored with the aid of a laser. Philips research labora- tories are currently studying three classes of material that seem suitable for the optical recording of informa- tion: tellurium-selenium alloys, organic compounds, and magneto- optical materials. The last two groups are still almost completely at the research stage. Much more is known about tellurium alloys and, indeed, these have already been used in, for instance, the data disc for the digital optical recorder used in the Megadoc system that Philips introduced earlier this year. Despite great differences between the new media, there are a number of characteristic similarities in the recording and reproduction systems. Whichever disc is used, the system works best with a diode laser that operates in the infrared (about 800 nmlregion. This laser creates a physical change in the storage material (hole formation or a phase change in a tellurium-selenium alloy, pit formation in an organic com- pound. and magnetization direction in a magneto-optical material I . All such areas have a cross-section of about 1 micron, as the photographs show. The power of the laser for writing in information is about 10 mW at a pulse length of 50 ns. The read-out power is about 0.5 mW j for all materials. One of the new materials for the storage of information is a polycrystalline tellurium-selenium alloy to which small quantities of other elements have been added, e.g. arsenic to give better control of the melting point and the stability of the material. A thin layer of the alloy is applied to a substrate. A narrow laser beam is used to melt this material locally so that holes are created with the same depth as the layer. During the read-out process, with a less intense laser beam, the presence or absence of holes pro- duces differences in the reflection of the laser light. These differences in reflection represent the information in coded form. 12.18 elekla Research has been concentrated on determining the composition of the alloy and on finding an efficient technique for applying a very thin layer of the alloy to a disc. The 'shelf life' of the discs is extremely good. Life tests have shown that the stored information can be guaranteed for at least ten years without any need for special environmental conditions. Shelf life will be greatly increased in a controlled environment. The signal-to-noise ratio that can be achieved is so high that the disc with a tellurium-selenium alloy is ideally suitable for use as a storage medium for both digital data (alphanumeric information or digital audio) and video recording. The data disc for the digital optical recorder uses this technology. A compatible player is made by Van der Heem Electronics to a design by Philips Research Laboratories in Eindhoven (the Netherlands). Disc and player form one section of the Megadoc electronic data-storage system made by Philips Data Systems. A second type of player is currently being developed by Optical Peripherals Laboratory (U.S.A.), a joint venture of Control Data Corporation and Philips. The use of tellurium alloys also makes it possible to record infor- mation on a disc, erase it, and then use the disc again to record new information. By choosing the energy output of the laser appropriately (compared with the level necessary for the 'hole' disc) the polycrystalline material is melted locally, but no holes are formed. After the laser pulse the molten areas cool down so quickly that they solidify in a metastable amorphous phase. These amorphous domains reflect differ- ently from the crystalline surround- ings on read-out. Erasure takes place when a laser with a sufficiently high energy level transforms the amorph ous domains into the crystalline In most applications the disc can be used and erased many times. In prin- ciple, storage of both digital data and video recording is possible because of the high signal-to-noise ratio. These materials for erasable storage are now at the transition stage between research and development. Organic compounds Organic dyes exist that absorb a great deal of light and have a high reflectance even when applied in very thin layers. These thin layers of organic compounds seem to be a promising alternative to tellurium- selenium alloys. The memory effect is again obtained by melting the material locally with a laser to create small pits. The difference from the tellurium-selenium alloy is that these pits do not normally penetrate through to the substrate. The reflec- tance varies with the depth of the pit. The difference in reflection created by the pattern of pits is used when the information is being read. This melting process is irreversible, so the disc can only be written once. The shelf life is good: it has been found that these organic compounds retain the information just as well as the 'hole' discs with tellurium- selenium alloys. A great deal of research has been done on the 'light- fastness' of the material, which ensures that its characteristic proper- ties remain unchanged. These com- pounds have also been found to be very resistant to heat and moisture. One attractive feature is the simple spin-coating process for applying the organic compound to the disc. This type of disc has many appli- cations. The signal-to-noise ratio obtained experimentally is high enough for the storage of both digital and video information. Magneto-optical materials Amorphous magnetic gadolinium- iron-cobalt compounds have been known for a long time. A laser can be used to heat the material locally, reverse the polarity of small areas and freeze it in this state. This technique makes it possible to 'write' on a magnetised layer in a pattern of areas of opposite magnetization directions. This type of pattern can then be read out with polarized laser light. The direction of polarization of the reflected light is rotated slightly with respect to the polarization of the original laser beam as a result of the Kerr effect. The 'written' areas on the disc can therefore be distinguished from the unwritten ones, and information can be read | out. The information can be erased just as easily as it is written. The areas to be erased are heated by the laser, while an external magnetic field is applied with the same direc- j tion as the original magnetization of the layer; the magnetization of the | heated area reverts to its original direction after cooling. The infor- mation can be written, erased, and rewritten as often as required. The present research is much con- cerned with the operational life of the stored information. The stability | of the material is very important here. At present the signal-to-noise ratio is only moderate, so this storage method is suitable for digital data only (alphanumeric information and digital audio signals). It could very well be possible to improve the signal-to-noise ratio sufficiently for the recording of video signals. (944 S) A Philips Research press report 1984 12.19 Once upon a time... the story of valves Before the arrival of the transistor all amplifiers, transmitters, receivers, etc., were made with valves. In the eyes of many modern' people valves were (and are) fragile and unreliable and had a short lifespan. Not all that long ago, however, there was no alternative. Before the valve there were simply no amplifiers, and the transistor was only invented in 1948. But think about this: without FM transmitters (which contain valves) would there be any point in having a compact transistorised FM receiver? [ What exactly is a valve? Many of our more ] mature readers know, of course, but some I of the youngsters may think something along the lines of: "Oh yes, one of those old-fashioned fragile glass things with all sorts of complicated-looking bits and i pieces inside". This definition is not | strictly wrong but it leaves out rather -a lot. ! True, a valve is made of glass but, in spite [ of its appearance, it is not all that fragile, [ nor is it necessarily 'old-fashioned'. Valves are actually indispensable for certain ap- plications (even today) and in others — such as hi-fi for example — they are on I the way back ‘in’. (To see this you need look no further than the valve amplifier I elsewhere in this issue). What, then, is a better definition for a valve? The transistor's predecessor is seen as a device in which electrons are fed into one side and come out on the other side. Between the two electrodes is a con- trol electrode that can pass or inhibit the flow of electrons as desired. A major dif- ference between this and the transistor is that no current flows through the control electrode. In this respect valves are more similar to (MOS)FETs than to bipolar tran- sistors. Are there other notable differences be- tween valves and transistors? Plenty! It is quite normal for a valve to become warm even in its quiescent state: its innards must glow, actually, in order to generate the cloud of electrons needed. Although mechanically it is vulnerable, the valve is very robust in an electrical sense: it is almost indestructible! If something does go wrong then the impending failure can almost always be predicted beforehand simply by looking carefully at the tube. It does not just suddenly kick the bucket like a transistor! That, basically, is a sum-up of the most important points about valves. Up to now Elektor has had very little to do with valves but none the less some of our old hands are very knowledgeable on the subject. When we picked their brains this is the story that came to light. Under the magnifying glass An essential part in the operation of any valve is the movement of charge carriers (electrons) in a virtual vacuum. A valve consists of a glass tube containing a simple or complex electrode system. The electrodes must include at least a cathode and an anode. The cathode often has the shape of a nickel tube covered with a layer of barium strontium oxide. It is warmed to a temperature of about 700. . .800°C by a filament in the tube. The surface then attains a dark red colour. The filament is electrically isolated from the cathode by means of a layer of aluminium oxide but the heat conduction is very good. The heat increases the motion of the elec- trons in the cathode. As a result of this some of the electrons will reach a speed greater than the so-called 'emission vel- ocity’ and will leave the surface (this is thermal emission, also known as the Edison effect). An electron cloud (known as the space charge) then forms around the cathode. This cloud has a negative charge so the cathode is positively charged. A balance between cathode and electron cloud is reached, depending on the cathode temperature and material. If a metal plate which has a positive potential with respect to the cathode (an anode in other words) is now placed at a certain distance from the cathode it attracts some of the electrons. The cathode then redresses the balance by releasing more electrons into the space charge. (From now on we will forget the interaction between cathode and electron cloud and simply refer to ‘the cathode'). From the previous paragraph we see that electrons flow from cathode to anode (this is the anode current). Even if the anode is not positive with respect to the cathode a (small) current will still flow because the electron cloud is negative with respect to the anode. This valve, called a diode, has no threshold voltage. As the anode is not heated no current will flow in the vacuum if the anode is negative with respect to the cathode. Current flows in one direc- tion only so this diode can act as a rec- tifier. Triode, pentode, and other valves A three-electrode valve (triode) is made by placing a third electrode at a certain position between cathode and anode. This third electrode is normally in the form of a spiral with a fairly large pitch and is called the grid or control grid. If the voltage presented to this control grid is negative with respect to the cathode then the electric field between cathode and control grid will oppose and possibly even completely suppress the field between cathode and anode. The voltage * Ug2 = 140V U B 3-0V U 8 1 = 0V u 9l * V *7 'V - -2 V r ... . U9l ’~ 3 V anode voltage must be slightly negative in order to suppress the anode current completely. At zero volts there is already i grid voltage a much larger tage change node voltage is lower Hilarity to a transis 12.21 2 on the control grid thus affects the anode current. If the magnitude of the negative control grid voltage is increased it can shut off the valve completely. By applying an alternating voltage to the control grid the anode current is made to vary in time with the alternating signal. The grid is much closer to the cathode than the anode so the anode voltage (which gives an attractive force) must change more than the grid voltage (repulsive force) in order to compensate for any fluctuations in the grid voltage and thus keep the anode current, la, constant. The ratio between these two changes is called the amplification factor and is given by the letters ji or g. The ratio between a small change in grid voltage and the resultant change in anode current (if the anode voltage remains constant) is called the mutual conductance or slope (S) of the valve. The valve can be used as an ampli- fier if a d.c. or a.c. resistance is connected in series with the anode line. The anode and control grid of a triode form a capacitor. The anode circuit and control grid circuit are therefore capacitively coupled. The capacitive reac- tance decreases as the frequency increases. At high frequencies this can result in transfer from the anode circuit to the grid circuit so the whole circuit may oscillate. An extra grid, whose voltage remains constant with respect to the cathode, can be included between the anode and the control grid. This fourth electrode, called the screen grid, reduces the transfer characteristic drastically. The screen grid must not inhibit the anode current so it is fed a suitably high positive voltage. Electrons that manage to pass the screen grid are speeded up by the attraction to the anode. In some cases the speed may become so great that the impact energy is too much for the anode. The impact of a single electron can then cause the anode to release a number of electrons. The electrons thus released (secondary elec- trons) can either return to the anode or go to the screen grid. In the latter case the anode current characteristic displays a marked ‘dip’ at which point the circuit displays negative resistance properties and a tendency to oscillate. A further electrode may be introduced between anode and screen grid to oppose the flow of electrons from the former to the latter. This so-called sup- pressor grid is generally connected to the cathode. Its purpose is to reduce the speed of secondary electrons so that they reverse direction and return to the anode. This sort of valve, with five electrodes, is called a pentode. Other types of valves were also common, such as: the hexode (6 electrodes), the heptode (7 electrodes) and the octode (8 electrodes, six of which were grids). Numerous combinations were also made, producing the duodiode pentode, triode hexode, triode heptode, and so on. Pros and cons Normal radio valves were, of course, inferior to transistors in some respects. Transistors, for example, require no power to drive a filament but valves can handle much higher voltages and temperatures. Breakability of valves was not really such a problem as transistors cannot survive too much rough handling either. Just as with filament lamps, the anticipated lifespan was a compromise. Where long life was necessary (and more important than low cost) special types of valves could be specified, such as SO (Special Quality), LL (Long Life), and telephony valves, all of which had an expected lifespan of at least 10,000 hours. Apart from the ability to handle more power, the most important difference between transistors and valves is size. Valves are much larger so the case housing a valve amplifier, for instance, must be larger than its transistorised counterpart and it must have plenty of holes or slits to allow cooling air to enter. For the most part valves have been re- placed by transistors. They are generally only used now in high-power transmitters and for high frequency heating in industry. Valves still appear in other forms as magnetrons in radar transmitters and microwave ovens, as klystrons in TV transmitters and, of course, as cathode ray tubes in TV receivers. Practical tips Compared to transistors, some problems in equipment containing valves are fairly 4 dissipation is much too great. There are many possible reasons for this, such as: ■ the design is bad so the valve is overloaded; ■ incorrect circuitry at the anode side with not enough energy dissipation; ■ the valve does not have enough nega- tive grid voltage, with the result that the anode current is too large (caused by, for example, a short circuit in the cathode decoupling capacitor, far too much resistance in the grid line, an internal short between cathode and control grid, and so on). A violet glow within the anode shows that the valve is 'soft', which means that there is some gas inside the tube, its vacuum is not correct so the valve is approaching the end of its life. In some valves, however, this glow is normal, especially at high voltages. A violet glow may also be noted outside the anode, particularly along the length of the electrode system. This phenomenon is generally harmless, lb finish, here are two practical obser- vations. First of all, a valve should be mounted in a good-quality socket. Do not use a cheap one and do not solder it directly to a printed circuit board. Sec- ondly, valves must have enough venti- lation. They can take a lot of punishment but long-term overheating will kill even the best of valves. easy to track down. After power is applied it is easy to look at all valves and see if they are glowing. If so this means that the filament is intact and that it is being fed a voltage. In a tetrode or pentode the screen grid (the second out from the middle) must never glow. A red glow from inside, which may only be visible from some viewpoint underneath, signifies an overload of the screen grid. The power must be switched off straight away. The likelihood in this case is that there is no voltage at the anode of the tube, probably due to a break in the wire to this electrode. If the anode also starts to glow the power must be removed instantly because something is really wrong. The anode The set-up shown here (figure 4) was sometimes used when studying the oper- ation of a valve, ft consisted of a fairly taut sheet of rubber, in which the changes of potential at the different electrodes are represented by rises and falls in the sur- face. As the middle was higher than the outside rim the effect of gravity helped simulate the various forces on the electrons. Steel balls were released from the middle | (the cathode) and rolled outwards. The braking effect of a grid was mirrored using metal rings to raise the rubber sur- I face at places. A ball that had to roll up j an incline was slowed down, only to speed up again when rolling down the | other side of this ‘grid'. M Printed circuit boards Whal exactly is a printed circuit board? Well, basically it is an insulating sub- stratcon which components are mounted, and to which are bonded copper con- ductors in the required circuit inter- I connection pattern. A typical printed circuit board starts life as a piece of 'copper laminate board'. This is a sheet of synthetic-resin-bonded paper (SRBP) or epoxy-bonded fibre glass, to which a continuous coating of thin copper foil is fixed by adhesive. Once the required circuit connection pattern has been designed it is transferred to the copper surface in the form of an acid-resistant ink. The board is then immersed in an etchant solution that dissolves away the areas of copper not protected by the resist, leaving only the circuit track pattern. The resist is then cleaned from the board, holes are drilled to mount the components, the component leads are inserted through the holes and soldered to the copper tracks. Professionally produced printed circuit boards can, of course, be considerably more sophisticated. As an aid to inserting components in the correct locations a component layout is frequently prin- ted on the top face (non-copper side) of the board. The track pattern may also be printed, in ink. on the top of the board as an aid to circuit tracing. The copper side of the board may be com- pletely covered with a ‘solder mask', exept for small areas around the holes through which the component leads protrude. This means that the copper track can only be soldered in the area of these 'pads', and the solder mask prevents accidental’ solder splashes from adhering to other areas of the board. The pads themselves are frequently covered with a thin plating of tin, which aids soldering and prevents oxidation of the copper if the board is stored for some length of time before use. Alterna- tively a thin coating of a special lacquer may perform a similar function. If a circuit is particularly complicated it may be impossible to make all the required interconnections on one side of the board, in which case a ‘double- sided’ board may be used, which has copper tracks on both sides of the board. To avoid the necessity of wire In terms of ease of constructing electronics projects, enthusiasts have never had it so good as they have it today. In the bad old days of twenty or thirty years ago, circuits were constructed on laboriously-manufactured metal chassis using valveholders, tagstrips and wire. Nowadays the functions of support for and interconnection of components are frequently f ullfilled at one fell swoop by the indispensable printed circuit board. links to make connections between the top and bottom of the board, ‘plated- through holes’ are often employed. This means that metal is electroplated through a hole from a pad on one side of the board to a pad on the other side. An interesting possibility offered by double-sided printed circuit boards is that components can be mounted on both sides of the board. Boards available from the Elektor Printed circuit board Service (EPS) are typical examples of current p.c.b. practice (see figure 1 ). Home-made p.c.boards Home production of all but the simplest p.c.boards involves considerable outlay and a fair amount of skill, which is why Elektor offers ready-made boards for many projects. However, it is apprecia- ted that some readers will wish to 'have a go’ themselves. By far the most difficult aspect of printed circuit board production is the design, i.e. transforming a theoretical circuit into a practical p.c.b. layout. Unfortunately there are no hard and fast rules for this, and skill only comes with practice. The best plan is probably to study professionally produced lay- outs such as those in Elektor, and to build up one’s skill gradually starting with simple circuits. If a p.c.b. layout is already given then no design problem exists, and the design can be transferred to the copper lamin- ate board. First of all the board must be cut to the correct size. -Then the copper surface must be scrupulously cleaned to ensure even etching. This can be done using a Brillo pad, wire wool and soap or an abrasive cleaner such as Vim or Ajax. After cleaning the board should be washed thoroughly to remove any traces of the cleaner and dried using a lint-free cloth. To make a ‘one-off board for a not-too- complicated circuit the simplest method is to draw the layout directly onto the copper using an etch-resist pen or an acrylic marker pen For complicated shapes such as ICs.etch-resist transfers are available. These are simply rubbed off the backing sheet onto the I Figure 1. Boards from the Elektor Printed circuit board Service are typical examples of modern p.c.b. practice. Etching Once the layout is complete the board is immersed in an etchant solution. Various exotic chemicals are used in industry, but for the home constructor ferric chloride remains the standard etchant. This is available in solution, either con- centrated or ready for use, and the sup- plier’s instructions should be followed. Ferric chloride is also available in crys- talline form, in which case a solution must be made up. A suitable solution for etching is 500g of ferric chloride crystals to one litre of water. When making up the solution the crystals should always be added to the water, never the other way round. One litre of etchant is sufficent to etch 3000 to 4000 sq cm of board. Ferric chloride is extremely corrosive and it is advisable to wear protective clothing such as rubber gloves and a plastic apron when using it. If ferric chloride comes into contact with the skin it should be washed off immedi- ately. If it contacts the eyes these should be washed with copious amounts of cold water and medical assistance sought immediately. All utensils used to contain ferric chloride should be of glass or plastic, never use a metal container. If it is to be stored for any length of time, the container must be air-tight. Ferric chloride is hygroscopic, which means that if given half a chance it will capture moisture out of the air until it over- flows a normal container! Etching can be speeded up by warming the solution. The easiest way to achieve this is to place the dish containing the etchant in a bowl of warm water. Whilst the board is in the solution it should frequently be agitated to bring fresh solution into contact with the copper and to dislodge the ‘sludge’ of iron that is displaced from the solution as the copper dissolves. The board should be checked period- ically to see how the etching is proceed- ing. It should not be left in the solution once etching is complete as the etchant will begin to undercut the edges of the copper track where the resist does not protect it. Once the board has been etched the resist can be scrubbed off and holes for the components can be drilled. The components should be mounted and soldered before the copper has time to tarnish, and the copper should be pro- tected by a coat of lacquer immediately after the circuit has been tested. If the board is to be stored for some time before mounting components then it should be given a coating of special printed circuit lacquer, available from Doram. This is somewhat more expens- ive than ordinary decorative lacquers, but the board can be soldered through the lacquer, whereas ordinary lacquers inhibit soldering. Photographic methods If several boards of the same design are to be made, or a complicated layout is to be copied from a magazine, then it is worth considering photographic methods. There are several ways of transferring a layout onto copper laminate board photographically. The method for making a board from one’s own layout design is to draft the layout onto transparent or translucent film (available from shops selling artists' materials) using black, self-adhesive draughting tapes and pads This is known as a positive master The cleaned copper laminate board is then coated with a positive photo-resist such as Fotolak, according to the manu- facturer’s instructions. The master art- work is placed in contact with the resist and the resist is exposed to light (which may be ultraviolet or visible light de- pending on the type of resist) through the master artwork. The exposed board is then placed in a "developer bath (or sprayed with devel- oper depending on the type of resist) when the exposed portions of the resist (those not covered by the black track of the artwork) are developed away. The board is then washed and etched in the normal way. Negative photoresists are also available; if these are used then the unexposed portions of the resist are developed away. Of course, a negative photoresist entails the use of a negative master, i.e. a black background with transparent areas for the track pattern. This must be produced by making a contact print of the positive I master onto photographic film. Only readers who do their own photographic processing will have the necessary equip- ment, and it is not intended to discuss this method further. Layouts printed in magazines may also be photographed, and the photographic negative can be enlarged to the correct master. Here again, readers who carry out photographic processing will know how to do this. Alternatively, any local photographer should be able to carry out this work for a modest charge. Soldering Having purchased or made a printed circuit board, there is then the problem of making a reliable electrical (and mechanical) connection between the component leads and the copper tracks on the board. Soldering involves the use of a metal that will melt at a relatively low temp- erature (usually about 200°C), which will form a molecular bond with the component leads and the copper track. The temperature must be fairly low since components are susceptible to damage by excessive heat, as is the adhesive used to bond the copper to the printed circuit board. Electrical solder is an alloy of lead and tin. Pure lead melts at 232°C and tin melts at 327°C, but an alloy of the two metals, paradoxically, melts at a lower temperature than either of the consti- tuents. The temperature at which the alloy melts depends on the proportions of the two constituents. The lowest melring point for a tin/lead alloy is 1 83 C, and is obtained when the propor- tions are 63% tin to. 37% lead. An alloy with the lowest possible melting point is known as a eutectic mixture (Greek: eutektos - easily melted). A eutectic alloy of tin and lead changes from a solid to a liquid at exactly 183°C. If the mixture is not eutectic then the alloy will not melt at exactly this temperature but will exhibit a range of temperatures where it has a ‘plastic’ consistency. This is shown in figure 2. It is not a good idea to have solder with too large a plastic range. If the soldered joint is moved whilst it is cooling from the liquid state, through the plastic state to the solid state, this can result in the alloy solidifying with an extremely crystalline structure which has poor mechanical strength and high electrical resistance. The actual proportions of electrical solder are normally 60% tin to 40% lead. Small quantities of other metals are also added, such as antimony to improve mechanical strength. Even this is not the whole story of solder, however. The component lead and p.c.b. track are covered with a layer of oxide that prevents the solder from ‘wetting’ the metal and forming a molecular bond. Even scrupulous clean- ing of the board and component leads will not help, because an oxide layer only a few molecules thick will form instantaneously on a clean metal surface. To enable soldering to be carried out, flux is required. This consists of an organic resin that improves the wetting properties of the solder and an activator that dissolves oxide. Electrical solder for general use is produced in the form of a wire of circular cross-section. The flux is an integral part of this wire in the form of three or more cylindrical cores of flux running down the centre of the solder, as shown in figure 3. To make a soldered joint the components to be joined (e.g. a component lead and circuit board pad) are heated simul- taneously with a soldering iron to a temperature higher than the melting point of the solder. The solder wire is then fed into the joint, not to the soldering iron as the excessive heat will vapourise the flux too quickly and will cause the solder to oxidise. At about 160°C the flux becomes active and cleans the surface of the com- ponents. At around 200°C the molten solder displaces the flux from the metal surfaces and wets them, forming a molecular bond. The soldering iron is then removed and the joint is allowed to cool without moving it. A good soldered joint should have a smooth, shiny appearance and a concave surface, and the solder should flow smoothly into the surface of the two components. Excessive amounts of 12.26 eleklot india december 1984 solder and large blobs with convex surfaces are signs of a poor joint. A cross-section of a good soldered joint is illustrated in figure 4. When making electrical soldered joints, no flux is required other than that contained in the solder, and the use of.’ acid-based fluxes, such as those used in plumbing and metalwork, should be avoided since they are corrosive and' electrically conductive. Soldering irons Soldering irons have come a long way since the days when they had to be heated up on a gas ring, and a large and bewildering range of types is now avail- able. The cheapest type of soldering iron, which will be perfectly adequate for the home constructor’s purposes, is the continuous heat type. This typically consists of a thermally and electrically insulated handle, from which protrudes a stainless steel shaft containing a ceramic encapsulated electrical heating element. The business end of the iron - the ‘bit’ - is a hollow copper cylinder that slides over the shaft and is secured by a spring clip. The tip of the bit may be a variety of different shapes depending on the intended application, and a selection of different bits are shown in figure 5. Large bits are obviously used for heavy- duty work and small bits for fine work. The element of a continuous heat iron is connected permanently to the supply, and there is no control over the bit temperature. This means that the iron will cool down whilst actually making joints, since heat is drawn from it to heat up the joint and melt the solder, but it will become very hot when not being used. This can mean that the first joint made after the iron has been stand- ing idle may be overheated. The problem can be reduced by using a metal stand for the soldering iron, which will act as a heat sink and will ensure that the iron does not become too hot whilst idle. Continuous heat irons are available in various wattage ratings, but for general Figure 2. Illustrating the malting points of different alloys of tin and lead and the plastic region exhibited by non-eutectic mixtures. Figure 3. Electrical solder has cores of flux running down the centre of it. No additional flux is required with this type of solder. Figure 4. Illustrating the principal points of a good soldered joint. 1. p.c.b. substrate 2. copper layer 3. alloy of solder and copper track (only a few molecules thick) 5. alloy of solder and component lead 6. component lead 7. the maximum angle the solder makes with the track should be less than 30°. Figure 5. A selection of soldering iron bits. Figure 6. When making a joint the component and pad should be heated with the soldering iron and the solder run into the joint, not 5 V use a 20-25 W model, together with a selection of different bits, should prove adequate. If a great deal of fine work is to be undertaken then it may also be worth considering a 1 0-1 5 W model, and if any metal work is to be undertaken (e.g. screening enclosures for r.f. cir- cuits) a 60 W iron will be useful. The smaller wattage rating irons are often available in different voltage ratings. For general use a mains powered iron is probably the best bet, but if the enthusiast’s interest involves outdoor work such as car electronics, mobile radio or field servicing then a 12 V iron may prove useful. Temperature-controlled irons The use of a soldering iron whose bit temperature is controlled allows more precise control over joint quality, and helps prevent delicate components from being damaged by overheating. There are two principal types of temperature- controlled irons. The first type uses a thermistor to sense bit temperature and an electronic control circuit to switch the power on and off. The temperature of this type of iron may be continu- ously varied by a potentiometer that alters the switching temperature of the control circuit. The second type of temperature-con- trolled iron is made by the Weller company and utilises an unusual property of magnetic materials. Above a certain temperature known as the Curie point, ferromagnetic materials cease to be magnetic. The bit of a Weller iron contains a small slug of ferromagnetic material. When the iron is cold this attracts a magnet, which closes a switch and applies power to the element. When the Curie point is reached the slug becomes non-magnetic and the magnet s released, opening the switch. To alter the bit temperature of a Weller -on it is necessary to change the bit for one which has a slug of material with the required Curie point. Soldering iron bits Soldering iron bits almost invariably used to be made of copper, since this is a good conductor of heat. However, each time a soldered joint is made a little copper dissolves in the solder, and eventually a copper bit becomes pitted and has to be filed down. Modern bits are generally made of copper, plated with some harder metal such as iron or nickel, which does not dissolve. These bits should never be filed, but should periodically be wiped on a damp sponge, while hot, to remove excess solder and Before using any bit for the first time, it must be tinned - coated' with a fine layer of solder - to prevent oxidation and improve thermal contact with the joint when in use. The iron should be switched on and the solder held in contact with it. As soon as the solder melts it should be run over the entire tip of the bit. Any excess solder may then be wiped off. Soldering techniques Having chosen a suitable soldering iron and the correct bit for the job, it is important to use solder of the correct diameter. If the solder is too thick it will be difficult to control the feed rate into the joint and the joint may become flooded with solder. On the other hand, if the solder is too thin then a much greater length must be fed into the joint and it will take longer to make each joint. Fine solder is also more expensive (per unit weight) than thick solder. For general purpose use 1 8 SWG solder should prove adequate, and for fine work such as soldering ICs 22 SWG solder should be used. When soldering components into a printed circuit board the following se- quence should be adhered to: 1 . Any terminal pins should first be in- serted into the board. 2. Small, horizontally mounted com- ponents such as resistors and diodes should then be inserted into the board. During the soldering operation the board can be laid, component side down, on a piece of plastic foam, which will hold the com- ponents in place. Alternatively, the leads can be bent outwards at an angle of about 45° to hold the com- ponents in place. 3. When the components have been in- serted into the board the leads can be cropped off fairly close to the board, using wire cutters. 4. To solder components, apply the tip of the iron to the component lead and the pad simultaneously and run solder onto both (see figure 6). When sufficient solder has run onto the joint remove the solder and the iron and allow the joint to cool. 5. The procedure can then be repeated for ICs or IC sockets, transistors and large or vertically mounted com- ponents. 6. To improve the appearance of the board any excess flux can then be removed with methylated spirit. If components have to be removed from the board for any reason, this should be done with great care to avoid damaging the copper track. Grip one lead of the component to be removed with a pair of pliers, reheat the joint until the solder melts then pull the lead clear. Repeat for the other lead(s). To remove ICs it is best to use a ‘solder sucker’ to remove solder from every pin of the IC, thus leaving the IC free to be removed. Before inserting a new component it is essential that all the holes should be free of solder. This can be ensured by using a solder sucker, or by heating up the pad and inserting a pencil point into the hole. The board should be allowed to cool completely before inserting the new component, as otherwise there is a danger of lifting away the copper track from around the hole due to weakening of the adhesive by heat. If all the preceding recommendations are followed there is no reason why the constructor should not enjoy a high success rate when using printed circuit boards. M 1984 12.27 pnnter p •=! r s t u u w xy z i ! > " v with Centronics interface J \ 4 *1? X P 3. 3 *y ',Mbb09: Many home computer enthusiasts dream of the day they will be able to get themselves a printer. Programming and editing on the monitor can be very tiring — to say the least. In many cases the Centronics interface is already available or, as in the Commodore 64, programmable. All that is needed, therefore, is a printer. As the article describes the principle of a dot matrix printer in some detail, it is also of interest to those who have no intention of building the printer. u 1 2.28 elektor in For most listings, the eighty or even 126 characters per line as provided on most dot matrix printers are not really necessary. For disassembler listings, forty characters per line are ample. And therefore, the only real limitation of our Mini Printer compared with its bigger, commercial brothers is that it prints only forty characters per line. This is adequate for most BASIC programs, too, but if you want to print a BASIC program from a commercial cassette or diskette that has more than forty characters per line, simply format it by adding line numbers. Table 1 gives an example of how this is done. Price and specification We obviously do not want to compare the Mini Printer with an Epson or NEC printer which may cost up to eight or ten times as much. What is important is the perfor- mance of the Mini Printer, and, as can be seen from the technical data in table 2, that stands up very well. At this stage, some of you will ask: "That’s all well and good, but what about the mechanism and the processor? Are they included in the price, or where do I get them from?" Not to worry — both are catered for. Actually, they caused this proj- ect to take off, for some time ago we were provided by Seiko with one of their basic, low-cost mini printers. Once our designers had assessed and modified it, and Seiko had expressed their willingness to supply the processor and hardware on a one-off basis, we had the nucleus of the design presented in this article. Hardware and chemistry As shown in the photograph in figure 2, the mechanism of the printer is an ingenious piece of precision engineering. The motor drives not only the spiral guide roller for the print head but also the paper feed, which is made possible by the special construction of the guide roller. The motor speed is monitored constantly by a tacho-generator built into the motor housing. The print head contains seven thermo needles (miniature heating elements) one above the other. During printing those needles that are to place a dot onto the paper are actuated simultaneously. The thermo paper is continually pressed against the print head by the paper guide. A thermo-chemical reaction, which discolours the paper, takes place at the position of those needles that are heated. As the paper is white with a dark background, dark dots are caused on the paper. Note that this thermo-active paper may be obtained from stationers and department stores: it is not metallized paper! Block schematic The print mechanism must be driven so that an ASCII unit at the input of the Cen- tronics interface is converted into a character on the paper. This cannot be achieved by a simple conversion, because there are also intervals of various lengths between the characters to be considered, as well as the control of the return mechanism and the shifting of the paper feed once a line has been completed. All this is taken care of by the single-chip central processing unit (CPU) type 8049: when this is programmed for our pur- poses it is type-coded 8049C289. As can be seen from the block schematic in figure 3, the CPU is at the centre of a number of additional stages which are actually contained in only a few com- ponents. The Centronics interface matches the CPU input to the Centronics standard. The 'print format' determines the number of characters per line. ’Control' enables the manual control of the paper feed and reset. The clock for the printer is generated separate from that for the CPU. Table 1 2111 Mal£nt(M.t>!lMSC:IF DMXCft') OR DMSCCO'I TKX2MI or OMScrtn necHi Technical Data ■ Centronics interface with StI. READY, ACK, D0...D7 ■ CPU: single-chip microcomputer 8049C289 ■ dot matrix print head, 7 needles (styiil ■ 5 x 7 dot matrix ■ characters separated by two spaces ■ contents: 159 characters ■ speed: 80 characters per second (c.p.s.) ■ 13, 16, 17, 20, 24. 25. 32. or 40 characters per line (presettable or programmable) ■ printing direction: left to right ■ width of thermo paper: 79 mm ■ switches for paper feed and reset ■ power supply requirements: 5 V + 5%, current consumption 3 A maximum during printing. 130 mA on standby: power supply on printed Figure 3. The block wire bridgels). 16 , 7 20 24 25 32 40 P20 no yes no yes no yes no yes P21 no no yes yes no no yes yes P22 no no no no yes yes yes yes By adjusting the printer clock, the con- trast, that is, the darkness with which the dot is printed on the paper, is changed. Moreover, the supply voltage and the ambient temperature also affect the cir- cuit, so that the contrast ensures an even print quality. The 'power down reset' stage will be discussed in detail in the circuit descrip- tion. The ‘power supply’ is shown con- nected to the print head interface, the thermo print head, and the motor only, because these elements between them consume by far the larger part of the cur- rent. but it powers the other parts of the circuit as well, of course. The 'print head interface' transforms the logic level of the CPU output into a sufficiently large cur- rent for the individual thermo needles, and also controls the motor and the print head. Finally, the 'pulse shaper’ converts the sinusoidal output of the tacho- generator into rectangular signals at TTL Circuit description The various blocks of figure 3 are easily recognized in the circuit diagram in figure 4 which again is dominated by the CPU. The Centronics interface consists of pull-up resistors R24 . . . R31 and R37, as well as the two monostable multivibrators, MMV1 and MMV2. The strobe signals pro- vided by different computers vary be- tween a half and several microseconds. As the 8049 requires a signal of about SO milliseconds, the strobe signal, STB, is stretched appropriately in MMV1. In the Centronics standard, at the READY signal the level of the sign al is determinant, whereas at the ACK signal, the trailing edge of the pulse is. Most computers, including the Junior, and interface elements such as the PIA8255, need the trailing edge and therefore use the ACK signal for acknowledgment. Here, i t is derived by MMV2 from the READY signal generated by the CPU. The print format, that is, the number of characters per line, is determined by wire bridges P20. . .P22 as shown in table 3. If you want, a DIL switch may be used instead of the bridges, or the port lines may be controlled by TTL levels so that the number of characters can be changed every line. The fewer characters per line are chosen, the wider and bolder they become. The reset and paper feed signals, con- trolled by push button switches S2 and SI respectively, are actuated on negative logic levels. Both these networks need a current limiting resistor, R4 and R5, but 12.30 the paper feed circuit also needs a also by the supply voltage and the mini? decoupling capacitor, C3. The decoupling ambient temperature. In this way the is not necessary for the CPU but as a effects of voltage and temperature vari- ‘kindness’ to the motor and print ations are kept within tight limits to ensure mechanism. Port P23 of the CPU is not even quality of print. scanned during the printing process so To understand this, you have to take the that switch S2 is then inoperative. print head drive bus and the print head The clock oscillator for the printer con- interface into consideration as well. The sists of gates Nl, N2, N4, resistor R9, and head drive bus consists of the data bus of capacitor C9. A presettable current source the CPU, DB0. . . DB7, and port line P27. comprising transistor T3, resistors R6 . . . R9, The dot information, which the CPU has and preset PI loads the oscillator circuit built up from the ASCII units, is available and can therefore affect the frequency. at DB0. . . DB6. The motor is controlled This arrangement makes diode D1 from DB7. Integrated circuit IC2 is an necessary. The output of the oscillator is 8-transistor array which is used here as a buffered by N3. The frequency of the non-inverting line driver. The common clock is nominally 16 kHz but can swing connection of the heating elements, as over quite a wide range. It should be well as the positive terminal of the motor, Fj uf noted here that the current source is is at + 5 V. The motor and the appropriate posit affected not only by the setting of PI but heating elements are actuated by connec- also 4 I. Tha dominant i of the CPU is ident in the circuit ting the relevant outputs of IC2 to earth. The pulse width of the needle point out- puts is determined by the frequency of the printer clock and the CPU The pro- cessor checks whether the corresponding heating element has been in operation recently. If so. the element is still warm and should not be supplied with heating current for too long, otherwise it may bum out. Therefore, the CPU holds the relevant output active (ie. at logic 0) for only six- teen clock pulses, starting with the fifth of the dot cycle. If the element has not been heated recently, the CPU output remains at logic 0 for twenty clock pulses, starting with the first of the dot cycle. When the data bus is in the high-im- pedance state, pull-up resistors R16. . .R23 are connected to it via port P27 and T2. This is essential as the 8049 does not have internal pull-up resistors. Always make sure, therefore that the inputs of IC2 are unambiguously at logic 1 when the data bus of the CPU is inactive. Terminal R of the print head interface con- trols the print head in position ‘home’. Capacitor C13 is necessary to decouple the motor power line from that to the heating elements, which has the added benefit of contributing to even quality of printing. The pulse shaper for the tacho signal is formed by D2, Tl, R12, R13, and C8. Ignor- ing the threshold voltage of the diode, the shaper functions as follows. During the positive half cycle, D2 blocks, whereupon Tl gets a sufficiently high base current via R13 to start conducting. During the negative half cycle, D2 conducts, so that the base of Tl is negative, and the tran- sistor is cut off. A rectangular signal at TTL level, the frequency of which is equal to that of the sine wave at pin 1 of the 8049, therefore exists at the collector of Tl. Capacitors C6 and C7, and inductor LI, are the externally required components for the internal clock of the CPU. The 2.32 clock frequency is around 6 MHz: its exact value depends on the tolerances of the external components. The precise value is, however, not important as the 8049 is on ‘hold’ for most of the time. The power down reset circuit is based on the precision voltage comparator ICL8211. The circuit ensures that during short breaks in the supply voltage the program of the CPU is not confused which might conceivably give rise to the heating elements being actuated inadvertently and so cause the print head to bum out. To do so, the circuit generates a reset pulse during supply breaks: a printing error is better than a bumt-out print head! Strictly speaking, however, the circuit is not necessary because in most cases mains power failure is completely taken care of in the power supply. In any case, in the absence of mains voltage, the power on reset is actuated when the printer is switched on. And if the worst comes to the worst, a print head costs only a few pounds. It is, however, import- ant that if the power down reset circuit is not used, the RESET terminal, pin 4, of the CPU is taken to earth via C5: there should be no other connections to this pin! The power supply is a conventional circuit with fixed voltage regulator, for which in this case a 78H0S (with aluminium TO-3 housing!) is used to cope with the current requirement of the printer. 12.33 and exit slits. The position of these slits is shown in figure 10. If the holder is posi- tioned accurately, the beginning of a new paper roll (cut straight beforehand) is simply inserted into the entry slit, the paper feed picks it up (press SI!), and it then emerges from the exit slit. It is thus not necessary for the case to be opened to change the paper roll. Either touch-type or normal push button switches may be used for SI and S2. In either case the relevant part of the PC board (clearly marked on figure 5) must be cut off and fitted behind an appropriate cut-out in the front panel. Cut- ting part off the board enables the use of a variety of mains transformers. It is, of course, perfectly feasible to assemble the printer to your own design: the only thing you have to be careful with fore best to mount this component last and preset it immediately prior to solder- ing it in position. Before commencing work on the printed circuit, have a look at the photographs in figures 6 and 7 which show how we assembled our prototypes. The printing mechanism is fitted on a metal plate above the printed circuit and is fastened to the rear panel of the case. This arrangement saves a lot of space and the case can therefore be smaller and less expensive. The connection between the output ter- minals on the printed circuit and the socket on the side panel (for the flexible print head cable) is best made in flat rib- bon cable. We have designed a simple holder for the paper roll and this is fitted at the rear panel of the case behind the paper entry 1 2.34 elekla 8 is to ensure that the paper does not pass across the heat sink of the voltage regulator or the mains transformer. Finally, it is recommended that in spite of the temperature-compensated oscillator circuit some air vents are provided in the Table 4 shows the pinout of the Cen- tronics socket on the printed circuit, while figure 8 shows the connectors to the prin- ting mechanism and the print head. Calibration IMPORTANT: before the printer is con- nected to the mains, make certain that PI has been preset as instructed under 'con- struction'; failure to do so may result in a bumt-out print head! Also, before the calibration is commenced, the printer must be connected to the Centronics out- put of a computer. The computer is then programmed to give forty ietter characters in a line. Switch on the printer and let the computer pass the line of characters to the printer: the print head should now move across the paper. In most cases there will also be a print-out on the paper, most probably too bold or too faint, and as likely as not there will not be forty characters across the paper width. There will either be forty characters across part of the width of the paper, or there will be fewer than forty printed in too wide a fount. Careful adjustment of PI and repeated test printouts will result in optimum setting of the potentiometer and this is evidenced by the printing of forty clean characters in line across the width of the paper. During this calibration it will become quite clear how the printer clock affects both the number of characters per line (or rather, their width on the paper) and the contrast (ie. how bold or faint the characters are printed). If you have incorporated the power down reset circuit, this should next be calibrated. First, pull out the mains plug and that of the print head! Next, connect a regulated power supply across Cll and adjust P2 so that pin 6 of IC6 becomes logic 0 as soon as the output of the power supply drops below 4.S V. Take care that the voltage does not exceed 5 V during the calibration. Finally, test the paper feed switch, whereupon the lid can be closed onto the case: the printer is ready for use. H l / 01234567 89 s ; < =>? 3ABCDEFG HI JKLMNO PQRSTUUW XVZC ¥]-•_ ' a b c d e f 3 h i ■ j k 1 m n o p 3 r s t u u w x y z £ ! I:-"" D r _, -. ■ T>? 4 ■S x 5t P j. 3 *y o l> 7 . 1 z y k tlfl * I Li l> □ n n Bure 9. The sum total of e characters available In e mini printer. Above Figure 10. Rear panel: positions In our prototype 12.35 Every week the local papers carry tales of burglaries and break-ins, sometimes in our own street or neighbourhood. Most of these crimes are the work of the 'amateurs' or opportunists of the criminal world and they, unlike their 'professional' counterparts, should be quite susceptible to some sort of deterrent, even if it is very simple. A popular ploy has been to mount an empty burglar alarm box on the side of the house but as the number of affordable burglar alarms has increased recently most people are now more likely to fit the full system. The problem then is the large number of alarms falsely crying 'wolf', with the result that real burglaries often go unnoticed. The circuit proposed in this article does not give false alarms; in fact I it gives no alarm at all. Instead it produces a light signal that will never call out the Police unnecessarily, which in itself is a distinct | advantage. deterrent the window and sees a nondescript case with an enatically flashing LED in the side he will be forced to think about all the technological secrets that LED could be hiding. It could be an infra-red sensor, or maybe it indicates ultrasonic waves bounc- ing around the room, or maybe. . . (Mental gear-wheels engage in a criminal mind.) Soon an unwished-for thought shouts for attention: ‘But why is it flashing at all?. . .Does it know I’m here?. . .Has it told anybody?’ At this stage your average criminal will (hopefully) let instinct take over and leave while the going is good. If he does the circuit has performed its pur- pose at least as well as an alarm; if not, the chances are that no alarm would have deterred him anyway. a pseudo burglar alarm with a 'noisy' LED j A clever defence lawyer may call a ] burglar caught in the act "the victim of an | imperfect (or unjust, or whatever) society” and try to prove that society is the real cause of all crime. Be that as it may, com- ing home to find your house burgled and ransacked is an experience most people | will gladly forego. Often the worst thing is knowing that somebody has literally in- | vaded your privacy. To prevent this sort of occurence many homeowners decide to instal (or, more likely, pay somebody to instal) a burglar alarm. The trouble is that it is generally not at all easy to fit a really effective alarm, and you invariably have to pay dearly for this sort of security. | If we go right back to the basic problem | it is clear that although detecting a burglary while it is in progress is very laudable it is certainly not to be preferred to preventing the criminal from even beginning in the first case. Nowadays a crook (‘amateur’ or ’professional’) who sees a burglar alarm box tacked to the side of a house knows that he will just have to work quickly and make a getaway before the neighbours are properly awake. If, on the other hand, he looks in The basic circuit This circuit is a burglar deterrent unlike the run-of-the-mill alarms, as the block diagram of figure 1 shows. Connected directly, to the mains is the power supply section, consisting of two parts: a voltage dropper and rectifier, and a regulator. This is directly followed by a clock, which feeds a noise generator formed from a shift register. The resultant noise signal is applied to the last stage, the ‘display’ via a control section. A noisy LED Unusually, for a mains-powered circuit, there is no transformer to be seen on the circuit diagram of figure 2. This means that certain tracks on the printed circuit board carry 240 V a.c. so be careful about working on the circuit, or trouble-shooting it, while the power is switched on. Whenever the mains power is removed capacitor Cl is discharged through resistor R8. If this were not done there would be a chance that the voltage across this capacitor could give somebody a Numbers, simple arithmetic and variables are the main elements in a BASIC program. They are all dealt with extensively in this second part of the series. We will also discuss the memory, commands, error detection, editing, spacing, comparisons and the LET and PRINT statements. Quite a 'program'! The first part in this series introduced BASIC. The difference between compilers and interpreters was explained and the importance of flow charts was stressed. A simple example illustrated the use of numbered program lines, the statements END and PRINT were introduced, and the RUN command was explained. The next step is to find out what to write on the program lines: what numbers, arithmetical oper- ations, variables etc. will the BASIC interpreter understand? Furthermore, it is not possible to write good programs without some understanding of computer memory capabilities. These 'basics' will be dealt with here. Since programs are inevitably associated with errors, error detection must also be discussed; at the same time, a discussion of spacing and editing will help to enter programs correctly in the first place, and correct them if necessary at a later date. Finally, two useful statements will be discussed: LET and PRINT. The latter was already intro- duced in part 1, but some further uses for this statement remain to be explained. Computer Memory In a BASIC computer, part of the available mem- ory space is used for storing 'control programs' - the BASIC interpreter, for instance. This section of memory cannot normally be erased: it uses so-called 'Read Only Memories', or ROMs (see figure 1). Storing information in a ROM is a once- only process, usually taken care of by the manu- facturer, From then on, this information can be read out as often as described, but it cannot be altered or erased. The rest of the memory will normally consist of 'RAMs' (Random Access Memories). These offer the possibility of storing, reading out, altering and erasing information at will. However, the informa- tion will also be lost if the supply voltage fails, so a more permanent form of storage is useful: mag- netic tape (reel-to-reel or cassette) or 'floppy disc'. Although these are extremely useful for storing complete programs, they are not much use when running programs: the information is not readily available - in other words, ‘Random Access' in the full sense of the word is not possible. All in all, when it comes to writing and running programs the RAMs are the section of memory that is of primary importance. Only part of this section will normally be used for storing the current program (with any further information required for it); this subsection is called the program memory. It will normally be possible to erase the program memory while retaining information in other subsections (other programs, for instance). When using NIBL, the total RAM area is divided into so-called 'pages'. Programs can be stored on one or more of the pages 1 to 7. A more detailed description of the NIBL memory is contained in a separate article. Control commands When control commands are keyed in to the computer, they will be carried out immediately - unlike 'statements', which are keyed in as part of a program and only become operative when the program is being executed. (Note, however, that when statements are keyed in without a (program) line number, they are treated as described in part 1). When the computer prints a 'prompt' symbol, it expects further information from the user (via the keyboard). This information can be either a command or a new program line; after keying it in, the user operates the CR key (carriage return), whereupon the command is carried out (or the program line stored). This much we knew, from part 1 . It is now time to find out what commands the (BASIC) com- puter will recognise. RUN This command was introduced in part 1 of this series (page B7). As explained, once a complete program has been stored in the memory the command RUN can be given. The computer will then start to execute the current program, starting at the first line (i.e. the lowest line number). In some cases (NIBL and the Motorola M6800 BASIC, for instance) some further 'ground-work' is done by the computer before it actually starts on the program proper. After receiving the RUN command, it first changes all 'variables' to zero and resets all 'program parameters' ( variables' and 'program parameters' will both be discussed later). LIST This command is similar to 'PRINT' or, more accurately, the non-existent command 'PRINT PROGRAM'. When the computer receives the LIST command, it will respond by printing out the entire current program as stored in its pro- gram memory. Let us take the first program on page B7 (part 1) as an example. We will assume '.at, having typed in the program and giving the command 'RUN', we discovered that there was a mistake in the program: the intention was to add 5 + 7, so the answer should be 12. We therefore request the computer to print out the program: LIST. Discovering the error in program line 10, we can correct it by simply typing in the correct infor- tion; to make sure, we can repeat the LIST command; finally, a RUN command will result in the desired answer appearing. The total print-out, starting with the keying in of the incorrect program, will be as follows: tions of the LIST command. These vary, however, from one dialect to another. In NIBL, for instance. 'LIST n' (where n is a line number) means: list the program from line number n on — even if line number n itself is not used. An example: r > 10 PRINT 1+8 1 , >20 PRINT 1 +9 >30 PRINT 1 + 10 >40 END I > LIST 25 30 PRINT 1 + 10 40 END In the Motorola BASIC dialect for the 6800, however, the same command has a different meaning: LIST 30, for example, merely causes the contents of program line 30 to be printed out. Several dialects recognise a variation that is unknown to NIBL (or, for that matter, the DCE Tiny BASIC for the 8080): 'LIST n, m’, where n and m are both line numbers. In this case, the print-out of the program starts at line n and ter- minates at line m. PAGE As stated earlier, the NIBL computer memory is subdivided into 'pages'. When a NIBL computer is first switched on, it automatically turns to page 2 and starts to execute the program that is stored there. This can be useful when using the computer as a 'process controller' that must get to work as soon as it is switched on. Of course, this presup- poses that the information on page 2 is stored in ROMs. If it was stored in RAMs it would be lost when the computer was switched off! If the NIBL computer is not being used in this type of applica- tion, it will discover that page 2 is blank. It then automatically turns back to page 1 and prints a 'prompt' symbol. If a program is now typed in, it will be stored on page 1. However, this may be undesirable (for instance, page 1 may be required for some other program), in which case the command 'PAGE c n' can be given". This causes the computer to turn to page n (n = 1 ... 7) so that the program can be stored there. In general, we can jump from any page to (the top of) any other by giving the command PAGE = n. Alternatively, a minor variation of the same command can be used: 'PAGE = PAGE + n', or 'PAGE = PAGE - n'. This is best clarified by an ■ Note that the PAGE command on a NIBL computer should not be confused with the 'page' key on the Elek- terminal: the latter refers to 'pages’ in the memory of the terminal, not in program memory. example. Assume that the computer is presently working on page 3. 'PAGE = PAGE - V is then interpreted as PAGE = 3 — 1; in other words, as PAGE = 2. The computer will therefore turn to page 2. Note that, as always, the new page number must be between 1 and 7 — no other page numbers exist! SCRATCH, DELETE, PURGE, NEW Different dialects, different words - but the same command. SCRATCH (sometimes abbreviated to SCR) causes the computer to erase the current program and the display. Some BASIC dialects also recognise the command 'SCRATCH ALL': in this case the entire user-programmable memory is wiped clean. 'DELETE', 'PURGE' and 'NEW' are other words used for the same command in different dialects. NIBL, for instance, only recognises the word NEW. No matter what page is actually in use when the command NEW is given, the computer will always go to page 1 and erase this page in preparation for storing a new program. If a different page is required, this must be specified by giving the command 'NEW n'. This will cause the specified page to be erased instead, in readiness for a new program. CLEAR A program may require the use of 'variables' and 'stacks', as will be described later. After running the program, these may contain all sorts of infor mation that is no longer required (intermediate results, etc.). Before running the program a second time, this information can be erased by means of the command 'CLEAR'. SYNTAX ERROR 'There's many a slip . . . ' - certainly when it comes to writing programs. Even when the pro- gram itself is perfect, there is always the possibility of typing errors when keying it in. The slightest mistake of this kind - printing RAN instead of RUN, say, or PRANT instead of PRINT - will make the command or statement completely unintelligible to the computer. Fortunately, it will usually recognise typing errors and print out a warning to the operator. One example of an error indicator is the phrase 'SYNTAX ERROR’ (although computers are sometimes programmed to use less polite language . . .). SYNTAX ERROR' (sometimes abbreviated, as in NIBL, toSNTX ERROR) indicates 'bad language': the phrase keyed in does not exist in that particu- lar BASIC dialect. Other error indicators also exist, as we will see; for instance, any attempt to divide by zero usually results in a very explicit warning on the screen. , M?" cfeQi I -5Z3. _ q . . completely unintelligible to the computer . . . Editing If (typing) errors are noticed while keying in a program, these will normally be corrected by operating the 'back space' key (<-). For instance, after keying in 'PRINK', this error can be cor- rected by operating the back space key and then typing T. The K will be replaced by the T, and the correct phrase (PRINT) will be stored in the memory. Similarly, if one forgets to use capitals, this can be corrected by operating the back space key as often as necessary to return to the beginning of the word: pri <- «- <- PRINT. Alternatively, as described earlier, a complete program line can be corrected by again typing the same line number, followed by the correct infor- mation. Similarly, a complete line can be deleted by typing in the line number followed by CR (carriage return). Most BASIC dialects include other editing facili- ties. but the exact details are usually dictated by the type of keyboard used. NIBL, for instance, includes the command 'CONTROL/U' - i.e. the Control and U keys are depressed simultaneously. In this case, the 'current line’ (the line being typed at that moment) is erased from the display - but not from the program memory. This facility is particularly useful if the wrong line number has been keyed in: the error can be corrected without losing instructions already stored under that line number in the memory. Spacing When typing in programs, it is often useful to add spaces here and there — between statements, for instance. Although the computer hasn't the faintest idea what they mean and will normally ignore them, it does store them in its memory and will print them out when requested to 'LIST' the program. The main reason for adding spaces, therefore, is simply to make the program 'legible' for the operator. However, there are a few places where spacing is forbidden: - within words that are part of statements or commands. For instance, PR I NT is wrong, it must be PRINT. However. PRINT5 and PRINT 5 are both permitted. — within numbers (including line numbers). The program line '150 PRINT 2500' is correct, but ■1 50 PRINT 2500' and '150 PRINT 2 500- are both wrong. It should be noted, however, that '150 PRINT "2 500"' is correct: the computer isn’t interested in the text between quotation marks, and simply prints out what it finds there. Some other cases where spaces are forbidden will be dealt with as we come to them. On the other hand, some BASIC dialects demand correct spacing in one or two places; for example, before and/or after statements or commands. This will not normally be a problem: one will normally add spaces at these points in the interest of legibility! For example (and using a few state- ments that will be described in part 3, just to add to the confusion!), the following would be almost unintelligible: 10 I FA = BLETA = B — C However, adding a few spaces turns it into what is almost 'plain English': 10 IF A = B LET A = B = C As a final note: if one space is permitted, more than one are also allowed. In the above example, say: 10 IF A=B LET A=B— C Numbers In BASIC, numbers can be written in the usual way. There are, however, a few points that should be noted. Whole numbers (integers) Numbers that do not include fractions are referred to, quite logically, as 'whole' numbers (or integers). 23 is a whole number, 23.1 is not. Numbers can be either positive or negative. If they are positive, they may be preceded by a '+' sign, negative numbers must be preceded by a sign. As mentioned earlier, no spaces are permitted within numbers. A few examples: Correct: 3. >-3, +1 23456789; -3, -567. Wrong: 123 456. More properly, decimal fractions: numbers that include a decimal point. As before, '+' and '-' signs may or must be included, respectively. Several BASIC dialects get confused by a leading zero before the decimal point: .38 is alright, but 0.38 is not. Once again, a few examples: Correct: 2.2. +1.23, -55.5, - 44. Wrong: 2%, — %. NIBL doesn't recognise the decimal point, so that only whole numbers can be used. Any attempt to include a decimal point will be rewarded by the print-out 'CHAR ERROR' (from 'character error'). Number range In most 8ASIC dialects, the maximum number of digits in a number is nine — not including the '+' or sign and/or decimal point. For instance: -123456.789. The largest number that can be written in this way is 999999999; the smallest (positive) number is .000000001 , The number range in NIBL is rather more limited: only (whole) numbers between —32767 and +32767 are permitted. These limits are not as arbitrary as they may appear at first sight: they correspond to the largest number that can be written in a 16-bit binary system. If a larger number is keyed in, the computer will respond with the warning 'VALU ERROR' (from 'value error'). For instance: > PRINT 44253 VALU ERROR Scientific notation In some cases, the range of numbers outlined above may prove too limited. For this reason, many BASIC dialects also include an extension facility: 'scientific notation', also known as 'E numbers'. Basically, this consists of a normal number, followed by the letter E and then two These last two digits determine how many places the decimal point is shifted to the right (positive number after the E) or to the left (negative num- ber after the E). In other (mathematical) words: the number is multiplied by a power of ten, as defined by the two-digit number. A few examples may seive to clarify this: 4.35E5 = 435000 1234.5E 3 = 1.2345 Regrettably, this type of notation is not possible in NIBL. The accuracy with which a computer deals with numbers (e.g. when storing them in memory or when performing calculations) depends both on the interpreter and on the computer itself. Normally speaking, the accuracy will be some- where between 5 and 7 digits; any larger number of digits will be 'rounded off'. In other words, the number 123456789 may be rounded off to 123450000, 123456000 or 123456700. Arithmetic Five arithmetical operations are defined in BASIC: +, — , *, /, and t. Their meaning is listed in table 1, together with some examples. Table 1. example result explanation 15 3 8 involution (raising to the n ,h power) When several operations are included in the same formula, they are performed in the well-known order: first involution, then multiplication and/or division, and finally addition and/or subtraction. For example, 6 + 4/2 would be calculated as follows: 4/2 = 2; 6 + 2 = 8. If the addition (or subtraction) is to be performed first, this must be indicated by including this oper- ation in brackets. (6 + 4)/2 is calculated as fol- lows: 6 + 4= 10; 10/2 = 5. Comparisons Numerical comparisons, such as 'is A greater than or equal to B', are often required in programs. The various comparison symbols used in BASIC are listed in table 2, together with a few examples. As can be seen from this table, the result of a com- parison can be only one of two things:true (T) or false ('0'). In those cases where two possible symbols are shown (e.g. < > or > < for 'does not equal') Nl BL uses the first of these alternatives, as shown in the examples. In most BASIC dialects, including a space between the two parts of one symbol is not permitted. For instance, > = should not be typed as > =. Variables A variable is quite simply a name, or 'token' to which a numerical value can be attached. POWER, say, or A5. The use of variables can be illustrated with an example. Let us assume that we want to calculate the maximum output current (I) of some circuit, and that this current depends on the supply voltage (U) and some load resistance (R) as follows: It is not difficult to write a suitable program: > 10 PRINT U/2-R >20 END In this program, U and R are variables. After giving them numerical values — for instance, U = 10 (volts) and R = 5 (ohms) — the program can be started by giving the RUN command and the correct result will be typed out. The complete print-out, including a minor sophistication added on program line 15, will be as follows: The advantage of using variables is that new calculations can be performed for different values of the variables, without having to rewrite whole sections of the program. The print-out given above could be continued, from the line immediately following 'BRK AT 20', as follows: At this point it should be noted that the program example given above will not run correctly on all computers. The reason is that, in some BASIC dialects, the RUN command causes all variables to be reset to zero before the program is started. This is useful, in that it eliminates the risk of acciden- tally running a program with 'old' values for the variables; however, it also means that variables can only be assigned values within the program — not beforehand. This can be accomplished quite easily by adding as many program lines as required before the first program line of the program proper; in the above example, for instance, and adding a LIST command to check the program before running it: > 5 U = 2000 > 6 U = 2 > LIST 5 U = 2000 6 R =2 10 PRINT U/R-2; 15 PRINT "AMPERE" 20 END > RUN 500 AMPERE BRK AT 20 > previous progr keying BASIC dialed In these program examples, the letters U and R were chosen as 'tokens' for the variables. A few BASIC dialects permit the use of several letters for a token: POWER, say, or ALPHA. In most cases, however, only one letter is permitted, followed (if required) by a single digit. In other words, variables can be correctly named A, D, D1, Z9 — but AZ, G12 etc. are not allowed. In this way, up to 286 different variables can be 'named'. In larger programs, so many may in fact be used that one can easily forget what each 'name' stands for. This can be extremely awkward: the computer won't give any warning (it doesn't know that its operator is getting confused . . .), so the program will run normally — the only trouble being that the results are all wrong! To avoid this type of problem, it is advisable to make a list of all the variables used, with their 'token' and true meaning. A systematic list like that shown in figure 2 is usually the best. When using NIBL, this type of confusion is less likely to occur: the only 'names' permitted are the 26 letters of the alphabet. The type of variables discussed so far are some- times referred to as 'simple numerical variables'. A second ’ype also exists: so-called 'string vari- ables', 'i i .-re the variable does not represent a number, instead, it represents a 'string' of charac- ters (letters and numbers). This group will be discussed later. LET LET is a so-called assignment statement: it is used to 'assign' a certain < s variable. In the i examples, this was done by = 2000', for instance. Although most s tolerate this (mis-)use of the '=' t the 'official' way to give a numeri- cal value to a variable. It is more correct to use the LET statement. The complete instruction is then keyed in as follows: first 'LET'; then the 'name' of variable; then the '=' sign; and, finally, the 'ex- pression' — i.e. the (numerical) value or operation that the variable must be made equal to. A few examples: LET A= 15 LET A = B LET A = 3 + 4 LET A = B + C As illustrated, one variable may be made equal to another - or to some mathematical operation in which other variables are included. Even more surprisingly, perhaps, the same variable may appear on both sides of the '=' sign! For example: LET A = A + 1 In this case, the new value for the variable (A) is derived from the previous one. If the value was 4, say, this instruction will change it to 4 + 1 = 5. Some BASIC dialects (not including NIBL) offer the possibility to assign a value to several variables simultaneously. The instruction LET A = B = C = 15 will cause all three variables (A, B and C) to assume the value 15. In most BASIC dialects, use of the word LET is optional; in other words, it is 'unofficially' per- missible to write 'R = 5' instead of 'LET R = 5', This abbreviated form is also recognised in NIBL. More about PRINT The PRINT statement was introduced in part 1. Let us briefly sum up the possibilities discussed so PRINT "5 + 6 =" In this case, the text included in quotation marks is printed exactly as it stands: 5 + 6 =. PRINT 5 + 6 The 'expression', i.e. the mathematical operation, that follows the PRINT statement is first carried out and the result is then printed: 11. PRINT Since no text or operation follows the PRINT statement, nothing is printed on the corresponding line. Effectively, therefore, a one-line gap is left in the print-out. Normally, a PRINT statement is automatically followed by CR and LF (Carriage Return and Line Feed). If required, these can be suppressed by adding a semi-colon between PRINT statements: 10 PRINT "TOM"; " DICK"; " HARRY" 20 PRINT "TOM"; 21 PRINT "DICK"; 22 PRINT " HARRY" The print-out obtained from program line 10 is the same as that from the other three lines taken together: TOM, DICK and HARRY are printed on the same line. At this point, one further possibility of the PRINT statement can be explained: use of a comma between PRINT statements: PRINT 121, 122 The result is that the various 'texts' are printed in so-called zones — equivalent to tabulation on a typewriter. A standard zone contains 15 characters, so that in the example given above '121' is printed at the beginning of the line and '122' in the 16th, 17th and 18th positions. The length of a line is 72 characters, so it contains just less than five zones (more accurately, the fifth zone consists of only 12 characters). Use of zones can be extremely useful when printing tables. Use of the comma for printing in zones is not possible in NIBL. 72 positions ZONE 1 ZONE 2 ZONE 3 ZONE 4 ZONE 5 ■ ill ■ II 1 15 pos. 1 2 pos. 1 15 16 30 31------ 45 46 60 61—72 79084 3 Figure 3. Within a PRINT statement, commas can be used to divide the print-out into so-called zones. Questions 1. Why is an interpreter program rarely stored in RAM? 2. What is the effekt of the SCRATCH command? 3. When is a CLEAR command used? 4. What errors are contained in the following program lines? a) 150 LI ST 5 b) 1 0 PRINT 18 c) 160 PRINT CHAIR d) 170 PRINT 1253 14 e) 190 LET A = 0.31 f) 200 PRINT 4.35E1.2 5. What are the results of the following calcu- lations: a) 3*2+8+15/3 b) 17-24/3/2 6. What error is contained in the following state- LET A15= 12 Answers to questions in part 1 . 1. Tiny BASIC is a simplified version of 'stan- dard' BASIC; for this reason it is less versatile. Tiny BASIC is intended primarily for micro- processors; however, the modern tendency is toward 'standard' BASIC for all applications. 2. Tiny BASIC is often used for microprocessors since the necessary interpreter program requires less memory space. 3. The main difference between a compiler and an interpreter is that the latter translates programs line for line and causes the instruc- tion to be carried out immediately, whereas a compiler first translates the entire program. 4. The advantages of an interpreter are that it requires less memory space (since the transla- tion does not have to be stored in memory) and that certain programming errors are indicated immediately. The disadvantage is that parts of the program that are used several times within the program have to be re translated every time. This takes up more computer-time. 5. The various BASIC 'dialects' are tailored to suit particular microprocessors, in an attempt to shorten the corresponding interpreter programs as much as possible. 6. A flow chart is an important aid when devel- oping a program; furthermore, at a later date it helps to gain rapid insight into the program. 7. A prompt is a character, printed out by the computer to signify that it is waiting for further information from the keyboard. 8. The program lines are numbered to indicate (to the computer) in what order they must be carried out. 9. Operating the CR key indicates the com- pletion of the preceding instruction or com- mand; simultaneously, it initiates 'Carriage Return' in the print out. 10. The computer will print the result of the operation, i.e. 12. SfiSEC