elektor artist · 542 - elektor may ms selektor photographing the hidden beauty of microchips...

54
up-to-date electronics for lab and leIS 85 May 1982 65p. prop tacho 1.0Y/ ID \3:9d 117!; tITIDT-5? ELEKTOR Artist: the ultimate guitar preamp 7Z40, (L-PJ aid loomIGG if

Upload: dinhtruc

Post on 17-Jun-2018

221 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

up-to-date electronics for lab and leIS

85

May 1982

65p.

prop tacho

1.0Y/ ID \3:9d 117!; tITIDT-5?

ELEKTOR Artist:the ultimate guitar preamp

7Z40, (L-PJ aid loomIGG if

Page 2: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

elektor my 1982 - SOS

selektor 5-12

test tone generator 5-14Flow 'BIASed' are tapes? Although noise reduction and equalisation arenecessary, the factor which contributes a considerable amount to thequality of recordings is correct application of 'bias'. In order to set thisand match tape to recorder, a test tone generator as described in thisarticle is required.

the digital keyboard assembly and debounce circuitryfor the Polyformant 5-17U. Getz and R. MesterAs promised in the March issue, readers can commence building the Poly.formant. The article is devoted to the practical side, starting with thedebounce circuits for the keyboard contacts and the input unit.

miniature MW receiver 5-24Using a well -proven chip, the article introduces a circuit with very fewcomponents, outperforming many commercially produced sets! In short amatchbox radio to set the world on fire.

the Junior Computer as a frequency counter 5-26G. SullivanMicroprocessors are often regarded as mathematical wizards. So why notuse their aptitude for maths to the full and employ them also as a fre-quency counter?

Z80.A-CPU card 5.28U. Gets end R.The 080 is one of the most popular microprocessors around. It's abouttime the device was mentioned in Elektor. Although the 280 -A -CPU is theheart of the control unit for the new Polyformant, it is compatible withthe Elektor bus system, therefore making the Eurocard collection access-ible to 280 users.

the Elektor Artist 5-32It could be described as the ultimate in versatility for the electric guitarThis preamplifier (which can be used with any electronic instrument),provides a total of four inputs into two channels; extensive tone controls;

reverb and fuzz, with a large number of 'loop' switching facilities,giving the musician something at a reasonable cost which can only befound on more expensive equipment. We feel sure the Artist will satisfyoonstructors and discerning musicians alike.

prop. tachometer 5-39A rev -counter for model aeroplanes. This design bridges the gap betweenthe differing worlds of electronics and balsa wood. When matching aparticular propeller to an engine a reliable method for rneasuring therpm is extremely useful. The circuit described is straightforward in con-struction.

6502 housekeeper 5-42Not just a clock but a sophisticated housekeeper based on the 6502 micro-processor. It can be used to control a multitude of household appliances,such as cookers, lighting, alarms, central heating. Set it weeks in advanceand go on holiday without a care in the world.

RAM/EPROM card for the Z80 5.51A. Seel

In principle the RAM/EPROM card (Elektor September 801 can be usedwith a variety of systems. Just a 'cut and shunt' exercise with no ad.ditional components is required to interface this card to the 080 and moreimportantly to the 280.A -CPU, as introduced elsewhere in this issue.

software cruncher and puncher 5.54An unusual title perhaps, but one which succeeds in describing in as fewwords as possible what this article is about: a disassembler and EPROMprogrammer for the Junior Computer.

market 5-57

\ EDITOR:P. Holmes

EDITORIAL STAFFT. Day E. Hope.,

TECHNICAL EDITORIAL STAFFSerendrechtH K. Dern

re Issuer

Page 3: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

advarliaamant Weldor may 11182 - 6.07

MIIIIIIIIMIBURNLEY

LONDONTel.

ROAD,NYI10

01-45E1500W°

allAmple perAm114..12 mins. Arm Dollir

8597 TLX. 422800

T305 EDGWARE ROAD

NIB,. Station, LONDON W2 Opp. Edgware Rd. Tube StatiOn)

YOUR ONE STOP SHOP FOR PERSONAL COMPUTERS, ACCESSORIES. SOFTWARE & COMPONENT REQUIREMENTS

ACORNATOM

* PULL ASCII KEYBOARD

* AVAILABLE IN KIT OR BALT VERN.

* FA'AVurAPWEl=fr"' TV* OR BOARD trEarORV 131( IER

, PP ev PSu FE CO p&p 21.20

ER F.P 20M1I EEO

LaWORO PROCESSOR ROM usNEW COLOUR CARO 22

CONNECTORS

PL6/7 0.51Wach SKIAVE0 earn PLS/21,5 LE wen

* BASIC RHO ASSEMBLER IN MONITOR ROM

PLUS MO

PRICE :BASIC 11X21, Kit MO Built 0136 FULLY EXPANDED 1EK 121, EISA 1E2.50 p Arm.

SPECIAL OFFER , ATONINTRO PACKAGE 11"..1.1eFatIre TR.., F maneal Kenn, HOY.. a GrwAl EIS

WORM , WE FLIGHT SIMULATOR, ORLAF0.014.110/PDFRS. CRESS VOW.. Werni. Ewa EIEFIFna.

LIFO eon., DISASSEMBLEB, Aroall CISO awn SwF TrERW.20

MEMORY EXPANSION

" ... "

BOOKSINo VAT. 500 PAR per Wealo.,,,,,,,,.,..,.,,,,,,,,,,,,,,, ,..,,,,,

ATOM Bum.. MN ATOM Magic Rook MOB

OUTPUT. 2 Pr WI PIM . 1 - PO t 0 Oa 0 ROM RC SFR I FRop . IE t mit n .11 IC' Acker

me runnterarsArta CA. CIF. a

ZX81 Upgrade your ZX81with a professional keyboardAn attractive anodized custom One piece 47 key full travel keyboard module fullymade case to house our keyboard built with flexible connectors ready to plug into ZX81and the ZX81 PCB £13 .1 £1 p&p E34 -I- £1.50 p&p

ZX80/81 Expansion MOTHERBOARD : This board provides the most economical

ZX Connectors: Female to Female E5.50 and reliable way of fitting two add-on boards plus the RAM(To connect Motherboard to ZX) pack. On board voltage regulator drives all external boards and

Female to Male £5.00 overcomes the overheating problems. E10.50(To connect RAM PACK or anyother add-on direct to ZX) 3K Static Ram Board for 2%80/81 E10.00

HIGH RESOLUTION GRAPHICS BOARD (2513 0 192 pixels): 6K RAM on board. Resident software in ROM providesextremely fast High Res. facilities which include MIXED TEXT& GRAPHICS. Screen can be copied to the printer.

£75 -+ E2 p&p

USER PORT: Provides 8 channel INPUT & 8 channel OUTPUT PORTS. DIRECT DRIVE FOR SPEAKER & RELAY.All controlled from BASIC. Kit £11.50 Built £14.95APPLICATION NOTES FOR USER PORTS(Reprint from PCW articles) £1.00

ZX SOFTWAREDEFENDERS. £5.50, ASTEROIDS' E5.50, STAR TREK £4.40, INVADERS £3.50, CHESS MOO,

DAMSEL & THE BEAST £5.70, CONSTELLATION 0.00, DICTATOR E7.80, BUMPER 7 £4.30

LABRYNTH £5.20, NIGHTMARE PARK/MUSIC £6.05, DRAGON MAZE/LIFE £0.05SPACE INVADERS/PLANETOIDS E6.05 MULTI Fl LE £16.00. ZXAS ASSEMBLER £3.45, ZXDB DEBUGGER E5.20

I' Acknowledged to be best yet arcade type game for ZX)

BOOKS (No VAT 50p P&p per book)Gateway guide to ZX80/81 £5.95, Getting aquainted with ZX81 £4.95, Mastering the Machine Code on ZX81 £5.95,

Machine Language made simple £&95,Sinclair ZX81 for Real Applications E6.95,Understanding your ZXB1 ROM E8.9549 Explosive Games £5.25

SEND FOR OUR DETAILED LIST ON ZX SOFTWARE

FLOPPY DISC DRIVE MECHANISMS MONITORSTEAC FD50A 5W.' £150 4 £2.50 p&p 12" BMC Green Screen £140OLIVETTI FD5O1AF 5W' E150 + £2.50 p&p 12" BMC Colour Screen E189XELTRON DISKETTES:S.S.D.D. E23 for 10 diskettes + library case

PRINTER

D.S.D.D. ED 10,10 diskettes + library case EPSON MX80 F/T E350 L E7 p&p

SEE OUR INSIDE FRONT COVER PAGE ADVERTISEMENT FOR COMPONENT PRICES

Please add 40p p&p to all orders except where it is specified. Add 15% VAT. total order value.For Extant p&p will be charged at cost. Telephone orders (min. £51 on be placed using Access or BarclaycardORDERS FROM GOVERNMENT & EDUCATIONAL ESTABLISHMENT WELCOME VISA

Page 4: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

6.10 - elektor may 1802 advertisement

ter 0)

precticc, stuff_ciar.

(2)

ormantr".

1iLyt

digiboolt

JUNIOR COMPUTER BOOK 1 - for anyone wishin o become familiarwith (micro loomputers, this book gives the opportunity totbuild and programpersonal computer at a very reasonable..

Price UK £6.50 Overseas f9,6JUNIOR COMPUTER BOOK 2 - follows in a login) continuation ofBook 1, a. contains a detailed appraisal of the.softwarq Lhorelzt:dp:

=1:°,°1131p7=M inputPrice UK E 9.75 Overseas £5,00

JUNIOR COMPUTER BOOK 3 - the next, trans.rming Me basic,single -board Junior Computer into a complete personal computer system.Price UK E6.75 Overseas ESN,

300 CIRCUITS Kr Me home constructor - 300 projects ranging fromthe basic to the very sophist...Price UK E3.36 Overseas 69.00

DIGIBOOK - provides a simple stemby-.p intheory and appl.tIon eff dWital. electronics a. gives offer explanationsf ,04 I uncrce ,r,o;alf of dort

y acezwitrnowVack:clupZ mile.. design. to

an pewmenrers

Price UK E5.00 Overwas E5.25

FORMANT - complete constructional amens of the Elektor FormantSynthesiser - with a FREE cassette of sounds that the Formant iscapable of producinging together with advice on how to achieve Mern.

Price-UK E035 Overseas £6.00

SC/MPUTER 111 - describes how to build .0nd operate your ownmiCrOProcessor syrtem - the first book of a series - further bookswill show how Me system may be extended to meet various require-. f305 Overseas E0.20

SC/MPUTER 12/ - the second took in series. An updated version 01[Pa monitor program (Elbug 11) is introduced together with a numberof expansion possi... By adding the Elekterminal to systemPENCI.Plad in Book 1 the microcomputer becomes awn more versatile.

Price UK E CBS Overseas E9.60

12ro

F7.1:4.1:17.'Z'="::4z7nZre,:ia::=Price-UK E3.35 Overseas E0.00

BOOK 75 - a selection of some of the most interestingpoPular construwion projects that were origins.'

published in Elektor issues I M B.Price UK f3.75 Overseas E0.00

TV GAMES COMPUTER - this book 000,00 adifferent - and, in many ways, easier - approach tomicroprowswrs. The TV the computer is dedicatedto one specific task, as the name suggerts. This providesan airnost uniow opportunity to have fun while learning,Price UK 65.00 Oversees E 5.2S

When orderi. more Elektor Reader's Order Cardin this aut. )the above Pri. include P. & 0.1

ELEKTORth BOOK

SERVICE

Page 5: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

542 - elektor may MS selektor

Photographing the hidden beautyof microchipsManchester photographer Ad Sternbergis a man fascinated by the delicacy,beauty and colour of microchips. Com-bining highly sophisticated photographicand engineering techniques he has devel-oped a unique method of photographingin fine detail and enlarging in full colourthe integrated circuitry - invisible tothe naked eye - of microchips, manylittle larger in diameter than the dot ona typewriter.According to Mr. Sternberg, scientistsand engineers in electronics have per-formed wonders in reducing them to amicrocosm. A great deal of science andengineering skill is needed in photo.micrography not only to produce adetailed negative image for enlargementbut also enhanced and with controllablecolour contrast.Colour print examples of Mr.Stemberg'swork in the photomicrography of micro-circuits - enlarged possibly 400 timesare now on display and used by inter-nationally -known companies such as

Plessey, Standard Telecommunications,International Computers,National Semi -Conductor and Ferranti Electronics.Mr. Sternberg's methods have beendeveloped with special regard to photo-graphy of micro -circuits up to 8 mm(0.3 inches) diagonal, using a diffractionlimited system.Camels may not be able to go throughthe eye of a needle, microchips - which

Photo 1. Ad Sternberg using e ieMPione..lem a chip for photography.

Photo 2. A typi.1 Ferranti small integratedcircuit photographed a. enlarged bYAP Sterberg.

today provide the circuitry used in com-puters, space craft, rocket missiles, tele-communications and more humbleobjects such as cookers and washingmachines - certainly can. Absolutecleanliness is vital. The tiniest particlesof dust would produce big black blobs.Mr. Sternberg has been interested inphotography since teenage. He joinedan industrial and commercial photo-graphic business in 1947, having pre-viously spent some years learning towork to fine tolerances in an engineeringtool factory. When silicon chips- micro-chips - arrived on the industrial scenein the 1960s he was approached byFerranti who asked if he could, atreasonable cost, improve on the qualityof the results they were getting them-selves with colour photographs of siliconchips, wanted for publicity, record andinternal company purposes. The biggest'chips' were six millimetres square- others being much smaller.Taking up the challenge, Mr. Sternbergfound himself Immersed in a year'sexperimentation and research. Littlephotographic material existed for thistype of work, nor was there ready-madeequipment But, combining his photo-graphic and engineering knowledge, hecombed photographic, scientific instru.ment and second-hand shops for 'bitsand pieces, and gradually designed hisovvn equipment and techniques andcolour processing methods.A way of increasing the colour contrasthad to be found. The colours in themicrochips are very weak by the timethey pass through the microscopeoptics. Correct lighting was a greatproblem. With high magnification, resol-ution figures can now be achieved thatare better than one micron for smalldevices half a millimetre - around20 thou - square, and better than fourmicrons for large scale integrated chips,known as LSls, over the whole field.The enlargement can be around400 times.The chips have become more complex,

of course, over the years. They packmore and more on one chip. Nowadays,computers have to be used to design thecircuits because they are too compli-cated for even the finest scientists with-out computer aid. They have thousandsof transistors and resistors on them.Mr. Sternberg believes, with good reason,that his equipment, methods and experi-ence in this unusual field make his workunique - and that the techniques devel-

icro-gorpaepdh a

anda iphotcoambl e.rtoogr.pphhoyt oi nm

gene

Oral. Of course he realises there areother people in this field, particularly inthe United States. However, it calls forquite a blend of different expertise notonly in photography but also in engin-eering, optics and illumination - anddedication over a long period - toproduce relatively low-cost results.

Photo 3. A Ferranti F1001. microprocessorchip, containing approximately10,000 transistors in the eye of a needle.'rho chip is about 1/S-inds square.

Telecults Norwalk, ConnecticutThe Maharaja Pampkin Bolanee hasannounced the formation of his EtherealTelevision Network 1ETV), marking thefirst of the so-called cultist organisationsto enter the cable broadcasting industry.Claiming his programs will be patternedafter those produced by the ChristianBroadcasting Network, the VenerableOne rtated that the shows will attemptto 'cart light on the darkened corners ofthe cosmos, bringing peace and harmonyto those seeking the Ultimate Truth andKarma'. The 146 -year old mohatma saidthat ETV can currently be seen by43,000 homes across the country andwill be broadcast via the Comstar D-2satellite thirty-six hours per week.Outlandish, you say? Perhaps, but notat all unlikely. According to a recentarticle in VideoPrint, it's just a matterof time)IRD Inc. USA

Page 6: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

selektor eiektra may to53 -5.13

LaserVision in the UKPhilips intend to launch its LaserVisionDisc system onto the UK markettowards the end of May this year.To start with, players and discs will beon sale in greater London and the sur-rounding home countries through a

installation on Orkney. The WindEnergy Group comprises British Aero-space Dynamics Group, GEC Energy

worn. Systems Limited and Taylor Woodrowwry. Construction Limited. The company has

signed an agreement with the North ofScotland Hydro -Electric Board to con-struct the most powerful wind turbinegenerator ever built in the UnitedKingdom. It is to be erected on BurgerHill, Orkney.The 20 m diameter turbine has a rated

potwerof 250 kilowatts (kW) at 17

res/second (re/s) wind speed and 1srotational speed of 88 revolutions/mi-nute (rev/min). It will begin to operate

restricted number of outlets. These will at a wind speed of 8 m/s and shut downinclude high street multiples, indepen- Not only is Philips committed to when wind speeds exceed 27 hasdent retailers and specialist rental com- developing the consumer market, but aestimeted arm, ofparries. Philips plan to progressively the company plans to enter the no kilowatt-hours (kWh). The ma -increase the number of outlets into domestic market as well, as this offers chine is to have a synchronous gener-other major cities in the UK until considerable scope for the interactive ator. variable pitch rotor blade tips anddistribution reaches a nationwide level application of LaserVision on the transmissionat

the earliest opportunity. industrial, commercial and educational Provision is being made for the machineThe first catalogue will contain more level. to run in both fixed speed and variablethan 100 disc titles of which at least 75 (765 5/ speed modes. The rotor will be mountedwill be in the shops by May. The re- to the main shaft with what is knownmaining catalogue titles will become

as a teetering hub. This arrangementavailable shortly afterwards. Further

releases will substantially expandreduces the forces and moments on the

newthe catalogue by the end of the year.

blades and supporting structure.

Bevan top programme distributors will 250 kW Wind turbine The machine will be the first in the UKin recent times to be connected to

be marketing a wide range of titles on The need for alternative energy re - an isolated diesel-electric grid system,disc from the initial catalogue, including sources is not only a favourite dis- and with a power rating of 250 kWfeature films, general entertainment cussion topic, but is at last leading to will be the most powerful turbine to beprogrammes, musicals, sport and concrete results. Which of the elements in so. anywhere(sun, sea or wind) is suitable for pro - the world. These factors made itsA strong advertising and promotional ducing energy depends to a large extent economic and technical evaluation es -campaign has been set up with the on the local climate. Not surprisingly, pecially relevant to many hundreds ofintention of communicating the Laser- solar energy can be found in abundance similar grid systems elsewhere in theVision message in an accurate and in deserts like the Sahara or in Arizona. world who are burdened with largestraightforward manner so that it may Unfortunately, the British Isles do not owner.. costbe understood at all levels of trade and have much sun to offer, but they areby the consumers. LaserVision is a new visited land sometimes plagued) by The Group has paid particular attention

oand unique source of home entertain- plenty of sea breezes and gales, an tth

this potential market in designing

ment and information for all the family. inexhaustible of fuel. n and control system ofe transmission

The ea -to -operate, damage -proof Wind energy projects are starting to be the

design of the player and the durable developed on an increasingly large scale,acc

machine o achieve power qualitytoeptable

to a small diesel grid system.

quality of the toughcoated discs allow one of the most ambitious schemes to The prototype will allow for tests toevaluate fixed versus teetering hubs,

the equipment to be used by everyone, date being the wind turbine generator versus variable speed operation,even children. designed by the Wind Energy Group for as well as a wide range of operational

strategies. The machine is to be exten-sively monitored under a contract withthe Department of Energy using a

computer based data acquisition systemwhich will scan sensors placed on themachine to measure performance, forcesand displacements.Procurement of components is nowtaking place prior to assembly andground testing of the nacelle and rotorin the last quarter of 1982, while con-struction of the foundation and towerwill begin in the summer. Commission-ing and first synchronisation of themachine is schedules for the firstquarter of 1983.The 250 kW machine also acts as thePrototype for the larger machine whichwill be 60m in diameter. When com-plete the project will be the largestdemonstration in the UK of an alterna-tive energy technology.

1755 51

Page 7: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

- elaktor may lase tart ton...orator

Certain cassette and reel-to-reel tape decks and recorders are equippedwith such an array of meters and switches that some look as thoughthey were intended for aircraft cockpits rather than for home use.Although noise reduction and equalisation circuits are necessary, thefactor which contributes more than anything else to the quality ofrecordings is the correct application of 'BIAS'. In order to set the 'bias'correctly and therefore match recorder to tape, a signal generator,as described in this article is required. Armed with such a generator,readers are able to improve on the quality of recordings and usewhatever tape type they wish.

test tone generator

how to set the 'BIAS'on your tape recorder

The existing range of decks and tapes isenormous. In an attempt to get oversome of the confusion and conflictingsales literature, manufacturers tend tospecify which type of tape will get thebest performance out of their decks.This is fine, but no consideration is

given in many cases to when the usercan no longer afford, or get hold of thetype of tape specified. Normally verylittle information is contained in theoperating manual about altering the'bias' setting, or even where to find thecontrol.Nearly all decks have equalisation cir-cuits SO that the record/playback signalreaching the preamplifier nage of a

Fi. system is as 'flat' as possible.Without such circuits the playbackresponse would exhibit pronounced bassand treble losses. These losses are partlydue to tape speed and type, but the biasalso plays an important role. A correctbias' setting is needed to achieve a goodrecording level for all frequencies acrossthe audio spectrum. This will in turnallow high playback output, low distor.tion, and a reasonably 'flat' response.Unfortunately there is a differentideal 'bias' setting for each frequency.The setting fora mid -frequency tone

Page 8: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

test tone generator elektor may 1982 -

av T ©9V

= 2i IC.2

-7 TT'? e.v

Figure . The circuit diagram of the complete tone generator and a suitable power supply circuit. Readen are advised to use Veroboarcr as theconstruction medium.

(400 Hal is quite different from the onerequired for a 13 kHz signal. Generallyspeaking, the higher the frequency thelower the 'bias' level. Therefore tapedeck manufacturers specify the type oftape to use and choose a 'bias' settinglout of necessity) which is a compro.mise. A real in depth study of 'bias' iscertainly not practical at this stage, as itwould probably take up most of thisissue. Anyway, we are more interestedIn practice than in theory.

Tone generatorAs outlined above a test tone generatorsupplying a mid and low frequencysignal is necessary. Figure 1 shows thecircuit diagram of the generator. Itmainly consists of two bridge oscil-lators. The first one, arranged aroundAl, produces a practically distortion -free sine wave signal of 400 Hz. Stabilis-ation is achieved by using germaniumdiodes. The second oscillator (con.structed around A2) operates in thesame way, but produces a 13 kHz signal.Both signals are fed in turn to the out-put stage by means of the CMOS

switches ES1 ,and ES2. The circuitaround A3 functions as a square wavegenerator with a frequency of aboutO.25 Hz, activating the electronicswitches in such a way that the outputwill alternate between 400 Hz and13 kHz every two seconds.With a positive pulse, ES1 and ES3 areclosed and the 400 Hz signal reaches theoutput. With a negative going pulse ES1and ES3 are open and ES2 is closedallowing the 13 kHz signal to be fed tothe output. Preset P1 ensures the outputamplitude for each signal is the same.The network made up of R15, R16 andC6, in the output stage, sets the im.pedance and level of output so that itcan be fed directly to the 'mike' inputof the deck.The fourth opamp AA is used to drive adB level meter for monitoring purposes.A moving coil instrument or a mul-timeter set to the 100 pA range is suf-ficient. Preset P2 sets the gain of A4.With the help of S2a the signal takenfrom the headphone socket of the deckcan be monitored, one channel at a

IA. time. By switching over S2b the squaref...3 wave generator is bypassed and only4 the 400 Hz signal reaches the output.

Two completely separate switches can

Page 9: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and
Page 10: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

Po.vphonic synthmisar elektor may 1982 - 5-17

polyphonicsynthesiserU. Reitz and R. Mester

the digital keyboard assembly anddebounce circuitry

The general principles and basic theory behind the new Elektorpolyphonic synthesiser were introduced in the March 1982 issue.However, this article is devoted to the practical side, namely theconstructional details, thereby enabling readers to commence building.We start off with the debounce circuitry for the keyboard contacts andthe input unit (together with its bus board) which acts as the keyboardinterface for the main CPU card.

Photo . This photo shows how the debounce unit, the input unit, the tune.. unit and theWas board era mounted and wired.

The digital keyboard design caters for upto five octaves 161 keys). Although itis obviously possible to use fewer keys,the relatively small price difference be-tween three and five octave keyboardsprompted the designers to go for thelatter. This also means that the range ofmusical possibilities can be exploited tothe full. The keyboard contact blocks,or switches, are mounted on eightindividual printed circuit boards in sevengroups of eight and one group of four.Each board also contains the debouncecircuitry for its respective keys. Thecontact blocks used are the (gold wire)single pole GJ type from Kimber Allen.The debounce circuitry for each keyconsists of an RS flipflop. There are tenconnections between each printed cir.cuit board and the input unit, 8 for thedebounce circuitry and 2 for the powersupply.By now, readers will have noticed thatonly half of the eighth printed circuitboard is used, meaning that only 80 ofthe 61 keys can be used (see figure 01.A close examination of the debouncecircuitry in figure 1 and the printedcircuit board layouts in figures 5, 6 and7 should provide a clue, however. Effec-tively, the 8 printed circuit boards areidentical. The 8 keys on each board aresubdivided into two groups of four. Thereason for this is that the design had tofulfil the main conditions of optimumperformance and value for money, whilebeing simple to construct In reality, thekeys at the extreme ends of the key-board are very rarely used anyway. Ifreaders wish to use the lower key ratherthan the higher one, all that needs to bedone is to shift the connections downone key (or semitone). This does notpresent too much of a problem, sincethe VCOs of the individual channels canbe adjusted to give the required pitch.If all 61 keys are to be used, then the8th printed circuit board will have to befully utilised. This does mean, however,that the printed circuit bojrd assemblieswould protrude from the side of thekeyboard, making it more difficult to fitthe unit into a case. To make construc-tion easier and for space considerations,we suggest that the last board is cut intwo and the unused half discarded (seefigure 8). This means, of course, thatthe relevant connections on the inputboard will have to be grounded. In prattice, this is accomplished by earthingthe four respective pins on the ten -pinconnector. If this was not carried out,the processor would be confused intothinking that the non -existing keys werepermanently depressed!

Mechanical constructionThe keyboard contact blocks are moun-ted on the underside of the board (seefigure 31. Position the blocks (notchside towards the board) on the printedcircuit board and glue them into place.A good strong adhesive such as Araldite

Page 11: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

5-111- alaktor may lees Pelyahonic synthesiser

Kay lamberAllen Typ GJ

Figure 'I. The yboard debounce circuitry.

should be used. The adhesive should beapplied sparingly taking care not to getany near the contact wires. Bend theshort wires at the rear of the blockstowards the board and solder them intoplace. It is important to remember thatthe contact blocks must be wired sothat the circuit is closed when the key isdepressed.The next step is to drill a hole in a con-venient place near the centre of eachprinted circuit board. This hole shouldbe large enough to allow a self -tappingscrew and the blade of a screwdriver topass through it. The reason for this is sothat the carrier board can be mounteddirectly to the keyboard chassis (this isexplained later on).All the other components, including the10 pin connector, are then mounted onthe boards. The 8 (1714 actually) boardsare now ready to be assembled on to thecarrier board, by means of suitable nuts,bolts and spacers. The length of thespacers should not exceed the overallheight of the contact blocks, which isapproximately 9.5 mm with the typesspecified.The carrier board is then attached to thekeyboard chassis. The spacing betweenthe carrier board and the chassis is veryimportant. The key push rods are oftenin 'fishplate' form (see figure 2) so as toallow the centre contact spring to belocated in one of the holes. It is essen-tial that the centre contact springtouches the upper contact when the keyis depressed.Most keyboard chassis' are not pre -

drilled, therefore readers must decidefor themselves where the carder board isto be attached. Self -tapping screws areideal for this operation, which brings usback to the holes previously drilled inthe centre of the printed circuit boards.The latter will help to stabilise the con.struction considerably.Exact dimensions and sizes for the cander board, case and so on cannot begiven, as these will depend on the typeof keyboard used.

Testing the debounce circuitryThe debounce circuitry can be testedquite simply. The two power supplyconnections on the 10 pin connector(of one printed circuit board) are linkedto +5V and ground respectively. Whena key is released, the voltage at thecorresponding debounced output shouldbe zero volts. This should rise to +5 Vwhen the key is depressed. If all is wellthe keyboard can be put to one side forthe time being. Take care not to damagethe contact wires, since they are veryfragile and will bend very easily.

Input unitThe input unit shown in figure 3 con.Acts basically of an 8 bit data bus overwhich the processor is able to read in

Page 12: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

polyphone synthesiserWeldor may 1922 - 5.19

Figure 2. Exploded view of the keyboardmechenism end the dolmen. circuitry. Thecontact blocks are Areldited to Me undersideof the debounce boards whiM are thenmounted on a 'carrier' hoard.

3

s v C)

Figure 3. The circuit diagram et the input u M.

77m7sE

c4zszr,

data (by means of multiplexing) via thebuffer stages, 1C3... IC12. The outputsof these buffers are held in a highimpedance state until such time as thedevices are enabled by means of the sig-nal presented to pins 1 and 19.Address lines AD... A7 originate fromthe microprocessor and are decoded viagates Ni ... N4 and IC2 to produce theselect signals for the data buffers. Thismeans that only one data buffer will beenabled at a time and the processor willalways 'know' exactly which one is

K3As the data and address lines are com-being addressed.

mon to both the input and the outputunits, the input data will have to be dis-abled when the output unit is beingaccessed. This is accomplished bY gatingthe RD and IORCI signals from themicroprocessor and feeding the result.ant signal to one of the select inputs ofIC2.The construction of digital date pro -

111' "cessing systems can be kept simple and

Kolasmall, by using a common highway formultiple data transfer (this is a typicalprocedure in computer systems). It is

interesting to know what the datapresented to the microprocessor lookslike. The inputs of the majority of the

2_ buffer ICs are connected to the outputsi of the debounce circuitry. The pro-

" cessor scans the buffer ICs one by onecs by means of the chip enable inputs

(pins 1 and 191 so that it can determineexactly which, if any, key is being de-

Cr buffer consisting of half of IC3 andhaltprfezorICtol2dei u

determinermsid the

number OfVCOs which are available M the syn-thesiser. As mentioned previously, any

Kt

"

Page 13: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

5.20- efektor may 1982MMVphonie synthesiser

number of VCOs between 2 and 10 canbe incorporated The eight DI L switches,SI ... S8 are used to preset this numberaccording to the information given intable 1.The connections TSI TSB lead tothe tune -shift board, which is shown infigure 4. A diode matrix ensures thatthe correct logic levels are presented tothe data bus when switch Slit operated.In this way the VCO frequencies can betransposed by one octave, one semi-tone at a time. Three pushbuttonswitches, S2 ... S4, connected to thetune -shift circuit determine the 'direc-tion' in which the notes are shifted. Thelogic levels required by the system soft-ware are presented to the data Ws viaconnections TS5 and TS6. Of the fourpossible set/reset latches contained inICI, only three are used to effectively'decode' the state of the three switches(latches 1, 2 and 4). Under normalconditions, S3 will have been depressedand the output of the first leech 110)will be high whereas the outputs of theother two (20 and 401 will be low.Now, if S2 is depressed, the output ofthe second latch (20) will go high andthe other two latches will be reset viagates N2 and N3. Similarly, if 54 isdepressed, output 40 goes high andleeches 1 and 2 are reset via gates Niand N2. Gates Ni and N3 are used toreset latches 2 and 4 when switch 53is depressed. The current 'state ofaffairs' is indicated by the three LEDs(D21 ... 223) connected to the latchoutputs via inverters N4 ... N6. TheseLEDs are mounted inside the switches.The remaining latch in ICI (latch 3)may be used in the future for expandingthe keyboard.The CPU card and the output unit withits corresponding digital -to -analogue(D/A) conversion system will be de-scribed in subsequent articles.

Figure a The circuit diagram of Me Yunewhift' board. This bawd is mounted behind Mahoutpanel and is linbod to the input unit vie connections T51 TSS.

Table 1

The coding for switches S1 SS:Switches St... SO (bits St.,. 071 represent the number ofavailable oscillators in binary. Switch Sr Mit 9) indicates theprem....mice of the preset facility. For Pm time being, switchesu6... S8 Miss 135 .. .bllareierored by the processor.

switch number SiS 57 SO 55 S.1 SS 52 S10bit velum 07 la6 b5 la4 03 02 00

0 not valid1 not valid

0 0 2 VCOs3 VC.

0 VCOs6 VC018000s

VCOs5 VCOs9 VCOs

10 VCOsnot validnot validnot mlidnot validnot validwith preenwithout pride,

Table 2

Coding of the data at the tune.shifs output:

bit value: 67 be 06 0 53 02 1,1 be-1 octave

°octave+1 octavo

not valid0 semi -tone

4.1 semitone. 2 semitone+ 3 semitoneMI semitone1.6 semitoneaft semitone+7 sernitone

sernitone-.semitone

+10 sernitune. 11 serniTonenot validnot validnot validnot valid

Page 14: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

poNphonic synthesiser el.., may 1982 -5.21

5 I

2

0--0 K AN O as 0

94R DOSIP. 349 DZI r;t11;9 349 DVA;l9 c44,11111 1 111 11111 ill) II II 1111 1111

Zs, MGR 11193 11111D9ryss11111.. Mt- Mt -

111 Eh 6 It1 MI

1lin IN11 11 1111

lir11111 miiiill 111111 11 11 1

III 1,4111111

lir lor iir mr lir lir iiir-iiirFigure 5. The printed circuit boa d and component erlay of ...ounce nit.

Pane list for figures I and 5

Resistors:

RI RIB 97 k

Capacitor:C1= 100n ceramic or MKT

Semiconductors:IC1,IC2= 7445279

Miscellaneous:

8 key contacts 1Kirriber Allan (gold wire)/type GJ/single pole)

10 pin plug (Molex male E 3022-10A/10 pin socket (Molex fem. E 3071.10110 crimp 'terminals (Molex 4809 CUNote: ell of the above ere required eight Rms.

Pens list for figures 3 and 8

Resistors:

RI... 0=10k

Capacitors:CI = 106/13.3 V tantalumC2... CA= 100 n ceramic or MKT

Semiconductors:ICI = 74.32IC, 741_3156C3 IC12= 74L3264

Miscellaneous:

S1... 586 2 x4 way DI L switches9 tenpin plugs and sockets andcrimp terminals Dee parts lin forthe debounce unit)

angled 2 x 32 way plug (DIN 413121

Parts list for figures 4 and 7

Resistors:

131,112= I k

315 ...I:110,314,R15- 10 kR11...1613- 47011

Capacitors:Ct.- 100 n ceramic or MKTC3=1 3/8.3 V tantalum

Semiconductors:DI .. D20= 1N4148D21 ... 023 o 3 mm red 1_313

lin digitan switches 32 ...SO)ICI - 741_9279102 6 7916302

7rILSIO

Miscellaneous:

SI single pole 12 wag rotary switchS2 ... 94 v digitan (with LEDs)IC well Plug, socket and crimp terminals

(see parts list for debounce unit)

Page 15: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

!

2 .

1Ea

Page 16: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

PMAMonie synthesiser elektor mm1082 -5-23

7

°'-'1XCIFJ. ,tjO(7,',/"'

Antslinnntri

ykrAVVAA

Figure J. The printed circuit board end component modes, of the kune-skih. unit.

8

82106 8

The system has been designed suchthat the existing Elektor bus hoard(EPS number 800241 can be used tolink the CPU card and the input/outputunits. A suitable method of mountingthe various parts of the system areshown tint photograph. It

Figure 8. A section of figure 5 showing where the litth debounca board An be Awn in twowithout damaging Me eoPiter <reeks.

Page 17: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

5-26 - elekter may 1882miniature MW receiver

The design is based on the MW receivercircuit which was published in March1981. This circuit lends itself very wellto miniaturisation because it requiresvery few components and the powerconsumption (03 mA) is sufficientlylow to allow the use of a small mercurycell.The Ferranti ZN 414 IC is the 'heart' ofthe circuit. This IC is reasonably wellknown by now, its 3 pin housing con-taining a straight through receiver. Theonly external components required arethe tuning capacitor and aerial. Figure 1shows a block diagram of the IC; a highimpedance input stage, an RF amplifier,an AM detector and an AGC (automatic

MWreenver'a matchbox radio to set the world on fire ... ?Over the past fifty years a lot ofminiature radio circuits have beendesigned. Unfortunately most ofthem have suffered from a lack ofoutput power and sensitivity.Furthermore the majority alwayshad problems with the aerial.Readers may remember the wristwatch type radios that came tothe fore some time ago, when anaerial had to be wound around thewrist or in the strap. Anyway,very few of them gave a worth-while performance.With the advent of the ZN 414,designs became simpler and better.Using this well -proven chip, thearticle introduces a straight.forward circuit with very fewcomponents which can out-perform many equivalentcommercially produced sets. It hasgood output power, reception andselectivity.

gain control). Readers wishing to knowmore about the inner workings of theZN 414 are referred to the March 1981issue of Elektor.Figure 2a shows the circuit diagram ofthe complete receiver, when a highresistance lapProximately 200521 mag-netic earpiece is used. The simplicity ofconstruction is more akin to crystal setdesign than anything else. The resistanceof the earpiece is very important, sincethis controls the gain of the IC andtherefore the output volume. An ear-piece with an internal resistance (not tobe confused with impedance) of around200 R is ideal, but types having a lowerresistance (within reason) can also beused, together with a resistor (Rx) con-nected in series. Readers should takenote not to use too high a value for Rx,otherwise the output will be ratherpoor. Obviously the sensitivity of theearpiece will also have a bearing. Theabsolute minimum resistance (Rx +earpiece) is about 1000 with themaximum being 1k5. A good corn.promise is about 500 0. The prototypeactually used an earpiece of 17012together with a resistor of 330 R. Ifthe value of Ho is high, then the con-nection of an electrolytic capacitor, inParallel (not more than 10 pF) shouldimprove the output level. The actualvalue is not critical and will depend onthe Rx/earpiece combination. Basicallyreaders are invited to find the conk

Page 18: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

miniature PAW receiverelektor may 1952 - 5-25

Figure 1. The block diagram of the interior of the 2N 414. This tiny IC forms.. bask of thematchbox IIMIliVef

2

a

Figure 2. The basic circuit el ,sea, high impedance magnetic earpiece. An output stage isrquired if crystal earpiece is to be used gel.

bination applicable to their needs, as itreally depends on what output level isrequired.Unfortunately the frequently used 812type is not suitable as it requires theaddition of a matching transformer. Ahigh impedance crystal earpiece on theother hand, requires an additionaloutput stage, as shown in figure 2b. Thepower consumption in both circuits(2a & 261 is practically the same,because the additional stage (figure 2b)only adds an extra 0.1 mA drain on thebattery.A decoupling capacitor for the powerSurely is not required, since the internalresistance of the mercury cell is ex-tremely low.

ConstructionThe choice of housing is left to thereader as it will depend on the sizeof the components. The prototype wasinserted into a matchbox (see photo)simply as a guide -line and to give animpression of its relatively small size.The original design has a flat ferrite rod,50 mm in length with a cross-section of12 x 4 rnm, but any rod approximately10 mm in diameter will suffice. Theaerial coil is made up of 100 turns of0.2 mm enamelled copper wire, woundonto a paper or cardboard former.The ferrite rod is inserted into it. Thevariable capacitor is one of the twin -ganged variety 1141 OF and 59 OF)commonly used by manufacturers in

commercially available medium wavepocket radios. Should readers wish tohave a lower number of windings oruse a ferrite rod with an unusual per-meability factor, they are advised toconnect both gangs in parallel.As everyone will agree, to design aprinted circuit board for this radiowould be futile, as that would probablytake up more space than the complete

3

Figure 3. The construMion of the matchbox radio is illustrated here. The Ichaseis. ie made from plastic sheet end fits inside a matchbox. Thera isPlenty of room for all th components including the output mg. required.

Page 19: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

5-26 - aleMor may 1982 the Junior Computer as a hence., gaunter I

radio. It is more convenient to inter-connect the components directly.Figure 3 shows one method for this.The 'chassis' is made of plastic havingthe same dimensions as the 'tray' of amatchbox. The variable capacitor ismounted onto the chassis by means ofappropriate screws. The ferrite rod isattached by glueing each end to thesides of the chassis.A standard earphone socket is used.Normally the switch part acts to isolatethe loudspeaker, but in this case it isutilised as a battery connection. Themoving contact part of the switch is cutoff with pliers or a wire cutter to leaveonly the fixed terminal. This serves asshe)positive contact for the battery. Asmal brass plate (glued to Me side ofthetact. The position of the socket is

determined by the size (width) of thebattery.Note that an on/off switch is not necess-ary when constructing the circuit as infigure 2a. The supply is autornaticallyswitched on when the earpiece isplugged in. However, the circuit as 'nfigure 2b does require a switch.The battery should be a mercury typecell such as a 'Mallory' supplying1.35 V.

Final remarksA whine or whistle heard in the ear-piece when tuning between stations canbe eliminated by swapping Oser theconnections to the aerial coil. Normalmercury cells are able to deliver200 mAh, so each cell should givebetween 400 and 500 hours of listeningpleasure.

as afrequency counterG. Sullivan

Microprocessor systems are often regarded as mathematical wizards,so the Junior Computer's aptitude as a frequency counter will come asno surprise .. .

As the name suggests a 'frequencycounter' records a recurrent series ofevents. This does not necessarily have tobe anything to do with electronics. Themerry month of May, for instance, (andany other month, for that matter) has afrequency of one sunset every 24 hours(although it isn't often seen in theBritish Isles). To take an electronicexample, if an AC voltage changes itspolarity one hundred times per second,this is referred to as a frequency of50 Hz.The point is, by what criteria is fre-quency measured? In the secondexample the number of polarity changes(from positive to negative, or vice versa)that occur during one second are simplycounted. When a microprocessor is

Tired' to do the calculation work, aprogram consecutively displays thecontents of three display buffers, inother words the last frequency to bemeasured. The program is interruptedether once the one second measuringtime has passed, or the AC voltage hasgone low. A new program is now runto check the cause of the interrupt.It a zerocrossing was involved, theperiod counter is incremented byone. But it the measuring time (1

second) has passed, the contents of thecounMr memory locations are copiedinto the display buffers. At the sametime, a new measuring period begins. Atthe end of the process, a retum is madeto the main routine, after which thewhole procedure starts all over again.

Fmuie t. A mrms of interrupts Mae/ are raomrad for haute BB 8111..1.

Page 20: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

Me Junior Computer as a frequency counter elektat may 1982 - 547

81400 A9 00 INIT./ clam 500810.052 0500 STIa AMIIL81904 55 01 STA. ACM.51406 85 D2 STA5 ACO.81908 29 LDAIN Ia.111rM. SD 92 STA 0094

5940009 la LOAM I59e00/25551544 80 OFlA sTA 049081412 5D . 14 STA ELM51.5 59 10 40400 510 (16,0)51412 85 Ps ST. TIPIEN

81A15 55 53 ST. (MtliT51415 49 3D LZA. OD (6,10)8141D 55 55 STAZ TM.51A1P 80 PP lA STA MIK51622 58 OLI81121 20 55 10 LOOP 000 SC..81.6 . le T, LOON

51429 95 .0952 1MA8152451A2E 4851A2O 95111.0PlANS 2O 1.14¶1A31 10 105.53 A5 n55,35 80 PP 1A.SM. 0651.5 P0 2851A. 42 0251555. 0081440 550051442 9581044 94 DO81446 MI81047 10 NO81.951.5 85 03511.0 DO 15

51A51 0051455 090181055 55 5051459 45 151

81459 69 00 ALCM 80081455 55 01 STA5 ACC1111

51450 A5 D2 L1)05 AOC.81450 0900 ADCIn 80081.1 55 . STAZ .01111

81463 Dai O.51464 68 EXIT PLA

81.5 . TAY

81.6 68 FLA

81A69 AA T.81455 .81469 40 000

ADDITIONAL M... LOCATIONS50104 80000eecun 50001ACOUll 00002001.2IT 80003liNgi SO.113136 50005

Table 1. Thefts...Ay counter pramarn.

2

Ntra - 1/3 ICI =FM

Figure 2. This circuit is added to the Junior Computer to effect the program in f igure 1 .

The events are depicted in the flowchart in figure 1.A certain amount of hardware is alsoneeded and this is shown in figure 2.This circuit is connected to the portconnector of the Junior Computer toallow the frequency data to be enteredinto the computer. A significant nega-tve zero -crossing in the input signal willpull port line PA7 low. The programmakes sure this is accompanied by anIRQ.The software is provided in the table.The start address of the program is

$1A00. When data is written intolocation EDETC, PA7 is pulled lowthereby enabling an IRQ. Preparationsinclude defining the 100 jump vector atthe start address of the IRQSRV inter-rupt routine, starting the interval timer(CNTH, in other words, an IRQ isenabled after every 1024 clock pulses)and storing the contents of locationCOUNT. Then the program LOOP isrun until an IRQ takes place.As soon as any type of 180 is detected,the IROSRV program is run. Aftersaving the A. X and V contents (usedduring SCANDS) on the stack, thecomputer examines the N flag. If N, orrather the timer flag, is zero, the 180cannot have been enabled by a timeout. This means that it must havebeen caused by a change in logic levelon PA7. A new AC voltage periodhas passed and so the computer pro-ceeds to label ADD. The 24 -bit BCDnumber (ACCUH, ACCUM, ACCUL- the period counter in figure 1Hs in-cremented by one. After restoring A, Xand V (EXIT) and executing an RTI,the computer returns to LOOP.Supposing the IRO was caused by atime out in the interval timer. Thetimer is started afresh and the contentsof COUNT are decremented by one.Provided COUNT has not yet reached

zero, a jump will be made to EXIT. If,however, COUNT is in fact zero, theSTORE section is run. The measuringperiod has now passed and the displaybuffers, POINTH. POINTL and INH,are assigned values equal to those ofACCUH, ACCUM and ACCUL, respect.ively.So much for the program, let's puteverything into practice. Connect thecircuit in figure 2 to the port connector,enter the program on the keyboard (oreven better, read it in from cassette) andstart it via the main JC keyboard. (Themain JC keyboard must be used, soas to provide the I/O definition forSCANDS.) The highest frequency thatcan be measured is about 10 kHz. Atlow frequencies greater accuracy may beobtained by extending the measuringtime to 10 seconds (load A0 instead of10 into TIMEH, address $1A16). Theresult on display will of course have tobe divided by ten to give the correctfreq.encY

Literature:Chapter 6 of the Junior ComputerBook )I.

Page 21: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

5 28 - elaktor may 1982 280, CPU card

Considering the amount of brain powerstored away inside the Z80 -A, the CPUcard circuit is surprisingly straight-forward. As can be seen from figure 1all that is needed to make the braintick is a handful of ICs. Memory isorganised according to the Elektorsystems' page structure, in other words,it consists of 4K blocks. The first block(0000... OF FF) is located on the CPUboard and contains 2K of EPROM10000 07FF) and 2K of RAM

... (WEE). This particular boardwas designed for use with the new poly-phonic synthesiser or Polyformant andthe combination is described in detailelsewhere in this issue. Since only 1K

Z80 -ACPU card... for the Polyformant

As the Z80 is still one of the most popular microprocessors around,it is high time the device was mentioned in Elektor. However, that isnot the only motive behind this article, for the Z80 -A CPU is the heartof the control circuitry for the new Elektor synthesiser. The board iscompatible with the Elektor microprocessor bus system, so that theEurocard collection will now be accessible to Z80 users.

U. Got. and R. Mester

of RAM is required in this applicationIC18 and IC19 (see figure 1) may bemitted.

It is not absolutely necessary to positionthe memory ICs and their correspondingaddress decoders on the CPU board.Large amounts of software can best bestored on a separate (EPIROM board,such as the Elektor RAM/EPROM cardIESS 80120). One or two minor modifi-cations to the latter are required first,however, details of which are providedelsewhere in this issue.

BuffersAny self-respecting CPU board will ofcourse have to be properly buffered, asthe CPU outputs are unable to drive acomplete system directly. Since thebuffers used here (IC9 ... IC131 aretri-state and are enabled by the BUSAKsignal, the DMA, or multiprocessing,facility of the Z80 is retained.

SpeedThe processor is driven by a 4 MHzcrystal oscillator. This is the highestpossible clock frequency for a 280-Aor MK 3880-4 CPU. With the standardZ80 or MK 3880 the clock frequencyshould not exceed 2.5 MHz. It shouldbe mentioned at this stage that the Poly-

formant requires a Z80 -A (MK 3880 - 41CPU.Essentially, the operating speed of theprocessor mainly determines the timeit takes to execute a program. In thePolyformant, the CPU must scan thekeyboard and in the extended versionit must also scan all the presets. Furthermore, it must pass on all the relevantdata to the Polyformant modules(VC0s, VCFs and soon).Flow much time these processes takedepends on the response speed of themicrocomputer. This is particularlyimportant when the keyboard is beingscanned. The faster the scan, the soonera VCO will be able to react to a de-pressed key. Using the software packagedeveloped for the Polyformant, a VCOcan respond within two or three milli-seconds. This delay is far too short to benoticeable.

Wait cyclesThe use of a high clock frequency auto-matically calls for corresponding pro-cessing speeds, or access times. Theaccess time of a standard 2716 EPROM(IC15) will usually be too long for it tobe addressed by the CPU. As for dataentry, even less time is available forwriting to the RAMs (IC16 IC191!There are two ways in which this prob-lem can be solved. The first method in-volves the use of high-speed memorydevices, that is to say, EPROMs andRAMs with an access time of 350 nsand 250 ns, respectively. The latter areeasily obtainable nowadays, but 350 nsEPROMs are a little harder to find.Strictly speaking, even 350 ns is

'cutting it a bit fine', although a short-cut may be taken by implementing theOE (output enable) input instead of theCE (chip enable) input. This enables a350 ns 2716 to be used without theneed for any special measures.The other alternative is to slow downthe CPU and use normal 'low -speed'EPROMs. This is done by adding waitcycles to read operations. A wait cyclelasts erectly one clock period, that is,250 ns. The addition of a single waitcycle will therefore extend the EPROMaccess time to 500 ns, which givesplenty of leeway to even the most'sluggish' types. The delay is effectedby including flipflops FF1 and FF2 inthe circuit.The flipflops are only active while theEPROM (IC15) is being adressed (the Dinput of FF2 is low). They may beomitted if a 350 ns EPROM is available,in which case a wire link, J1 must beincluded instead of IC4. This deactivatesthe delay circuit. When testing the CPU,however, readers are advised to carryout the first method initially and in-clude a wait cycle, so as to be absolutelysure that a slow EPROM will not com-plicate matters.Any external memory or peripheraldevices are also ablet)erate waitcycles by way of the WAITE input.

Page 22: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

Al 4 . r

Page 23: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and
Page 24: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

2808 CPU card elektor may 1982 - 641

3

Fehtre 3. The component overlay for the 280, CPU card

Parts List

Resistors:RI ... R6 a Ok2

,R8+1 kRE a MO 11RI0,R11 6k8R12.420.11

Capacitors:CI,C8 22 p/12.3 V tantalumC2 C7 - 100 n ceramic or MKOCO 10,16.2 V tantalumC10,0 n MKP

Semiconductors:D1 101014802 LEDICI 2116001C2,1C.6,1C0 P 251522

2OLSOIICI 201-6201C8 74LS121C9 1C12 JOLS302ICI 3. 24152451C10 2/30.9 for MK 3880 01IC16. 2716/2516IC16 IC19 a 2114-2 or 2111,11-5

laccess time 260 nel

Miscellaneous:

SI push button switchXI. 4 MHz crystalK1 - 60-Wn connector

ResetReset circuitry is needed to initialisethe CPU. When the power supply is

switched on, R6, C8 and DI hold thereset input of the CPU low fora whilevia N29 and N10. This is the P00CCsignal and serves to reset any otherboards connected to the system bus. Anexternal reset facility has been providedfor emergencies. It is advisable to placeSI 'out of reach' to prevent it frombeing inadvertently depressed thuscausing valuable information to be

irrevocably lost.

The printed circuit boardApart from Si, all the components infigure I are mounted on a Eurocardsized, double -sided, plated -throughprinted circuit board. This is shown infigure 2. As the pin assignment of theStein connector corresponds to that ofthe Elektor bus system. the board maybe used in combination with a numberof existing cards.The components should be mounted onthe CPU card with due care, because insome places on the board the coppertracks are so close to each other thatsoldering may easily cause a 'short'.Although the board is provided with asolder mask to reduce this sort ofproblem, a great deal of care is stillrequired.

Further information on the Z80Enough has been written about the 280to fill an entire library. Plenty Of soft-ware is available too, but users must bewell-informed of the requirements oftheir particular system. Often the soft-ware has to be adapted for specificpurposes and this does call for a fairamount of expertise. The CPU ,boardpublished here was designed for thePolyformant and a special article is

devoted to its use with the synthesiser.A brief description of the software isalso given.The Polyformant is, of course, just oneapplication possibility out of thousands.The advantage of using the board in adifferent system is that the hardwarecan be adapted to existing softwarepackages. Such modifications areusually left up to the user, but ninetimes out of ten it is much easier towarrange computer circuitry than to re-rite programs.

Elsewhere in this iss an article de-scribes how to modifyue the 8K RAM8K EPROM card for use with the Z80and therefore how readers can createtheir 'own' computer system. el

Page 25: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

1982the El.ter Artist

dieElektora versatile electricguitar preamplifierThis preamplifier is a companionto the 100 W power amplifierpublished in the April 1982 issueof Elektor. Two independentchannels are provided each withtwo inputs. Features include highand low impedance inputs,extensive tone controls, built-inreverb and fuzz and effect 'loop'switching, providing the musicianwith all the extras normally foundon the more expensive equipmentat a reasonable price. Althoughoriginally designed for theguitarist, it can of course, be usedwith any other electronicinstrument such as an organ orsynthesiser.

Designing a really good circuit for aguitar preamplifier was quite a chal-lenge. After a considerable number ofrequests from Elektor readers our designstaff set about creating the Artist. Theprimary objective was to produce apreamplifier that satisfied a discerningmusician while still remaining a practicalproposition for home construction. Allthe Artist's effects are combined ontoa single printed circuit board, therebysimplifying construction considerably.The advantages of the switching modeswill be obvious to the adventurousmusician. This facility is something thatmusicians are always looking for, butrarely finding in commercial equipment,with the possible exception of HH.The front panel layout in figure 4 is agood point from which to start de-scribing the circuit and facilities. It isbasically a twin channel preamplifierhaving a low and high input. Channel Iincludes a five band graphic type tonecontrol circuit, built-in Fuzz and Reverb.The amount of distortion can be fullycontrolled and ranges from a 'clean'to extremely 'dirty' sound. By-passingthe Fuzz circuit does not result in anynoticeable change in output volume.

Channel fl has a simpler parametrictype of tone control and reverb. Thereverb 'loop' can be patched into bothchannels, independently or simul-taneously. The Fuzz circuit is onlyavailable on channel I.A switch enables an input to be fed toeither of the two channels. This allowsthe player to preset both channels andswitch from one to the other at will.The channel change facility as well asthe 'effect' switching can be remotecontrolled by means of toot switches.Finally, input volume controls and amaster volume potentiometer completethe circuit.

The circuitFigure 1 shows the circuit diagram ofthe 'Artist.. CMOS analogue switcheshave been used instead of FET powertransistors. This helps to keep theoverall cost down without impairingquality. The input signal from socketsBa5 Bal3 is fed to the non -invertinginputs of Al and A3 11C11, via theresistor network Al, R2, R39, R40.These set the sensitivity of the input(tailoring it to any guitar), and ensure

Page 26: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

the Elekror Artist elektor may IOW - 6.33

Page 27: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

5-34 - elektor inev 1982

2

the Elektor Arhst

wf

1I-0 0-E-oVs.c.'

tzele _Yr

b--51T'oito oak, 0.k,

°At° crAF°

Page 28: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

,, . ..4tsy,,_,, -5---).,k;11,,,,,.)--- Id/-\-i/c5 ti .s=6

cl' c\--°-7\ek -;.7---qTha e-f/7-'-- Noi o-

wivb Aoyme13.44

Page 29: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

5-36 - elektor may 1982 the Elektor Artist

that an input level of 7.5 mV is availableto Al and A3, irrespective of whethera high (less than 40 mV) or low (lessthan 10 mV) input signal is applied. Thelow noise opamp ICI (Al, A3), ampli-fies this signal by a factor of 22, inorder to achieve an excellent signal -to -

ratio right from the start. Theamplified signal (around 170 my) is fedto either channel by means of CMOSswitches ES1 ... 554. S4 (channelchange) is used for this purpose. A footswitch connected to the Ba4 socket by-passes S4 to actllow remote control.A close look at the circuit diagram infigure 1 shows that the input signal isswitched around the different parts ofthe circuit by means of CMOS switches.The use of this method results in noise-less switching and good channel separ-ation. The operating voltage of IC6 andIC7 is also reduced to about half (±8 V)their normal level, thereby reducingdistortion. Potentiometers PI and P7 setthe input signal levels for channel I andH respectively. Opemp A2 in channel IIis followed by the tone control circuitconfigured around A8. As readers willsee this type of tone control network tone control channel 1:is practically standard and is common treble 110 kHz/in all sorts of audio equipment. A4 middle Is kHz)in channel I is followed by a 5 band bass 1100 Hz)graphic equaliser giving -± 15 dB of cut tens l

channeland

boost at 100 Hz, 300 Hz, 1 kHz, 1.contro

3 kHz and 10 kHz. This is made up of a S.'.normal cut and boost tone circuit con 300 Nz-

trolled by P8 and P9, and then by too Hzthree band-pass filters around A6, A7 'eve), output voltage:and A8. fuzz threshold:Switches S2 and 53 control ES5 and

3

When mounting onto metal front panel theuse of Mastictaller type sockets isrecommended.co

Technical Specifications

frequency range: 40 Hz 25 kS/N ratio: 60 dBnoise factor: 0.13maximum output vortage: 4 Vrrnsnominal output voltage: 1 Vrmelow input mnsitiv

sensitivity:0 rn

puthigh iut 00 mV

outputmpedance:50 k

impedance: 500 11

:10.8 dB

:10dB

10.9:15 dB

15 dBx15.1:12 de1 Vrem1.5 Vrma

Vrms

ES6 allowing either, or both channels tobe 'patched' into the reverb loop. Onceagain the connection of foot switchesto sockets Bat and Ba3 allows remotecontrol of this facility. Opemp IC5 isthe preamp for the reverb spring line.This is a standard ordinary amplifierwhich has been used in many otherEleknor circuits. The gain of IC5 isset by R29 and C24. Obviously bychanging these values IC5 can be alteredto cater for the sensitivity of anyparticular spring line unit. With valuesas shown in figure 1 the output signallevel from IC5 is about 4 V, making itideal for the well-known 'Hammond'spring line, which has an impedance ofapproximately 812. The output levelfrom the spring to All, is set by P15, inorder to provide the reverb circuit withunity gain. Calibration is quite easy, P15should be set to give the same voltageat pin 8 of All as that of pin 3 of ES5.Bear in mind that without connectinga reverb spring line this procedure isnot possible. The reverb intensity con-trol (P5) mixes the 'flat' and 'contoured'signal.The Fuzz circuit around the FET 72, isa little more complicated. 12 is made tooperate at a drain source voltage level ofaround 500 my, in other words, near toits pinching characteristic. As the FETis driven without feedback, the level ofdistortion at its output is dependent onthe amplitude of the input signal.Increasing the input to channel I (P7)will provide a progressive increase indistortion, giving a tone reminiscent ofvalve amplifiers. Just as a matter of

Parts list

Eacnrcre/111,R39 56 kR2,1440. 15 k03,08,R21,R22,1441,R09,1170,R76 - 220 k

110,1120,026,028,1134,537.R42,R68,R74,1175,1179,1181 - 47 k

F15,R14,R31,1443.R66.R72 = 2k2R6,R9,R27,R33,1140,R46,R69 = 33 kR7,1845 = 12 kR10,1147 - 3k3R114308.1 k1112,1113=4k7R15,R16,11118,11119 5k6R17,1120,1171 = 22 kR23= 27 k1425,R32,R35,8138,077,1880,1182 =100 k1129'=470111130 -1011R364450,1151 -10 kR52 = 680 nR53,R56,1357,1160,1461,164,R65,

R67 = 150 kR50,R55,R58,1359,R62,R63= 8k2R73 18 kR78 10 MR83 = 100 a

PI,n7 - 47 k logarithmic82,P3,84 = 47 k linearP5,rI3 -10 k linearP6.100 king.1113. 22 k linearP9Y10,11,P12 =100 k linearPM -100 k presetP15 - 22 k preset

Capacitors:CI,C6,C33,C38,C56 33 n028-,034,07 17 p03,07,035,039,043 = 100 pC4,C8,C36,C00,C57,C59 2µ2/16 VC5,C37= I g/I6 V09,010,011,020,021,022,032,055,

0531 - 10 nC12,C14,C26,C29,C32,C50,C60,C62 = 47 nC13.013 1n50I5,053 22 nC16,C79 - 15 n

17,C26 -220nC18 = 23 0C19,C31,C04,C46,C61,039 C77 - 100 nC23 3n3C241 - 10 g/10 V tantalumC25- 100p/16MC27 - I nC30- 10p/16 VC41,042,050,052 On)C45= 5n6

047,049 27 nC51 =470pC63,C64 -11100)//25 V085,006 - 0125 V tantalumC67,068 M/7/18 V tantalum

Semiconductors:B1 = 54001000 bridge rectifier

bound version/T1 = BC 6476T2= BF 2580, BF 2450ICI -X R 4136, RC 4136IC2,1C3 Mb 070, TL 084104 LF 355, LF 356IC5 = Lk, 386IC6,IC7 - 4066!CB= 7809IC9 7908

Mimellaneous:

51 .... = en on/off switch (for single bole)55 = dra mains switchBM Ba8 = X In mono jack with switch

Tr1 = 2 x 12 V/2011 mA mains transformerLel - mains LED indicatorFl =101 mA NIT fuse with fuse holder

reverb spring one (Watford Electronics)

Page 30: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

POWER

off

0

HIGH

OINPUT I

C.)LOW

INPOUT

0

ICHANNEL

Al

--.111

On V_

VOLUME I 100Hz 300. 1 KI. 3 K. 10 K. FUZZ FUZZ INTENSITY,

0 ACHANGE 1E0=2 ARTIST guitar preamp

MASTERVOLUME

FUZZ

0CHANGE

0CHANNEL

0

Page 31: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

5.38 -.Ishtar may 1982 the Elektor Artist

5

Figure 5. This clearly shows all connections to the p.c. board.

otherwise unnecessary noise is gener-ated. This is specially important whenconsidering the sockets, se theground of the input has a differentpotential to the ground of the foot -switch sockets. One good idea (asalready advised) is to use plasticspindled potentiometers and insulatedsockets. It is left to the reader to decidewhether to leave the sockets on theboard or not. Finally don't forgetabout the kind of power amplifier youare going to use. In principle, theElektor Artist can be used with any.But please, bear in mind that it will notoverpome all the shortcomings of someamplifier and speaker systems around.

Page 32: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

PA,t, tAnemeter elektor elm lees -sae

As aeromodellers will know, it is necess-ary to match a particular propeller withany given engine. Each propeller has aspecification, indicating the optimumefficiency relative to its 'speed' (rpm).Therefore a way of measuring its speedis essential. When an engine is beingtuned it is also very useful to be able tocheck the rpm relative to any adjust -

made. A mechanical methodwould prove costly and rather com-plicated to make. The only sure way toachieve a high standard with a relativelylow cost is to use an electronic circuit.The speed of the propeller can be deter-mined with the aid of opto.electronics.An analogue indication can be providedby meansofa moving coil meter or, ifdigital is preferred, by using a digitaldisplay. Which method used will deter-mine the cost.

a rev counter for model aeroplanes

Modellers tend to be rather slowin getting into electronics. Thiscould stem from the fact thatbalsa wood and electronics arequite a few worlds apart, so thatmodellers may question their ownskill with a soldering iron.Expertise and reliability arecertainly important factors wheremodel aircraft are concerned, asany errors are inevitably costly.However, for certain applications,like the one described here, thesimplicity of constructiontogether with the help of a readymade printed circuit board,achieves a high reliability factor.

The circuit

The most straightforward part of thecircuit is the power supply. For con-venience and mobility a 9V battery isutilised. The power consumption is sur-prisingly low.The signal from the photo diode or-transistor Dr, is amplified by opampAt. With the turning 'prop' in front ofthe diode the amount of light falling onD1 will be fluctuating in direct pro-portion to the speed of the engine. It isadvisable to place a dark-coloured 'prop'against a light background and a light'prop' against a dark background.Diodes are included in the feedbackloop of Al to ensure that its gain will belogarithmic to compensate for changesin ambient light levels. R1 is also in.eluded to stabilise Al when very little

Page 33: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

PAO - Weldor me, 1982 pmptachommw

Figure 1. T. circuit diagram .r the tachometer. Note that a different output voltage range can be obtained by selecting a different value for C2iP2 is used far actual calibration.

light reaches the diode. If the circuit isonly to be used outdoors, the diode canbe replaced by a photo transistor con-nected as a diode (base and emitteronly). This transistor is not as sensitiveas the diode, but it will work reliablyin normal daylight It is stronglyrecommended that even when usingthe circuit indoors, readers should relyon daylight or crunch rather than onroom lighting, as this could influencethe accuracy of the circuit. The 100 Hzfluctuations tend to confuse the meter.Oparnp A2 acts as a comparator andSchmitt trigger, converting the signalsfrom Al into square wave pulses for thefrequency.to-voltane converter circuitaround A3. The sensitivity of this stageis adjusted by Pt, with the highestsensitivity at the lowest setting. In otherwords, the lower the switching threshold(P1 01, the higher the sensitivity,which implies that smaller signals will bedetected by A2.The frequency -to -voltage converter cir-cuit may look complicated, but it is

actually quite straightforward. Basicallyit is a monostable multivibrator (mono -flop) triggered by the pulses from theSchmitt trigger A2. Each pulse is differ-entiated by 02, R5 and P2. The output

of opamp A3 will go 'high' when thepulse at its non.inverting input reachesthe same value as that of its invertinginput, thus causing a current flowthrough 09. Consequently capacitor C2will discharge until the voltage at thenon-iverting input drops below that ofthe inverting input. The output of A3will then change state again until thenext pulse arrives.The remaining components in this partof the circuit ensure that the outputpulse of A3 is proportional to its inputpulse and the time it takes C2 to chargeand discharge. The charge level ofcapacitor C4 will now be determined bythe frequency of the pulses from theoutput of A3, since they are of fixedduration. In other words, this voltagelevel is proportional to the frequency ofthe changing light on the photo diode,(the input to the tachometer), andtherefore the engine speed.In the final stage opamp A4 acts as abuffer on the 10k load (R8). The out-put will then be within a DC range of

V.Photo 1 shows the characteristics of thetachometer. The horizontal axis indi-cates the number of revolutions withthe vertical axis denoting the voltage. As

Photo 1. The output characteristic of thetachometer. The horizontal sults is 100 Hz000 rpm) per di v i s ion; the vertical is200 InV/dis.

can be seen, a good linear relationshipexists between the two.

Practical hintsFigure 2 shows the track layout for theprinted circuit board. The battery canbe attached to the board, if desired, bymeans of double -sided adhesive tape.It is strongly advised that the phototransistor for diode) is mounted in some

Page 34: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

prop tachometer Weldor may 1682 - 6411

2

Figure 2. The track pattern and mmponent overlay of the printed circuit board Mr the prop tachometer. The board has been designed to lit inplaptic cam from Vero 1202.21029.11 or WenHyde 1190C 4301. Since consumption is very low the battery will last quite a long while. In this Me,it may be advisable to secure it with a piece of doublesided sticky tape.

Parte list

8More:RI,R3 - 10 MR2.180kRO 2k7R6 22 kR6,R810 kR7 .470 k89.802RI0.12011P172 - 100 k presets

Capacitors:CI 100nC2 2n2.C3.C6. 10 p/I6 VCO. 070 n

Semiconductors:DI BPW 34 Electrovaluel or

phMotransistorD2...1312. DUS013 BOY 6V8400 mWT1 BC 53719ICI LM 324

Miscellaneous:

St single pole on/off mitch9 V battery

form of protective 'handle' since it is

known that fingers coming into contactwith a prop turning at 15.000 rpm causea sharp decrease in interest in all thingsconcerned with aero modelling. Keepthe connection wires between the diodeand the circuit as short as possible.

CalibrationSetting up the circuit is very straight.forward requiring the adjustment ofonly one potentiometer (P2). Connecta multimeter to the output, switch thecircuit on and measure the offset volt.age. Take careful note of this readingas it will be required later.A normal fluorescent light tube can nowbe used as a calibration source. This isideal because the light output variesin a 10000 rhythm (twice the mainsfrequency). This is equivalent to 6000pulses-per.minute, or 3000 revs of anormal twin -blade propellor! Point thephoto -diode at the lamp and adjustpotentiometer P2 to give a reading onthe multimeter of 150 mV DC plus theoffset voltage, (the previously obtainedreading). That's it, as far as calibration Isconcerned. The sensitivity is adjusted bymeans of P1, when measuring the revs

of a propeller. Obviously this settingwill depend on the distance between thepropeller and the diode or transistor.as well as on the contrast betweenpropeller blades and background.The choice of display is left to theconstructors. A moving coil meter willbe suitable and the offset

will

reading can often be eliminated bymechanically zeroing the meter. How-ever, a standard multimeter of digitalvoltmeter will also do the trick, alwaysremembering to subtract the offsetvoltage from the reading.It desired, the voltage range of theoutput can be changed easily. since itis determined by the value of C2. As arule of thumb, doubling the value ofthis capacitor will double the outputvoltage. The value given -in the circuitdiagram (2.2 nF) is a good choice:20,000 r.p.m. corresponds to 1 Vat theoutput. The maximum value for C2 is6n8.

Page 35: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

542 - elektor may 1982 0502M1ousekower

6502housekeeperA programmable time -clock

With all the digital clocks and watches available today, it is surprisingthat time -switches are often such crude affairs. Given the relatively lowcost of microprocessor chips, it seems 'logical' to do the job properly!This article describes a sophisticated time -clock, based on a 6502microprocessor. It can be used to control a multitude of householdappliances, such as cookers, burglar alarms and house lighting.Incidentally, since it must keep track of the time to do its job, it canalso provide a digital display of time, day and date. In other words itis also a digital clock ...

A 6502 microprocessor keeps track ofthe time and day of the week. It alsocalculates the date, even bearing Hapyears in mind, so that it will remainaccurate until 'February 29th 2100',...(That is not a Imp year, and mostmicroprocessor -based 'perpetual mien.ders' go wrong at that point!).Our electronic housekeeper is easilyprogrammed. It provides four controloutputs for switching purposes. Threeof these are intended for 'daily needs'-'on' and 'off' times are set on a 24.hours basis, and it is possible to selectdays of the oak on which the sequencewill not be executed. The times areaccurate to within one minute. A fourthoutput is intended for a weekly cycle:tenon' and 'off' times are distributedmere sevenfflay period. The onlyrestriction is that they must be coronaquerter-hourly basis.The microprocessor checks the timesentered; if a line seems to be switchedoff twice in succession, say, the 'house.keeper' will indicate this error immedi-ately, during programming.Obviously, this sort of thing requires anextensive program. A complete listingis included in this article, but we hopethat enthusiasts will understand that wecannot explain it in detail ... Describingthe actual construction and operationof the time.clock takes up quite enoughspace as it is!

The hardwareFigure 1 contains the complete circuitdiagram of the digital time -clock. Atthe heart of the circuit there is a 6502CPU (IC1). The program for the clockand the switch functions is stored in a2716 EPROM (IC3). The third large ICis a 6532 (IC2), which provides 16I/O levee to control the display, scanthe keys and read in the time data. Inaddition, the IC includes a borer (whichgenerates seconds pulses) and another128 bytes of RAM to store temporarydata and the switch time entries.Apart from the 16 I/O lines to IC2, anadditional four output lines are neededfor the different switching times.These are provided by the four -bit latch,IC4.The clock generator is shown at theloom left in the circuit diagram. Theoutput from a 4 MHz crystal oscillatoris divided by four to obtain the 1 MHzclock signal. This division is done bytwo flipflops, FF1 and FF2. Anotheralternative would have been to use a1 MHz cryffal in the first place, but thesolution used here is a much cheaperway to obtain a 'clean' squarewave.When the unit is switched on, a 'OCTsignal initiates the reset procedure. Thesignal is generated by the circuit aroundT1, 12, N3 and N4. Initially, Ti willnot conduct but T2 will, effectivelyshorting capacitor C7 and ensuring thatthe output of N3 is at logic zero. Tivans to conduct when the rising supplyvoltage reaches 4.5 V. As a mash, T2is turned off and C7 starts to charge.

Page 36: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

6602 housekeeper elektor may 1982 - 643

Di

4J 4,J '

82137 I

Figure 1. The circuit direm of the progremnable time clock. Me 8502 CPU is simnel at Me centre of the circuit. The displays and meinCAN.. unit are shown a

mt

Me top and the power supply is located in Me knees rigloWand owner.

Due to the C7/89 time constant, theoutput of N3 stays low for some timeafter the supply voltage has attainedits nominal value. The circuit aroundN3 and N4 is included to 'sharpen up'the edges of the reset pulse. In passing,we can note that a reset pulse is alsoproduced if the supply voltage brieflydrops below the 4.5 V level for anyreason, but this will be discussed lateron.One side of the six displays and 'days

LEDs is connected to the I/O lines bymeans of the buffer/inverters in IC5,and the other is linked to the darlingtontransistors, T3 ... T9. The latter seeto it that a constant current flowsthrough the displays and the LEDs.Two 5 V stabilisers, IC8 and IC9, pro.duce the supply voltage. They bothprovide 5 V,IC9 feeding the LEDs anddisplays and IC8 looking after the restof the circuit. This arrangement makesit easier to provide an emergency

INICAD) battery supply. The batteriesare placed at the input of IC8. Duringnormal mains operation, a 'topping -up'current flows continuously through thebatteries by way of resistor 835. Inthe event of a power failure, thebatteries will feed the main circuit viaD9 and IC8. At the same time, a verylow current will pass through thedisplays (by way of 835 and IC9). Thissystem reduces the current consumptionfrom 0.8 to 0.25 A, so that the NICAD

Page 37: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

6. -.Mot may 1982 8602 hout40..P.

batteries used here will be able to standin for about one and half hours.The charge current flowing through thebatteries is determined by the valueof R35. This in turn depends on thetransformer voltage and may be calcu-lated as follows:

R35. U.Cg.

During prolonged power cuts thebatteries may be discharged to such

an extent that the stabilised supplyvoltage drops below 4.5 V. In that case.the reset circuit will introduce a reset toprevent errors in the program executionand failure of the display multiplexingunit (which might cause one of thedisplays to burn out!). The reset willalso cause the programmed switchingtimes to be lost. Fortunately, a powerfailure will rarely last longer than 90minutes!Instead of NICADs, two ordinary4.5 V batteries may be connected in

series, in which case R35 is omitted.They will have to be replaced after ayear or two, of course. Some readersmay even consider this emergencysupply totally superfluous. in whichcase the batteries, R35 and D9 may beleft out altogether and D8 may bereplaced by a wire link.The address decoding system does notneed to be complete and a simplecircuit (using only twocuff ice, because the memory range con.sists of only three blocks (IC2... IC4).The processor can deal with a total of64K memory, but what happens here isthat the same 4K memory block is

repeated throughout the range. Thethree blocks are decoded by addresslines A10 and All:

All A10O 0 IC2O 1 IC4

Memory is mapped as follows:400 *800

IC2 : IC4 : IC3

3FF 7FF FFF( = don't care)The chosen structure is by no meanscoincidental. The EPROM is at the topend of memory, because that is wherethe NMI, RESET and IRO vectors haveto be fetched. IC2, the 'RIOT' (thisstands for RAM, I/O, TIMER. - a well- organised IC, despite its name), is

situated at the other end of the rangefor two reasons: Using the 6502 pP, 'zero page in.

structions (addresses 0000... 00FF)are only 2 bytes long. If similar Un true.

ons are required on any other pagethey will consist of three bytes. This is ahighly effective way in which to ecomomise on memory space. Page 1 (0100 01FF) must contain

HMO., 0800,0PFF012 3 4 5 6 7 8 9ABCDEF

0800: 08 59 FF AA EB 95 00 000810: 00 47 DO F9 A9 00 85 OF0820: 68 60 36 DO F9 66 40 660830: 60 02 90 58 00 EA EA 200840: A2 00 AO 00 24 87 50 11

0850: 28 PO 50 A5 80 10 F4 300860: 63 A5 5P C9 59 DO 3F A20870: 07 AO 06 20 9F 09 02 050880: F7 A2 05 05 55 95 OF 95OB90: 08 86 61 A2 D8 86 OF 850060: 55 95 OF CA 10 F9 A2 FF0800: OA 90 F3 MI 16 90 04 590800: 5F CO 20 90 20 FO 30 550800: 28 PO 38 CO 35 FO 32 CO0860: 49 FO 45 CO 57 FO 46 CO08FO: A2 96 20 80 00 CA DO FA0900: 40 30 08 A5 63 30 69 100910: 00 85 50 06 50 DO 09 15

0920: OF 15 55 40 40 40 10 Fl0930: 10 09 52 OA A9 00 95 550940: 46 62 90 12 62 02 05 480950: 67 CA 10 1,2 30 12 05 400960: 89 09 65 68 55 46 85 670970: FB 85 66 A5 60 FO OA 660980: 66 20 13 00 56 581 A4 500990: 09 FO 60 AO 00 20 OB OA0900: 00 OA 49 60 DO 64 99 490900: 99 MA 00 20 OB OA 20 00 OA C9 08 DO 05 A9 01 990900: 40 00 B9 4B 00 09 29 30 41 C9 31 30 11 6A 90 26

0900: 4D 00 C9 08 10 02 49 FF 6A BO to 90 2C B9 OD0060: 00 C9 02 DO 25 89 ME 00 29 13 FO 04 C9 12 DO 06O9FO: B9 4B 00 60 BO 14 A9 01 99 VB 00 20 00 OA C9 130000: DO 08 Ag 01 99 40 00 20 00 OA 60 18 05 48 F8 690010: 01 D8 95 48 68 60 48 98 48 BA 48 A9 00 85 81 A50020: 82 85 64 06 61 FO 08 A5 01 A9 79 85 9F DO 10 .90030: 82 85 96 A5 ID CO 07 A5 48 DO 03 20 58 OA A2 000040: 20 93 09 20 69 OA A9 09 85 61 A5 64 85 82 A9 7F0250: 85 81 68 AA 68 08 68 40 85 01 A2 02 A9 00 A8 BA0660: OA OA OA OA 85 06 01 OE OA 04 40 OA 88 DO PC 900070: 08 A9 IM 25 01 85 01 BO 1F C8 08 A5 4A DI 06 FO0080: 04 BO OA 90 13 05 49 CO DI OE 90 00 88 08 A9 010090: 45 61 85 01 CO 09 DO 62 06 01 CA 10 BF 66 01 680650: CO 14 FO 25 20 D5 OA 98 05 40 90 F3 DO 10 05 2A00130: IM 4A C5 40 FO 04 90 OE BO OF B5 2A 29 03 A8 A50000: 49 D9 F3 OF 90 03 40 9F OA BA 29 01 OA OA OA 050000: 01 80 00 04 60 82 48 40 AA B5 36 90 08 40 40 400060: 40 08 68 AA 60 29 OF 10 F8 A2 00 00 09 60 85 82OAFO: BA 09 09 DO 02 68 85 40 A8 90 09 B9 48 00 45 400800: 40 4A 10 03 B9 48 00 29 OP 09 30 85 82 68 00 BE0010: DO D9 60 A9 40 85 10 A2 04 09 02 85 IC 135 65 C60820: IC PO 27 30 29 4A VA 40 VA 08 B9 DB OF A4 10 840800: 82 85 80 20 86 OB A5 21 C9 01 FO 07 25 10 FO 030040: 20 86 OB 88 84 80 46 1B 10 D3 29 OF 10 DB CA FO0850: 09 60 01 DO 04 135 65 40 20 OB A5 21 CO 04 C9 010060: DO 03 20 86 OB A9 00 85 82 A9 BF 85 80 A5 82 DO0070: 09 A5 eo 09 80 60 85 80 BO P3 A5 80 09 80 85 620880: A2 FF 86 80 AA 60 00 64 88 DO PD 60 20 30 09 C9

3D DO F9 A985 21 BD 0061 A9 7F 8544 09 C9 FF

88 6804 AA81 85DO F9

95 0095 4883 85A5 87

A2 00 68 C8FI 20 80 OB

20 8C08 00

00 CO28 DO

96 20 8C 00B5 OF 05 55

CA DODO IF

PA A2CA It

49 CA48 85

10 P760 30

20 3221 A2

09 A205 B5

86 6080 DO

20 3202 A9

09 3000 85

OF 0063 54

63 1041 FO

02 6630 CO

50 A644 FO

56 CO42 CO

58 FOIB 98

20 15F8 69

55 4A01 D8

95 5585 5F

9D 5655 40

55 4642 95

50 BO55 E6

97 A956 DO

15 55CA 10

40 10

P9 60EC 1586 50

55 40BV 50

00 0220 89

DO 0309 85

20 8969 05

09 9540 20

06 4011 06

29 7F11 10

38 6004 A9

CA DOFF 85

60 AB49 6000 20

CO 06DO 6600 05

09 OF99 4849 24

BO 0200 20DO 50

200e90: PD D0 FB

0000: PO 11 C9 R 11 fi !!

MO, 40 AF OC 20 54 OE 40 9C OB 02 FF 06 69 86 68 29OBDO: 20 05 OA FO ID 59 02 05 OB DO 02 06 66 A9 OA 05OBEO: 05 FO 09 20 56 OE 56 00E6 DB 10 Cr 20 CO OE 40010PO: 90 00 86 66 20 06 0E 06 00 69 14 050000 F5 20

RAM for the 'stack'. This requirement is met by not connecting addresslines A8 and A9 to 102 (RIOT willtherefore occupy pages 0 ... 3). Thismeans that the 126 bytes of RAM inIC2 are used for two different purposes.The lower section belongs to page zero10000 ... 0069) for storing data (intermediate results and switching times),whereas the rest acts as the stack inpage 1 (016A ... 017F1.Finally, the address range betweenRIOT and EPROM is used for the latch(IC4).

Construction and calibration

Figures 2 and 3 show the printed circuitboards for the digital time -clock. Oneboard contains the displays, LEDs andkeys and the other accommodates theprocessor, with its associated conkponents and the power supply. Theboards are designed to be mounted oneon top of the other, with the coppersides facing each other. Be careful whenwiring the boards and inserting theminto a case. Some mounting holes aredrilled through wide copper tracks. Use

Page 38: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

8502 housekeeper *flier may 1982 - 5-45

OCOO: 44 of 4C 9C OB 20 44 OE A9 02 C5 OB FO 25 05 69OC1O: 85 IA 05 68 85 1B C6 OB CO OB 20 7C OE /15 69 C5

8818; 88 82 88 28 5F 90 g2 88 g2 28 88 82 02 82 88 g0000: 54 OE 4C 08 OC 20 48 OE AS 69 85 5B AS 68 85 5C0050: 20 05 OA CO 08 FO 28 84 to 68 86 OB 20 OF OE 980060: C5 IA 00 20 FO 02 BO II EA A5 69 CS 50 90 15 FO0070: 02 BO 06 05 68 CS 50 90 OB A5 OB C9 13 DO C9 CO0080: ID 40 37 08 A9 CD 85 69 A9 DA 85 68 A9 DF 85 670090: A9 FF 85 66 85 OD 20 13 OB C6 OD DO F9 A9 2A C5OCAO: OA FO 06 20 50 OE 46 90 OB 20 68 OE 4C 9C OB A6OCBO: 69 88 DO 04 86 69 86 68 A9 80 85 21 A9 28 05 OA0000: FO 30 89 02 C5 CO FO 2A 46 21 A9 00 C5 21 DO 04OCDO: A9 04 85 21 A9 02 C5 21 FO 18 A9 40 CS 21 FO 1COCEO: 4A CS 21 FO 30 4A CS 21 FO 25 411 C5 21 FO 23 40°CFO: 83 OD 40 96 OD e9 00 05 21 90 9C OB 20 4D OF 450800: 69 18 69 10 C9 24 90 02 49 00 85 69 110 FC OC 4C0010: 3C OD 4C Ce OD 20 4D OF 86 69 A9 20 25 69 FO OC0020: A5 69 CO 24 DO EF A9 20 85 69 10 69 /15 69 29 OF0030: CO OA CO 81 A9 FO 25 69.85 69 10 D9 A9 2A CS DA0040: FO 13 20 4D OF A5 68 18 69 10 CO 60 90 02 A9 000850: 85 68 40 42 OD A9 18 85 21 20 40 OF 18 A5 68 480860: 69 15 D8 CO 60 DO 02 A9 CO 85 68 40 59 OD 20 480870: OF 66 68 AS 68 29 OF C9 OA DO F3 A9 FO 25 68 850880: 68 10 eS 20 4D OF A2 2A 84 OA DO 04 42 FF 86 OA0090: 20 98 OE 40 83 OD A9 00 85 21 20 97 CF E8 DO FA0040: 20 97 OF 68 FO FA 20 97 OF 88 FO F4 CO DF FO 4900160: 09 EP FO 4F C9 FB DO 88 A9 2A C5 OA FO 4B A9 800000: 85 OC A9 FF 85 66 46 OC 20 B6 Cr 88 DO FA 20 86ODDO: OF 88 FO FA 20 B6 OF 68 FO F4 C9 OF FO IB C9 8F00E0: FO 21 CO 00 FO OA C9 F7 DO 64 A5 OC 45 66 85 66ODFO: A9 01 CS OC DO DO 40 9A OD 20 86 OE A9 80 05 210E00: 40 C8 OC 20 E6 OE 40 C3 OB AO 01 46 OB FO 04 CA0810: 20 D5 DA B9 EA OF 65 66 49 FF 85 OC 20 B6 OF E80E20: DO FA 20 B6 OF 88 90 FA 20 06 OF 88 FO F4 99 FB0E30: FO 07 C9 F7 DO BC 40 96 OD 46 OC AS CC FO CA 380E40: 69 66 30 D8 A9 FF 65 OA 86 OA A9 03 C5 OA FO 180E50: A9 00 85 OB A9 2A C5 00 FO 16 E6 OB E6 OB A9 OA0E60: C5 OB FO 84 20 70 OE 60 A9 2A 85 OA A9 FF 85 OB0970: E6 05 A9 14 CS OB FO CC 20 OF 08 60 A9 00 A8 850880: ID A5 OA OA OA OA OA AA 05 OB 85 IC 81 IC 85 690E90: 86 IC 81 IC 85 68 86 1C A5 00 6A 6A 90 00 A9 0008A0: 05 IC 85 67 86 IC 01 IC 85 66 60 A9 OA 10 F1 0501810: OB AA 85 2A A8 C8 FO 23 29 FC 90 90 85 69 05 2A08001 29 03 A8 B9 93 OF 85 68 8A 42 90 16 A9 OA 09 30°EDO: 85 67 20 D5 OA B9 EA OF 85 66 60 88 84 69 84 6808801 30 E6 A9 00 10 E8 95 OA C9 2A FO 18 OA OA CA OAOM: 85 IC AO 00 A5 66 91 IC A4 OB A5 69 91 IC C8 A50280: 68 91 IC 60 AO 00 A5 OB AA 45 69 OA OA 95 2A 050910: 66 90 OB 08 CO 15 FO 06 C8 CO 50 FO 01 CO 98 150920: 2A 95 2A AO 00 A9 OF C8 38 6A C5 66 DO 99 80 4A0030: AA B5 36 90 OE 29 OF 95 36 98 OA OA OA DA 15 380040: 95 38 60 29 FO 95 50 98 15 58 95 39 60 20 81 oF0F50: E. DO FA 29 81 OF ES FO FA 20 81 OF 88 FO F4 C90960: De FO 09 C9 Ee FO OF e9 FB Do 88 60 BA 88 88 9A0970: 20 86 OE 40 CB OC A9 CO 85 21 BA 68 E. 90 4C 00Oen: OE OS 21 85 IA 86 OD 86 OD 19 04 A9 00 85 21 2006.90: 13 OB A4 IA 84 21 60 86 0D 49 70 25 0D Do 12 A5OFAO: 66 49 FF 85 66 20 15 08 A5 66 49 FF 85 66 AS 62

OFDO: 20OOFC°: A5 13 10: ggqngnn PF to fing 60P 19

OFEO: 12 02 78 00 10 23 7B 06 2F FF FF BF DF EF F7 FBOFFO: FD FE Fe 00 15 30 45 FF FF FF D5 OF 00 08 16 OA

insulated spacers and screws here, as

otherwise something may vvell go up inmoke!

The 'day' LEDs can best be flat rec-tangular types (such as HP 5092-46701.The days of the week can be indicatedon the LEDs by means of transferlettering. Different shaped LEDs mayalso be used and the days may beprinted next to each on the front panel.A third option is to mount an LEDarray in a DIL package (a set of10 LEDs, such as the MV 57164, forexample) and carefully remove three of

them with a saw.The two regulator ICs must be properlycooled. The back of the metal case canact as the heat sink if the regulators aremounted directly onto it, but micainsulation and washers must be used.The pins of the regulator ICs should besoldered onto the board, by the way,not wired. It is quite feasible to separatethe supply section from the rest of theboard, if desired, and mount it else-where in the case.The boards are connected so that bothsets of PBO PB6, PAO... PA6 and

PA? pins are opposite each other. Theconnection points can then be linkedwith short lengths of wire. Then con-nect the three power supply connec-5ons on either board.Once construmion is complete youcould insert all the ICs, connect thetransformer to the mains and checkwhether everything is working satisfac-torily. If something is wrong, it wouldbe quite a problem to trace the errorwithout a logic analyser. But there is

another method, and a few hints onhow to test the hardware using anoscilloscope or a multimmer can makeall the difference.Don't connect anything up for themoment, except for the stabilisers IC8and IC9. Don't insert the other ICs intotheir sockets yet! The same applies tothe batteries. Now check whether theoutput voltage of the two stabilisersis 5 V. Switch off the supply and insertIC6 and IC7. Switch on the power againand see whether there is a symmetrical1 MHz squarewave at pin 8 of IC7.Readers who do not own an oscilloscopemay use a multimeter instead and theauxiliary circuit in figure 4a. If the oscil-lator is working properly, the meter willindicate about 0 V. IA reasonably goodfrequency counter is needed to checkthe frequency; calibrate the oscillatorwith C2.1Now find out whether M (pins 9 and10 of IC6) is logic 1. If so, the code'AA' is applied to the data bus by meansof several wires and resistors, as shownin figure 4b. The indicated numbersrefer to the connector pin numbers be-tween ICI and IC3 on the board.Time to Macro the 6502 (IC1) in itssocket (turn the power off first!). Afterpower up, a symmetrical squarewavewith a frequency of 250 kHz should ap-pear at AO (connector pin 291, 125 kHzat A1, 62.5 kHz at A2, and so on downto 7.6 Hz at A15. BATY (connectorpin 141 must remain high. If one of theabove conditions is not fulfilled, firstcheck whether AA is in fact beingapplied to the data bus. Again, thismeasurement does not require an os-cilloscope and can be carried out bymeans of the auxiliary circuit in fig-ure 4c. The circuit is connected to allconsecutive pairs of address lines inturn: 415 and A14, A14 and A13, A73and Al2... Al and AO. Each time themeter should read either 0 V or 5 V.Any intermediate value indicates a fault.It is best to check whether there is a7 Hz squarewave at A15 first by connec-ting the meter to it. The pointer will'flutter' at this very low frequency (pro.vided you are using a moving coilmeter). Then check all the address linepairs with the auxiliary circuit.The 'AA code' is now disconnected fromthe data bus. Remember, no solderingwhile ICI is on the board! It will haveto be removed from its socket eachtime. The next step is tor munt theEPROM, IC3 (with the power off, ofcourse!). Before switching on the power

Page 39: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

546 elektor may 1962 6602 housekeeper

o{P.4.. ,/.10611

11 0

CD/RMT0022:4,04,0101 tar

Figure 2. The mein P inted circuit board. This aThommodams the entire micrRprowwor unit. The power suPP. metiem may B. separated, itnecesserY.

Resistors:

1,R2,R2 = 2k21:13,134,R12.3k3R5 - 1 kRe 5k6156.56R9 - 500 nR10.420 SIR11 2 15kR12 220 atR14... .0 12 kR21 .10k.8... fl34=10RR25 120 ft

Capacitors: ICS -24.122C1 =10 n IThr./ I.. ULN 2002C2 o 4 .... p trimmer IC6 . 241-604

CS . 150 p ICJ . 241524CO,C5,120,C13,C14 - 100 n ICS,I. .7805C2 . 4JB/00 V 01... 02 . LED red08,011,812 .106/10 V Rant.) see teXt

CO ss 1200 6/26 V D8.D9 .184001C10 - 106/25 V Rant.) e= 84001500 bridge rectifier

L01 ...LIM - 121 7760Semiconductors: (HP 5082-7780/

T1,T2 =TUBT3... T9.1.518 Miscellaneous:

1C1 . 8502 Tr .10 V/1,5 A mains transformerI.. 8532 S1 ... 52 = digiustICS = 2218 %- 4 M. crystal

Page 40: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

6602 housekeeper

Figura3 The display board contains dm displays, LED., central electronics end puabbutton keys.

olobtor may 1983 - 547

supply again, link pin 26 of the connec-tor (NMI) to pin 36 (A7). After powerup, the address bus should read:

A15 A1O A13 Al2A11 A10 A9 AO00001111A] AO A5 AO A3 A2 Al AO

103... A0 are not wawa)

Furthermore, pin 20 of IC3 should beconstantly low. If something is wrong,either the EPROM was not correctlyprogrammed or N5 is not inverting thesignal.If everything is O.K. so far, pull out themains plug for the last time, remove theconnection between NW and A7 andinsert the remaining ICs. The clockshould start to count from 00 00 01 assoon as the circuit is switched on.Calibrating the crystal oscillator accu-rately is not an easy job. As mentionedearlier, the oscillator can be adjustedwith C2, with a quality frequency meterconnected to pin 8 of 1C7. However, asfew readers will be fortunate enough to

own a really accurate frequency meter,here is an altemative method. It can bejust as accurate, but it is rather moretime.consumingFirst set the trimmer capacitor C2 in itscentre position. Switch on a radio andwait for the time signal on the hour(1100, 1200, etc). Synchronise theclock on the sixth 'pip' of the radiotime signal and press the start button.Let the clock run 'on its own steam' forseveral hours and then compare it to'real time' again. Check whether theoscillator is 'fast' or 'slow' and readjustit with C2, if necessary. By repeatingthis procedure several times (over a

period of a few days, if necessary)readers will be absolutely sure theoscillator is accurately calibrated.

Programming the timerA pushbutton switch (SA) is connectedbetween the input and ground to startthe time entry routine. Operation is asfollows. After power up, the clock startsto count from 00 00 01. The clock is

stopped by depressing SA. The week/day LED then flashes. The desired dayof the week may be selected with the> pushbutton (S3). Then the CURSORkey is operated (S6) and the tens/hourdisplay starts to flash. The hours may beset by depressing > several times. Thehours, minutes and seconds are all dealtwith in the same r. Once the'second' units have been enteredman and theCURSOR key is operated again, thedate will appear on the display. Thesame procedure is followed to enter the

enrrect data, starting with the day andding with the year (from left to right,

in other words). Take care not to pro-gram an impossible date, as the clockmight feel inclined to misbehave. Afterthe year entry press the CURSOR keyagain. The time will then reappear on

the display but no LEDs will flash. Nowpress the MODE key (021 and the clockwill start one second later. Readjust thetime or date setting with the SA key, ifnessary. By the way, SA doesn't haveanyce effect unless the clock is licking.1

Page 41: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

548 -elektor may 1802 geoblieumkalmt

4

Figure 4. The auxiliary circuits for testing the digital time clock. They are only required if anoscilloscope is not available.

5 Nothing happens if it is operated duringthe switch time entry routine, which isdescribed below.The four control outputs may he con-nected to any device that needs to beswitched on or off at a specific time bymeans of a relay or a triac circuit. Out-puts TO ... T2 can each program fourswitch times within 24 hours. In ad-dition, the day of the week may be

TO entered on which these switch times areto be processed. Every day at 00.00hours the outputs TO ... T2 are auto-matically reset. The minimum switchinginterval (between 'on' and 'off') is oneminute.The fourth output, T3, can be pro-grammed fore weekly cycle. It provides10 .on' and 10 'off' times that can be set

Figure 5. This tiny Interlace enables outputs at I if teen -Minn. intervals. This line is

To ... T3 to s.tst, mains -powered equip automatically reset at the beginning ofmans an and oft every week (at 00.00 hours on Monday

morning).

T3 BC 140

The switch functions are as follows: Si, the DATE key, displays the date. 02, The MODE key, selects between

the time display and the switch timeentry.

53, the > key, increments the valueon display that is indicated by aflashing cursor.

54, the SET DAY key, serves to pro-gram the days of the week.

65, the NEXT key, shows the nextswitching time on the display.

SO, the CURSOR key, moves thecursor from left to right across the

display (but not the right-hand digit:that indicates whether anon' and 'off'time b involved). The display selectedby the cursor flashes to indicate that itmay be altered, if necessary, with the> key. S7, the CLEAR key, deletes some or

all of the switching times on a par-ticular line (starting with the timecurrently on display).As mentioned above, the right-handdisplay indicates whether the switchingtime shown refers to 'on' or 'off'. 'On' isrepresented bye '1' and 'off' by a V'.Its neighbour shows the line number(0, 1, 2 or 31. A program example isincluded in this article to illustrate howthe various keys work, and to give anidea of the facilities.A return to the normal time displayroutine causes TO... T3 to be modifiedaccording to the entered switching

occurs exactly one secondafter every minute period. During pro-gramming of the switching times, theoutputs remain unchanged.One final point. If an 'off' time is pro.grammed and this turns out to precedethe 'on' entry, depressing the MODEkey will cause an ERROR message toappear on the display tor stew seconds,followed by the first time that is pro-grammed for the line where the erroroccurs. No return can be made to thetime display. First the error must becorrected, after which the MODE key isoperated to switch the processor backto time display.

Switching mains -poweredequipmentReaders who wish to switch mains.powered equipment 'on' and 'off' withthe aid of the time switch require asmall interface for each of the fourswitch outputs. Figure 5 provides a

simple circuit for this purpose. Theswitch output controls a transistor byway of a resistor. The relay can thenswitch a device on and off. How muchPM,. may be switched depends on thetype of relay. For the transistor shown,the relay current should not exceed100 mA. If f2 ft relays are to be usedthey may be connected directly to thetime clock's power supply (across C9).This method ensures that the circuit iselectrically isolated from the memovoltage. A solid state relay is of courseequally suitable.

Page 42: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

8802 housakm0.1 Mak. may 1982 - 5-09

Program example

Switching times to be programmed:line TO: switch on at 08.30 on Monday and Friday

switch off at 09.02line Tii constantly '0'line T2: constantly '0'line T3i switch on at 20.00 on Sunday

switch off at 08.00 on Tueulayswitch on at 10.00 on Wednesdayswitch off at 00.45 on Thursday

ILIL

IL -p j1303,00.1

-; fl13CD Cot.^,=====.7'

Page 43: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

0 0 0 011

0 0 2 0 6 0 t

CQEBfI

E 0 0

' E 0 0 01

' E 00081M --

E0000

-9E0000

E 0 0

EL-100(7.1--

-10E00001M .-

El 0 0 0E11

------L9E0000

E h 0

:°EIJÜUU P 0 0 01f 41721:44,51 E 0 0 0 GI F. -

v.° Neu Jon.. - 05.9

Page 44: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

IlAWEPROM card for the 280 ale.. may 1982 -5E1

Memory cards are basically birds of afeather. They all contain memory ICs,BUS buffers and a control circuit. Thelatter, however, does tend to vary fromone system to another. The RAM/EPROM card described in the September'80 issue was originally designed for usewith the SC/MP and 6502 systems, butafter a couple of alterations it can berun on the Z80 as well. This involveschanging the printed circuit board bybreaking 9 tracks and then inserting7 new wire links. No new componentsare required. In other words, it is just a'cut and shunt' exercise.Figures 1 and 2 show the changes thatneed to be made to the lower and com-ponent overlay sides of the printedcircuit board, respectively. As can beseen, very little cutting and linking is

required.

memory access and refresh cycles.During normal memory access the CPUstarts by outputting addresses. After ashort period, the MR CI signal is gener-ated. This is accompanied by the 110strobe during a read cycle, in which caseboth signals will be synchronous. Afterthe two signals the CPU stops readingdata.Things are different in the write cyclewhere the CPU produces the MARS sig-nal and simultaneously transmits theoutput data to the data bus. But the WDline is not ended until after a !Metinterval to allow the active edge of thestrobe to be used for data storage (pro-vided the system is buffered in such away that the data bus really does passdata to memory before the W6 strobearrives!). The WD si,r_eRIs disabled atthe same time as the 111E40 signal.

RAM/EPROM eardfor the Z80A. Seal

In principle, the RAM/EPROM card (as published in the ElektorSeptember '80 issue) may be connected to a variety of microprocessors.One or two minor alterations to the control circuit are all that isnecessary, in many cases, to match it to a particular system. This articledescribes the changes needed in order to interface the card to the Z80 -arid the Z80 -A CPU, in particular, as this is introduced elsewhere in thepresent issue as the 'brain' behind the Polyformant.

Reasons for the changesThe SC/MP and 6502 systems defineboth the address range and the directionin which the data transfer is to takeplace during either the read or writestrobe produced by the CPU. In theZ80, on the other hand, a valid addressmay be output on three separate oc-casions: during normal memory access,when one of the 256 I/O addresses isbeing accessed and in the case of mem.ory access during a refresh cycle. Takinginto account the additional possibilityof a non.valid address, only two CPUlines would seem to be required todefine every possible address status. Inactual fact, however, the Z80 processoruMs three lines:MR EQ to access memory locations:IORQ to access peripheral devices andfrrgi7 to access and refresh dynamicRAMS.Let's forget about IORCI for the morment and see what happens in normal

The memory card may not be accessedduring a refresh cycle. What happenshere is that the refresh line is enactedfirst, after which the WW1 signal is

strobed. 0 and WD are not used, be-cause the CPU ignores data during thisparticular process.The control circuit of a memory deviceoperates according to the followingparameters:

1. Memory is accessed if PIREII is

enabled and PITSA is disabled.2. Data must be applied to RAM before

the WD strobe is enabled.3. Data must only enter the BUS while

RD is enabled and memory is beingacessed.

Figure 3 shows the circuit diagam ofthe modified memory board. The firstparameter is met by linking MR ED andRFSH by way of N6 and N7. Pin 8 ofN7 will then only go low, if the CPUaddresses a memory location. Thememory card should only react to amemory access if the relevant memoryrange is being selected. This is achievedby connecting pin 8 of N7 to pins 18and 19 of IC5 (the 74154 decoder). Itsoutputs activate the CS decoder IC6 andIC7 by way of N1 and N2. In addition,the output of N5 produces an activehigh CARD SELECT signal.The second requirement is fulfilled bymaking sure the card transfers data fromthe BUS to memory during its quiescentstate. Thus, data will also be appliedupon the arrival of the WD signal.The 6502 processor imlements the WDsignal instead of its RD counterpart totransfer data to the data bus when mem-ory is being accessed and the W5 signalis disabled. In a Zr80 system, this wouldgo hopelessly wrong: during a writecycle the CARD SELECT signal willprecede the WD strobe. The original cir-

Page 45: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

582 - Willmar may 1982 RAM/EPROM seed for the 280

la

//

Fioure la. The circles indicate whits tracks on the lower side of the primed circuit board needto be broken.

cud 'notices' the signals and star. aread cycle. It will therefore transferRAM data to the BUS until the writepulse WO appears. On the one hand,this prevents data from being2pplied toRAM upon the arrival of the WD strobe(second parameter) and on the other,the data We is already being driven bythe CPU buffers, as the CPU control cir,cuit has acknowledged the write cycle.Bi-directional transfer is strictly for.bidden in the BUS. Dependingon whichdrivers are being operated, current peakswill be produced on the .5 V and GNI)Ines, which could well make the systemcollapse.To avoid these problems, the RD signalis inverted by way of NB lad linked tothe CARD SELECT signal by way ofN3), and used to control the directionof data transfer in the data bus buffers.N4 serves to buffer the WE line, whichhas the arduous task of driving 16 ICs.

Inverters N6 and N8 and NAND gate N7required for the modification arealready included on the printed circuitboard in IC29 174LS001. In the originalcircuit, the unused inputs are either highor low to avoid crosstalk to active gates.These connections should now be re,placed by the links indicated in figureslb and 3. Once all these alterations havebeen made, the RAM/EPROM card willbe ready for use with the Z80.

lb

I ///

//1

////

/

///////// 82134-2

Figure lb. The n re links an the lower side.

Page 46: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

a

0 1111Akeillif iiiiiillil 0 0 iii:0001 ),1" I"I" ifftYk4119400ail oot91",lp)

tli) . ilio(str,iloolon'''' - d (1!!..,91)1)11,,,40,4'

7 iiyiji\ 00107j0 N0

011000---4---07-111100

010,1.4 Afrliktft .","'11,411/0 Pk ri Tr -

---- -_---.. 0---- .--,

_1,111111111M

§E

/01110.1 =4:71-

1111-111MI'N'N12;

N

Page 47: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

590 - elektor may 1982 software muncher and puncher

Junior Computer owners regularly sendus programs that they have written for'their' machine and Elektor's editorialstaff dutifully try them all out and'unravel' them with the disassembler.Unfortunately, the task is not always

rewarding one and occasionally thework resembles that of a pathologylab. Nevertheless, it is gratifying toreceive so many sparks of initiative!Any attempt in this direction auto-matically calls for a disassembler, butthat is by no means the only reasonfor having a 'software cruncher. Used incombination with the editor and as.sembler the disassernbler enables open-ators both to write their own programsand decode those gleaned from friendsor magazines.

softwaremuncherand puneherdisassemble Junior Computer softwareand program 2716 EPROMs

Whereas developing one's own software is often like taking a leapin the dark, analysing other people's programs can sometimes be quitea revelation. In either caw a disassembler is called for, such as theone described here. In addition, it is a useful aid towards 'BASIC'conversion. And, as the software cruncher is stored in 2716 EPROM,why not include an EPROM programming program, to use up theremaining EPROM space), together with the EPROM hardwarepublished in January?

example given in Table 1 this comprises$0200 ... $022F. Note that the endaddress must be entered and that the'end address +t' rule does not applyhere.This is followed by the message 'L, P,$P?'. By depressing the L key theoperator can disassemble the entirememory range 'in one go'. The P key,on the other hand, does this in blocksof 15 instructions (a full TV screen, thetop line being the last one to be printedbefore P was operated) and the spacebar SP allows each instruction to bedisassembled in turn and is thereforethe slowest method.The 'crunched' program in Table 1gives an idea of the type of informa-tion that is printed. Table 2 shows theFlex dump of the disassembler. First ofall, the address and the op code of theinstruction are displayed followed bythe byte(s) contained in the instruction.Then the mnemonics (the instruction'shorthand') are printed preceded byseveral spaces. Wherever relevant, theline ends with the operand data. Thedisplacements involved in conditionaljump instructions are 'translated', so tospeak, as the 'jump address'.

Data that is notknowledged to bethe op code of an instruction has themnemonic consisting of three AmericanAT symbols assigned to it (see address021E, for example). Such data is onebyte long. Note that FF is not acknowl.

Then R is operated and the programreturns to PM. What could be easier?

Table 1,

FOIEFM A9 RVALID COMMANDS, DHLPR SP

DISASSEMBLE: 200, 22FP, SP

The details 0200 As

The software cruncher is stored in 27160202 AD0206

AsEPROM. The software occupies the 020,uraddress range $F800 ...SFFFF. The 0209 etEPROM may either be mounted on a 02013 85RAM/EPROM card or on the mini MOO BoEPROM card published in the April 0210 Beissue. Locations Van ...VMS 0213 80store the actual disassembler. 0216 20

$FDDA ...SF F F9 contain the 'EPROM 0218 0C0.2166,PROGRAMMING UTILITIES' (which 0,are described later on in the article) and 021F FFSEFFA ...$FFFF include the vector 0220 00data with which JC owners are already 0221 00familiar. 0222 CAThe disassernbler section of the soh- 07. Seware twitcher' is shown in Table 1. D.J. SeAttar initiation (enter the start address g',22;!

$FC4E through PM!) the computer FO

0228 DOreports back by defining the relevant 022A e0function keys. The D key is operated 022C 90to enter two addresses which 'cordon 022E FAoff' the memory range that is to be 022E 00disassembled (ending in CR). In the

00 LDAtt $0001 02 LOU $020103 LOU $0309 LOA ($00,X)05 LOU ($06),Y06 Lou $06,X07 08 Lou $0807,009 OA LOA $0A09,YOB LOX SOB,YOC OD JSR $0000OE OF 1MP SOFOE10 11 MAP 1$11101

ORMNORBRKBRKDEXINYINXASL A

12 BEG $023AFE BRE RAMS30 BCS $0260EE BCC $021C

@RRBEM

Page 48: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

Rektor may 1982 - SOSsoftware crunch°, and puncher

Ot>O.'

111

112,...65.41-1501.5.41nowsu >mere', u possau <O. aonsel -tsoneeili

Figure 1. The memoo ranges involved in the SPRUTL routine. Operating the NI, R. V or F keymums the CURAD and POINT pointers to move through every location from SORSA andDMA to SORSA and DESSA, respeetnuly

As for the Fl and A keys, depressingH is equivalent to operating M duringPM and A represents 'ASCII dump'.Thus, a hex dump is printed after twoaddress entries followed by CR (seetable 2). The A key causes a hex dumpto be printed showing the ASCII codeof any alphanumeric character withinthe $20... $7E range. In the case ofdata outside this range, a space appears.This feature allows data, such as com-puter messages that need printing, tobe boated swiftly. Once readersmanage to crunch the disassemblesthey will see that this is riddled withsuch messages.

Not only, but also ...The printing operation of the dump orlisting may be interrupted by depressingthe BRK key. The BRK jump vectorleads the 6502 pP to a central point inthe program where it waits lone (new)key to be operated.When two addresses are entered for thepurpose of defining a listing or dump,the second address must be higher thanthe first. Otherwise, the two addresseswill have to be reentered, only thistime in the right order please!As well as storing data in much usedmemory locations in pages 00 and 1A,the software cruncher must dispose of$0010 .. $0027. $0028 must now alsobe added to accommodate the extrasoftware. Operators must be carefulnot to use thew memory locationsfor the program they wish to 'sortout'.

Software puncherAs mentioned earlier, now that wehave the necessary hardware (ElektorJanuary 1982), a start can be made onloading RAM or EPROM software into27161. The program is started by

way of PM at address SFDDA. Afterinitialisation, the name of the programis printed along with a list of valid keys.Then the parameter key, P. should bedepressed so as to define the addressrange by entering three addresses, as

shown in figure 1. First of all, the'FIRST, LAST SOURCE ADDRESS'must be specified, in other words, theSORSA and SOREA addresses at eitherend of the data block that is to bestored or relocated. Make sure SOREAhas a higher number than SORSA, asotherwise the entry procedure (firstaddress - comma - last address - CR)will have to be repeated. Next, enter the'FIRST DESTINATION ADDRESS'.This is known as DESSA and determinesthe location of the first address belong-ing to the data being programmed ormoved. (Enter the first address followedby CR.)

The following key functions are valid:The M (MOVE) key ensures that theSORSA ... SOREA data block is storedor relocated (provided the EPROMprogrammer is connected and pre.pared for programming - more aboutthis later) into the destination blockDESSA. DESEA. For reasons in-volving the V key, the two blocks maynot overlap. The three address pointersmust be set according to the parametersindicated in figure 1. At the end of theprogram 'DATA MOVED' appears onthe screen/is printed.The F (FP check) key enables the oper-ator to check whether locationsDESSA... DESSA n - 1 contain FFIn represents the number of memorylocations in the data block being pro-grammed). If so, data may be stored inthat particular range. The address andcontents of any memory locations thatdo not contain FF are printed. Once all

locations have been run through. Table 2.0e5 Mime of the erunehar.'DATA COMPAR ED' appears.

Page 49: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

S813 - elektor may 1982 software crunches and puncher

The R (RELOCATE) key. All the absol-ute addresses within the data blockSORSA ... SOREA are adapted to thenew situation brought about by movingor programming a data block. The flewaddress is determined by the contentsof DI F (see figure 11. At the end of theprocedure, 'RELOCATED' is printed.The R key function is not needed whilerelocatable software is being stored(without any internal )MPs and sub-routines) or if the contents of oneEPROM are being loaded into another.In order to copy RAM data intoEPROM, depress R, then M. But tostore EPROM data into RAM, depressM followed by R.The V (VERIFY) key. This comparesthe original data block and its relocatedversion, byte by byte. Whenever anerror crops up, the offending location isprinted along with its address and con-tents. The operation signs off with the'DATA COMPARED' message.The B (BACK) key introduces a returnto PM whenever the computer is readyor the operator wishes to disassemble arelocated/programmed data block (toverify the R key routine).The ST key (ST/NMI on the main key-board) allows a return to take placefrom PM to EPRUTL, like a warm startentry. Then 'XXXX <= AD = < YYYYTO > = ZZZZ' appears, where XXXXstands for the FIRST SOURCE AD-DRESS, YYYY stands for the LASTSOURCE ADDRESS and ZZZZ standsfor the FIRST DESTINATION AD-DRESS.By the way, ST may also be operatedduring EPRUTL to print the threeaddress parameters and their interimstatus during an operation. This is

extremely useful, as sometimes theparameters need to be temporarilyaltered. At the same time, the operatoris reminded of what was entered three'screenfuls' before.

How to prevent programs fromgoing 'off the rails'

1. The EPROM programmer must beconnected to the bus board. The card

is addressed in the normal manner duringprogramming. This means that a 'FIRSTDESTINATION ADDRESS' ($2000 orhigher) must be entered for reasonsdescribed in Book 3. But this does notimply that any EPROM date locatedbelow $2000 in the memory map, suchas the main board monitor and the TMand PM software, is excluded. Detailsare provided in point 3.2. Using the S3... S6 switches, a 4K

address block must be selected thatdoes not coincide with any existing datablocks. Otherwise double addressingoccurs. If necessary, remove one or twomemory cards from the bus board forthe time being. Remember that the firsttwo 4K blocks are also out of bounds(see point 11.3. The FIRST DESTINATION AD-

DRESS entered just before the startof the program must be located withinthe selected 4K block (see point 21. Thisaddress does not necessarily have to bethe ultimate first address (it may bemodified later). Right now we intend toload data into the EPROM on theprogrammer, byte by byte, with theaid of the M key. But take heed! If anyabsolute addresses need to be altered,start by entering the real FIRST DESTI.NATION ADDRESS using the P key.(Then depress R and P again, followedby the first address of the EPROMprogrammer.) Finally, operate M.4. S2 on the EPROM programmer is

not switched 'on' until just beforethe actual programming sequence (withthe M key). During programming LEDD9 lights and remains lit for the entireprocess. (About 20 bytes are loaded persecond, so it takes quite a while). S2should be switched off as soon as 09

2

has gone out and 'DATA MOVED'appears on the screen!5. 2716 and 2732 EPROMs have one

thing in common: they do not enjoybeing exposed to the full brunt of the25 V programming voltage withouthaving the comforting protection of the5 V supply voltage. The circuit in figure2 is added to the EPROM programmerhardware 'to cushion the blow'.6. To find out whether a 2716 IC is

truly empty, access a 4K block onthe EPROM programmer; select a

FIRST DESTINATION ADDRESS thateither corresponds to the first addressin the range or to one 2048 locationsfurther on, and enter any 2K datablock. Now depress the F key.7. Whenever EPROM software needs to

be duplicated, Bore the 'master' ver-sion on a RAM/EPROM card, (unlessit is a system EPROM). Insert the(presumably) empty EPROM on theprogrammer board. Then follow theinstructions given in points 3 and 4.After a short while the data 'transfusion'should be complete.8. Loading EPROM software into RAM

is no problem and may come inhandy whenever system programs are tobe stored on cassette or the contents ofan EPROM are to be changed. Firstcopy the data (using the M key) andthen relocate it (with the R key), ifnecessary. The V key allows the oper-ator to check which locations havebeen altered as a result of the R keyoutine.

9. When using the R key, watch out forlook -up tables and 'stringsl Data

such as '2041 54' is ambiguous, for itmay either be the ASCII code for 'LAT',or stand for JSR-$54411 If 54 con-stitutes an ADH within the data blockbeing programmed ($2000 $5FFFon the dynamic RAM card) the chancesare, operating the R key will cause the54 to be deleted. That is why it is agood idea to check the location of suchtables beforehand, and make sure theyremain intact after R is depressed(before M is operated). The disassemblesis of great help in these matters.10. A special program, as described in

the January article on EPROMsoftware, would be needed to store datain the 'step' mode using the originalmonitor routine. Fortunately, this is nolonger necessary, thanks to the PMroutine. Just enter the EPROM locationto be programmed the EPROM pro-grammer version! see point 3), depressthe space bar, enter the data and pressthe '.' key. Make sure the EPROM pro-grammer is ready for programming, asindicated in point 4.Although very few keys are needed toprogram EPROMs, operators will dis-cover that they offer a surprisinglyversatile repertoire.

Figure 2. This circuit is added to The EPROM programmer to prevent the EPROM Thing loadedfrom becoming a fried chip if 52 is inaThertently switched on beThre the EPROM programmerpower supply is connected up. A common mains switch does not provide a 100, guarantee,

We are informed that a suitably pro-grammed 2716 will be available fromTechnomatic Ltd, London.

Page 50: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

market olektor may 1082 - 6-57

'Small business printerThe late. .mily of bi-directional logicseeking dot m.rix printers from .ntronicsLtd - the 150 series - is now being stockedby Byte. Limited. These versatile 150 char. -ter per second m.hines are .ailable foreiMer 10 -inch or 16- inch paper wi.hs, a.have snao-on tr.tors to handle roll, cut -sheetor fan.. paper.

The series, whiM comes complete wiM atime -saving cassette ribbon system, features a96 ASCII character set, pl. an optional inter-natio. char.ter set. Printing may he carriedout in 40, 80 or 132 column format, using a10.6 duty cycle. A self testing facility a.cover safety intodook complete the relativelysophisticated functions offered. and bothtypes are available with either serial or parallelinterfaces.

Bytech Limited,Unit 57, Stamm Ind. Park,London Road,Earley,Reading,Berks.Telephone, 07.1-61231

12348M)

Combined function, sweep andpulse generatorHouse of Instruments announce the WG 230from Trio, which combines the .pabilitiesof a Emotion, sweep a. mil. generator inone high qualiry compact unit The widefrequency eendwido is co.red by a log a.linear divided, high resolution main dial from20 Hz to 200 kHz, wiM an auxiliary controlco.ring the range 2Hz to 20 Hz.F44, main tYPes of output are available: sine.square, tria.le and TTL level pulse. Outputimpedan. is 600 ohms with 7 V rms sine and10 V pp for square and triangie cont.. try60 dB of switched and 20 dB of variableattenuation. Flatness is better than 0.2 dBmaking the NIG 230 ideal in determining fres&Nancy characteristics, The TTL pulse outputcan be used to drive logic circuitry or act asa clock source substitute. FM modulation,another convenient feature when rnearyringfrequency char.teristics over a specif ic band,is available via an external signal. External DCcan be used for VCO applications while a use.1 sweep ramp output is provided for use as

a time access control for oscilloscopes or penr.orders.Up to I ive fraquency decades can be coveredin a sing. sweep with Eater., sweeptimes being internally selected from OA to100 .conds both continuous a. single to

match the application. The single sweep modecan also be comroll. manually from thefront panel or sweep 3,311.8. determined byexternal signals. Automatic sweep speed com-Pensating has been provided to maintain aconstant sweep time period for any arbitrarilyset width. The WG 230 is neat a. Wm..measuring 128 x 190 IHI x 285 11)) sninand weighing approxim.ely 4.2 kg.Home of Instruments,Clifton Chamber, 62,High Sum,Saffron Walden,Essex 2810 IEE.Telephone: 079420922

12345 Mi

Pushette switchesA new line of puMbutton switch. is now

available from N.S.F. Limited. Standardfea.res of the Pushette switches includeilluminated a. non -illuminated buttons,interlocking buttons, .1der lug, spade andscrew terminal, maintained a. momenmrycircuits, bezels a. two methods of snap -inmounting. The new pushbutton switchesare interchangeable with ...id snap -inrocker switch models, thus using the samepanel cutsouts and so can be subrtituted

without re -tooling of Me exiai. panel.Illumination is provided by either n.n orin..e.ent lamps through red, green a.amber actuator buttons whilst the non -

illuminated Mermoplartic button, are avail-able in reck white and black. Both types canbe hot stamped in red, white a. black, withlegends to customers' specification&Pusherte matches have a 255 AC/28 V DCrating of up to 10 amps 260 V AC and modelsare available for low voltage DC application&as,. Limited,Keighly,West Yorke. BD21 5EF,Telephone: 05261511.

12341 MI

Slimline wafer switchWhere loehind panel dimensions are critical,especially in applications incorporatingprinted circuit rotary water switch., Me newSlimline mechanism provides a smooth, ef-icient a. positive indexing, all in a slenderPackage. Being a Ve.y iniMedi component,the all moulded construction gives protectionagainst corrosion and requires no additionallubrication. The saving in length, comparedwiM existing alternative models, is appro.-m.ely 5 mm to the first stator. With 30 a.36 degree indexing available, the switching

mntednTypical atemanemechanism

ee!MiSLIMLINEindexingmechanism

rang. from 1 pole, 2 to 12 ways up to 6odes, 2 ways per water, and the 12 or pintermin.ions of tHe PCA stator board arePositioned conveniently along rye edge foreasy attachment to printed circuit hoards.N.S.F. Limited,Keighlay.West Yorkshire 80.215EF.Telephone: 05.75.6I144

12336 MI

Page 51: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

5-58 -elektor me, 1982 ativertosement

an excitingintroduction tomicroprocessors

The first acquaintance with microprocessors can be rather frightening. You are not only confronted with a largeand complex circuit, but also with a new language: 'bytes, 'CPU', 'RAM', 'peripherals' and so on. Worse still, thefinished article is a miniature computer and so you have to think up some sufficiently challenging things for it todol This book provides a different - and, in many ways, easier - approach.

The TV games computer is dedicated to one specific task: putting an interesting picture on a TV screen, andmodifying it as required in the course of a game. Right from the outset, therefore, we know what the system isintended to do. Having built the unit, 'programs' can be run in from a tape: adventure games, brain teasers,invasion from outer Waco, car racing, jackpot and so on. This, in itself, makes it interesting to build and use theTV games computer.

There is more, however. When the urge to develop your own games becomes irresistible, this will prove surpris.ingly easy! This book describes all the component parts of the system, in progressively greater detail. It alsocontains hints on how to write programs, with several 'general-purpose routines' that can be included in games asrequired. This information, combined with 'hands.on experience' on the actual unit, will provide a relativelypainless introduction into the fascinating world of microprocessors!

5.00 - Overseas 5.25ISBN 0-905705-08-4

Page 52: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

advertisement elektor may 1982 -

KITS, COMPONENTSMICROS & PARTS

DISCO LIGHTING KITS

DVIA/ULTRA SENSITIVTHERMOMETER KIT

FOR FREE SHORTFORM CATALOGUESEND SAE TODAYWe also stock:Vero productsAntex Soldering IronsBabani Books

[THE KEY TO YOUR SECURITY IS IN OUR LOCK I

THE MULTI -PURPOSE TIMER HAS ARRIVED

Egfii:EPZ

ALL PRICES

EXCLUDE VAT

MEMORIES AND PRICES SLASHEDMICROS al 'l aaleve IX

74 LSTTL

MOW LIGHTING KITS

Tom: E Ea,

CMOS

REMOTE CONTROLCOMPONENTS

24 HOUR CLOCK/APPLIANCE TIMER KIT

Adzi SOp postage Elcking E VA1-10 Eats,

FAST SERVICE -TOP INIAIITY- LOW LOW PRICES

THELECTRONICS711No Circuit IS complete without a call to -

11 Boston Road = El Telephone: "orLondon W7 3SJ 015799794/2842

G..,OPEN

Page 53: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

AND CO-STARRING : Cappy the capable capacitor

coriG 5°°14c)

045111

8

43

">.

40U)

_c

.2

2

oc

. .

te)

The first electronic comic -bookRESI & TRANS!

BANISH THE MYSTERIES OF ELECTRONICS !

O\ 'C'Cs,(0\ -

96C

Excitement, entertainment, circuits. Complete with printed circuit board and Resimeter.

Further adventures a circuitsconvey. soon eico Transe,of course!

-from Elektor

Elektor Publishers Ltd., Elektor House, 10 Longport, Canterbury CT1 tPE, Kent, U.K.Tel.: Canterbury (0227) 54430. Telex: 965504. Office hours) 8.30- 12.30 and 13.30- 16.30.

Page 54: ELEKTOR Artist · 542 - elektor may MS selektor Photographing the hidden beauty of microchips Manchester photographer Ad Sternberg is a man fascinated by the delicacy, beauty and

EX R

COMBO -AMPLIFIERNN portal!. ItOW RESET

amo for all wipe muicions.

Ib-gm I'm stet KW. ..P.W Airers. MothsMs or non...,

IWM

proamo.

Pote. in oor boot. Pico 90p.Or. Ps D.010.

STOP -WATCH1t1.onale 9drt no attP.reolts o

iol

ammon. luneoonalole

man ou

000.

MILES PER GALLON METERdistlay stows you how

ocimomical you driving as you go

Porsolete..1.1e.

Price 69p.full details n piossts boot.

Order Oa PAPPP.

niirapion ELECTRONICSUPPLIES LTD.A.0 mail la-P.O. Baal Rayleigh, Essex .680Tek Salsa IN. 552911 General 107021554155

28.1 Tr:',1Z2lEalooNow Shoos cad Mondays

DIGITAL MULTI -TRAIN CONTROLLERControl up to Id trans nolooduelly mthe seme any loursinu.souslyi

pm

ava.Wk auiN In our punm boo k Pam 80p.O As PP024

HOME SECURITY SYSTEM

:Pio:roc= =1 -ftr "'reof vole... Imp .n

ph In ou pmjmc book.t 145.

Oar As P0.0.2[

MATINEE ORGANpasyto.10.

to

e ns s elCmab00Hogowlnnlo10

no[2.5ude.uousioNO

Ordr Os .1551,

Co** Nos wdable.Elemoos-(199.95.Calonet- P99.50 lurnape oWelPomo cassette price [1.99. 0.0s DIM

7.1:* Powle now mallboanotesol WHSSIITH. poce

320. pages puked ern ane mes am MOD clams

Post this coupon now!sesono mo twoos of your 320 pepe conebeue 2. phsi

I am onio.**.fied may.. Pie sualogin to too

nrm Poo outsa ite Ox. s.P16.12 Intemniornl Sesry Poops