Hobby computers are here!

902 136 27MB

English Pages 93 Se [100] Year 1976

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Hobby computers are here!

Citation preview

A

1S

PUBLICATION

HOBBY comPLITEAS RAE HEAE~ The day of the hobby computer has arrived. This book contains simplified introductions to various aspects of hobby computing, complete with home building projects to get you started. This book is one of the few (if there are any other) sources of information on all aspects of computers . .. hardware (with very simple ex planations of the basic circuits involved) ... the software ... and systems. Editor: Wayne Green W2NSD /1

Copyright 1976 by 73, Inc. All Rights Reserved 73 Magazine - Pet erborough NH 03458 First Reprint - 1977 Printed in USA

HOBBY •

comPLITERS PtRE HERE~ Preface Way back in 1975, for those of you wi.t h long memories, there were hundreds of computer hobbyists. In 1976 there were thousands, and by the end of 1977 there will probably be tens of thousands. But even this is insignificant when the market for the small computers which hobbyists are fanning really develops. Small, powerful, yet inexpensive computers are being developed for the hobby market and these will inevitably open up the small business, school and home markets for computers. Thus a ma rket that will perhaps amount to $20 million in 1976 may grow to as much as $10 billion by 1980. Growth like that means t here is a lot of money in there for anyone willing to take a crack at it ... but before you can shake the golden goose you have to get a halter on it ... and the fact is that simple to understand books about small computer systems are most difficult to find. Since most of the applications for hobby computers other than the playing of games have been developed by amateur radio operators, it is not surprising that much of the beginning literature of the field has appeared in an amateur radio magazine: 73 Magazine. Indeed, interest in hobby computing has been so high among amateurs that 73 has been devoting a whole section of the magazine to the subject. The serious entrepreneur of next year will be the person who has a good understanding of computers ... hardware, software, and systems. Oddly enough, about the only way to get such knowledge today is via hobby computing. Computer professionals working for the larger companies have little opportunity to get expertise and true understanding outside of their narrow field of work. The hobbyist of today has by far the best opportunity to be the millionaire of next year . .. or at least the year after, if he is a slow worker.

HOBBY comPLITEA5 RAE

HEAE~

Computers Are Here ............ .. .......... .... ....... .4 What's A Computer? .. .... . ........................ .. ... 7 The History of Number Systems .......... . ...... .. ...... . 10 Is Digital All That New? ..... .... ...... ................ . 12 How Computers Figure . .. .............. .... .. .......... 13 What's That in Binary? .. . .............................. 18 Say, Are You A Computer? .. . .. ........... ....... .. ..... 20 Computers Are For Hams! ... .... ..... ... . ............... 22 How Gates Work .......... . ...... ............ ....... .. 24 TIL - The Best Logic Yet ..... .. .. ... . . ................ 26 Ins and Outs of TIL . ..... .... . ........................ 29 Flip Flops Exposed .............. . .... ............. . .. .33 Those Memory Chips - RAMs, ROMs, PROMs, etc........ . ... 36 Computer Languages - Simplified ............. ........ . .. .44 The New Standard Cassette System .. . . . .................. .48 Build This Tele vision Typewriter .. . ... .. .. ............ .. .. 52 Television Typewriter Display Unit .. . ..................... 60 Using Surplus Keyboards . ............. . ... . ...... . ...... 72 Morse to RTTY Converter . : .... . ........................ 78 ASCII to Baudot Via a PROM ............................ 82 ASCI l/Baudot Via PROMs - A Second Way ... ...... . ....... 88

Wayne Green's Editorials Where Computers Are At ... ... ...... .... .. . ..............9 Hamming It Up On Computers . . ............... . .... .. . . ..9 Computermania . ... ........ . .... ... ................. . . 11 uP ...... . . . ........... ...... ... ... .. .... .... ....... 17 The Great Computer Peril ................ ..... .......... 17 Yes, But Which Kit? .... . ... . ... . .......... . . . ......... 17 Cassette 1/0 Standards ........ . ...... . .... ... ........... 19 Computers Simplified ............ ....... . .. ... ... ...... 21 ' CHU Digital Time ... .... ..... . ................. . ...... 21 Computer Publications .. . .. ........... . . ........... .... 32 More Computer Publications .... . . ......... ... ... . . .. .. . .43 Want To Make A Bundle? ......... . . .. . .......... ...... .43 Ham Computing ........................... . ... . ..... .43 Fresh Orange Jui ce Magic ................ ..... ..... . ... .47 Bill ions ... Billions! ......... ........ .................. 58 uP And Amateu r Radio ..... . ..... .. ....... . . . ....... .. . 58 Conventions ................... ....... ............. . .. 58 Postal Disaster ......................... .... ........... 71 Computer Convention . .... ....... ............ ... .......77 My Big Speech . . ... . . . ... .. ... ..... .. ............ . .... 77 Programs for Sale? ................. . .... .. . . ...... . ... .87

Wayn e Green W2NSDIJ c/o 73 M agazin e Peierborough NH 03 458

Computers Are Here-

Are You Ready? L

ike Duz (do they still make Duz?). More and more CPU kits are becoming compute rs are getting a reputatio n for available ... such as the recen tly announced being ab le to do just about everyth ing. It is Godbout system using the National PACE well earned, fo r to understand computers is chip . .. this holds a lot of promise for a lot to love them ... they are being billed as the of computer at a ridiculously low price. World's Greatest Toy, and this is not much Another new one is Sphere, availab le in kit an exaggeration, young long-hai red blonds or assembled form in the same basic price notwithsta nd ing. range of $500-$600 with enough buil t-in More and more amateurs are tackling the memory to do some work. new inexpensive computer kits and coming There arc two basic forms of memory up with very usable results. Some are using required ... one in the CPU to permit it to the units to aim thei r antennas fo r moon- do its work ... and one ou tside for longer bounce, so me to predict or even aim term use. The internal me mory sto res antennas at Oscar, some to opera te a operati ng program instructio ns and thin gs virtually au tomatic RTTY sta tion, some to retrieved from the larger memory which run a repeater or even a syste m of repeaters have to be used by the CP U. Practically .. . and so forth. speaki ng, the larger the internal memory of the CPU, the faste r your computer system The Three Basics can operate. For instance, if you had a There are three parts to a computer record of all of the stations you've ever system . . . the central processing unit, contacted in the main memory and you cleverly called a CPU, the gadget which costs wanted to sort thro ugh fo r one particu lar the most money and which does most of the call, it wou ld be easier to find if you r CPU work ... an input/output device such as a could grab a thousand stations out at one teletype . . . and some sort o f memory for time and check them against th e call you the CPU to keep thin gs on file when it is not need instead of checking maybe ten at one actively working with them. IC tec hnology has been raising havoc wit!'> CPU prices, dropping them in 1arge increments every few months. The la test chips such as the Intel 8008, 8080, National PACE, IMP-16, and Motorola M6800 have spawned a breed of miniature CPU which is so low in cost that it has made the h obby compu ter a practicali ty. The first large quantity production of CPUs usi ng the new series of mi croprocessor ch ips was put out by MITS in January ... their Altair 8800. This sold fo r $439 in ki t form and $621 assembled and tested ... about one tenth the price of previously available mini· computer units. RGS Electronics and Scclbi Compu 1c, Sys tems had been produ cing com puter kits before this using the Intel 8008 chip, but these were not as well pub li cized an d the 8008 chip has more limitati ons t han the 8080, which is use d in th e Al tair. 4

..

,. ,.

,.

,.

' '

,. ,

'

time. You 'd find the record you want one hundred times fas ter. But, alas, memory costs money, and a happy medium has to be struck between wh at you want and what you can afford . You can get along with 4k of memory ... that's actually 4096 bytes, where a byte is 8 bi ts of memory, the amount needed to re prese nt a letter or number. Memo ry costs about 4¢ per byte today, bu t it will be comin g down . Long term memory units have been comi ng down in price too, though it is still possible to buy a brand new Ampex 40 Megabyte disk system for $24,000 if you like to pay list price and ge t into that sort of scene. More in the amateur en d are some of the soon to be seen floppy disk systems which will be selling in the $500 range and which will provide about 250k of memory on each disk. The disks are a lot like phonograph records and can be changed quickly. One of the simplest and least expensive memory systems involves the audio cassette recorder, and many hobby ists seem to be

. ,,,,,

If ... ......

-

__r- ' '

"=.r-1HPUT I

b.

==c>-

ov--IHPVT 2

o v -- INPUTI

~

OUTPUT

1ftPUT2

••=..,.-

··=-i- ==c>INPVTI

d

~0\1

Fl FT H: Consider a "o" at any chip to show the signal is inverted at that point. One digital IC which uses t he "NO R" gate is the 7402 quad 2·input NOR gate. This chip has 4 NOR gates on a single IC. Each gate can be used separately; the sy mbol for the chip is shown in Fig. 21 . The +5 goes to p in 14, ground to pin 7, inputs '.1 and 3 to o ut pu t 1, inp uts 5 and 6 to output 4, etc.

·•v

put

one

input

to

ground and use t he other input. '"OR" Fee d the output of one gate

a second gate

that is connec ted as a "NOT" gate.

~·· OUTPUT

IN PUT 2

One digital IC which uses the "OR" gate is the 7432 quad 2-i nput OR gate. This chip has 4 "OR" gates on one IC. Each gate can be used separately; the layout of the chip is shown in Fig. 1 8.

TOP V IEW

GNO

Fig.18.

As wit h the other ICs that we have looked at, the +5 is to pin 14 and ground is to pin 7. Inputs 1 and 2 go to o utput 3, inputs 4 and 5 go to output 6 , etc. In some circui ts it is d esirable to have the two inputs with the OR f unction, plu s t he sign al inversion of the NOT gate (inverter). It is easy to use the two gates together as sho wn in Fig. 19. •.-nnn ~ ~ _J LJLJL -~

•• Ln.Jl[ov

Fig.19.

The use of the NOT and the OR gate togeth er is also a very common co mbination. The combinati o n is usuall y considered as o ne gate called a NOT-OR gate o r, more commo nl y , a "NOR" gate. The logic sy mbol of a "NOR" gate is shown in Fig. 20.

Fig. 20.

Note tha t the o nl y difference in the sy mbol of a "NOR" gate and the sy m bol of an "OR" gate is that the "NOR" gate has a "o" at the output.

28

Use eac h

"NOT' Connect th e two inputs together, o r you ca n

into

Fig.17.

• 0

'" NO R " gate as i.s.

TOP VIEW

Fig. 21.

Wit h this chip you can have the o peration of a "NOR" gate, the operation of a "NOT " gate (inverter}, the operation of an "OR" gate, and th e ope ration of a "buffer". Fig. 22 shows the connectio ns fo r the d ifferent gates. Two other IC gates that you may run across are: 1} The 4-input "NANO". There is not much difference between a 4-input gate and the 2-input gate that we looked at before. With t he 4-input "NANO" gate, all 4 inputs must be at 5 volts (logic 1} to get 0 volts at th e o utput. If any input is gro und (logic O), the output will stay at 5 volts. See Fig. 23 for the logic sym bol o f the 4 input "NANO". 2) T he 8-input "NANO". With this gate we find that all 8 inputs must be at logic 1 fo r th e output to be at logic 0 (groun d). If any of th e inputs is at ground, the output wi ll stay at logic 1 (5 vol ts). See Fig. 24 for th e logic symbol of the 8-input " NANO" . I have not t ried to show all of the ways that TTL logic can be used or all of the different types of gates that you may see fro m time to time. I have no t included any thing on flip flops, decad e counters, or any of t he more co mplex ICs, most of which wo uld take an article the size of this o ne to discuss fu ll y. What I have tried to do is show some of the fundamenta l logic gates that make up most of the TT L logic circuits. If you have an understanding of the operation o f the "bu ffer", the "in verter" (NOT) gate, the " A ND" gate, the " NOT-AND" (NANO) gate, the " O R" gate and the "NOT-OR" (NOR) gate, you are ready to start building with TTL.

"Buffer " - Feed the output of one gate co nnected as a "NOT" into a second gate connected as a "NOT". Fig. 22.

My suggestion now is to get a 5 volt power supply, and 2 or 3 7400s, and see just what they will do. Then pick a proiect fro m the pages of "73" Magazine, and try it. Don't be too surprised if it wor ks the first

Fig. 23.

Fig. 24.

time the power is turned o n. If it doesn 't, look bac k over the fundamental gate operati o n and I'II bet you find out why in a very few minu tes. Above all , remember "Browning's Ru les of Order":

I. Stay within 4.5 and 5.5 volts. 2. Do not connec/ two outputs together. 3. Connect a resistor in series with any input or output which goes to the 5 volt power supply. 4. Consider a "floating" input as logic 7. 5. Consider a "o" at any chip to show that the signal is inverted at that point. . .. WB5 1RY

Wayne L edder Wl EWL 8 Overlook Drive Med way M A 02053

The Ins and Outs of TTL T

he design of digital c ircuits using TIL integrated ci rcuits can be much less fr ustrating if some simple rules are followed. I am referring to the rules t hat d ictate how a nd why interco n n ec t ions between t he var ious circuits a nd the o ut side world are made. If you fo l low the rul es, yo u shou ld

be able to put toget her a digital circuit fro m TIL ICs and onl y have to wor ry about wiring errors, logic goofs, a nd bad ICs. The infor mation is fro m the manufacturers' lit era tur e an d m y ow n experiences on t he bench. Ins The most co mm on a nd

most eas il y overlooked inp ut of TTL circuits is the power sup ply. One loo k at a ny TIL circuit a nd you q uickly know the value of t he supply voltage is +5 V. For those who worry about such things, the tolera nce is ±5% (mi litary versio ns are ±10%). In other wo rds , the manufacturer o nl y guarantees proper o peration

I1

1......----lI

11

GRID OF NO.IS WI RE (BOTTOM 11 SIDE) FOR 1 GROUND -i"" I

1

iiI

G RID OF NO IB WIR E (TOP SIDE) FOR + 5V

~~~~~7,96-~TIC 1-~---i._____J GROU N D TERM I NA L

Fig. 1. !flustrati on of rules for power supply connections.

of his ICs when the suppl y voltage is bet wee n +4 .75 V a nd 5.25 Y. This is not to say they wo n't wor k at o ther voltages - o nly that t here is no guarantee. When TIL circuits switch they generate very high freque ncy current sp ikes o n t he power s upply lines. These c urr e n t sp ik es t raveling t hrough t he high freq uency impeda nces of the power sup ply lines cause vo ltage spikes whi ch can cou ple into other circu its and tri p flip fl ops, cloc k counters , and do all sorts of nasty (and very d ifficul t t o find) things. To protect yourself fr o m thi s proble m these power connection ru les shoul d be fo llowed: 1. Connect a .01 uF disc capacitor from t he +5 co nnectio n to the ground co nnectio n of each IC. Locate t he ca pac itor as cl ose as is practi cal and use short leads. A min iature d isc wit h a voltage rating of 10 volt s or more is a good cho ice. 2. Use fairl y heavy wire (I reco mme nd # 18 or larger) for +5 and ground lines and 29

+5

+5 4K

INPUT

INPUT I -~-J INPUT 2 -+__,.,__,

Fig. 2. Standard TTL input circuit.

Fig. 3. Input 2-input gate.

circuit of

Fig. 4. Using a normal switch to drive TTL.

arrange them so there are many connections. Try to simulate aground plane and a +5 plane.

negative pulses on the input t hat may occur due to transmission line effects on lo ng interconnections. This input characteristic is called 1 unit load (UL) and a circuit such as Fig. 2 which contains 1 UL is said to have a fan-in of 1.

themselves very nicely, but the outside world is not necessarily TTL compatib le. How do you satisfy the input requirements outlined above? It is very easy to get a voltage less than .8 V and able to sink 1.6 mA: Just short the input to ground with a switch. What about the other limit? How do we get t he high voltage and current source? Fig. 4 sho ws one way. T he 1 k resistor guarantees that even with 40 uA bei ng drawn , t he voltage will be above t he requi red 2 V minimum .

3. For every 20 !Cs or so in your circuit put in one electrolytic capacitor from +5 to ground. Any value between approximately 4 and 25 uF and 10 volts or more rating is OK. If only one is used, try to locate it where the +5 first comes onto the board. If more are used, distribute them more or less evenly over the board. 4. Use a regulated supply for the +5 V. There are many circuits for making a regulated supp ly. Look at a lmost any article using ICs and pick one that suits your requirements. Some of the above rules may seem obviou s while others are not so well known, especially to the newcomer. Fig. 1 illustrates one method of construction e mploying point to point wiring following the above rules. Next on the Iist of TTL " in s" let's inv estigate a typical input circuit as shown in Fig. 2. In order to guara ntee t hat the transistor is turned on we must do two things. First , we must ma ke th e inp ut voltage less than .8 V, and second we must draw out of the e mitter 1.6 mA of current. In order to guarantee that the trans istor is turned off we must a lso do two things. First, we must make the inpu t vol tage greater tha n 2 V, and second we may have to supply up to 40 uA of leakage current. The diode is not necessaril y present in all circuits. Its purpose is to li mit 30

If a second em itter is added to the circuit of Fig. 2 we have a 2-input gate configur ation, as shown in Fig. 3. Each input has its own protection diode. If either input satisfies the "on" requirements t he transistor will be on. Obviously, both inputs must satisfy the "off" requirements in order to turn the transistor off. By addi ng more emitters the manufacturers make multiple input gates. The 7430, for instance, has 8 emitters. What about the undefined area of the input characteristic which lies between .8 V and 2 V? It is just that, undefined. This is a "grey area" where nothing is guarant eed and, except for some special circuits (discussed later), it sho uld be passed through as quickly as possible (less than 200 ns). If t he input passes through this region too slowly the output can act ually break into osci llation. In fact, this is how a TTL osci llator gets started: by being biased deliberately into this "grey area" unt il osci llation occurs a nd then having the frequency of oscillation control led by externa l compone nts. Inputs from the Outside World TT L circ uits connect t o

When the input is relatively slow in changing you can avoid the "grey area" problem by usi ng TTL ICs which have a spec ia l hysteresis bu ilt into t hem. These are called Schmitt triggers and have different switching points depending on whether the signal is positive or negative going at t he time. The 7413, 7414, and 74132 a re examples of th is Schmitt tr igger type of circu it. When considering switches as t he connection to the outside world another potential problem arises. The contacts of the switch don't close "cl eanly." They actually hit and bounce apart one or

more times before remaining closed. Norma lly this is no problem, but if you were attempting to count switch closures it wou ld not be possib le. Fig. 5 shows how to use an SPOT switch and two NAN O gate ele ments to form a flip flop which debounces t he switch. Th is is a very common form of circuit confi gu ratio n called crosscoupled NANO gates. O f ten when you a re fini shed with a logic design yo u will find yourself with unused inpu ts to some circuits. Never, repeat, never leave any unused input to float; it will cause nothing but trouble. Even though an open input is theoretically the same as a high, in practice it is ve ry sensitive to any kind of noise and can cause the output to change for no apparent reason. What do you do with unused inputs? There are several choices: 1. If it will not prevent normal operation of t he circui t you can ground the unused input or connect it to a high source. 1 a. Th e h igh ca n be obtained by connecti ng direct ly to +5 V. The manufa ct urers don't recommend th is since, if the input goes above +5.5 V, it is possible to dam age t he input if t he c urrent is not limited in some way. I do it all the t ime with no prob lems (yet). I reco mmend connect ing to t he +5 V con nection on the ch ip itself. 1 b. Connect the u nused in put to +5 V

+5

T H IS IS HIGH FOR SWITCH POSIT ION SHOWN T HIS IS LOW FOR SWITCH POSITION SHOWN

Fig. 5. Using cross-coupled NAND gates to debounce a switch.

INPUT CLOCK

_ __

___.n~----1

OU TPUT OF EDGE I TRI GGERE D - - - - - +I ' F LIP ·FLOP

- I I+

OUTPUT OF MASTER· SLAVE FLIP· FLOP

1 I I 1

I

I I I PROPAGAT ION I DELAY

j

--t I

+5

9on

TOP TRANSI STOR

1. . . . - - - - I

-----'-t--"""'

M ASTE R CHA NGE S HE RE

Fig. 6. Timing diagram showing difference between edge-triggered and master-slave flip flops.

through a 1 k resistor. One resistor can tie as many as 50 inpu ts to +5 v. 1c. Use an unused inverting ele ment a nd ground the input (s) to force t he ou t put hi gh. This h igh o utput can t hen be used to pull up as many inputs as its fa n-out is rated {see outpu t section). 2. Unused inputs of gates can be connected in parallel with used inputs. T here is no increase in loa d for low inputs. The total cu rrent requ ired for t he two inp uts in parallel is still 1.6 mA. Actually you can t ie as many in para Ilei as you wish a nd the total low fan-in wi ll not excee d 1 UL. T he h igh fa n-in does increase, however, as each emitter may requi re the 40 uA leakage current. As long as t he high fan-out capability of the driving circuit is not exceeded you can parall el gate inpu ts. On e more input characteristic of TTL ci rcuits is worth menti o ning. This is the difference between so-cal led edge-triggered and mast erslave flip flops. The outputs of both circu its react according to t he status of the co ntrol lines at the t ime the clock pul se occurs. An edgetriggered flip flop o utput re ac ts essent ially immediately. The small delay is call ed pro pagation delay. A master-sla ve flip fl op is more subtle. On the leading edge of the cloc k p ulse the master reacts like an edge-triggered flip fl op. The outpu t, however, is from the slave and it does not react unti l the

trailing edge of the cl ock pulse. Fig. 6 shows th is difference in graphi c form. The main point to remember is that a master-slave fl ip fl op requires a comp lete clock cyc le, no t just one edge. Outs T h ere are t hree basic forms of o utput circu it used in TTL. Th e most commo n fo rm is shown in Fig. 7. This is the so-called totem po le configuration. In the low output state the bottom transistor is o n and th e top transistor is off. The bo ttom transistor sinks the current fro m the cor)nected inputs. In the high state the bottom transistor is off and the top t ransistor is on. T he top transistor now su pplies t he leakage currents for the co nnected inputs. This is the nor ma l version. There are mi nor var iations o n this circuit but they all operate the same way. The number o f unit loa ds a n outpu t can drive is cal led its fan-out. The sta ndard TTL IC has a low fan-out of 10 UL and a high fan-ou t of 20 UL. In other words, a standard TTL out pu t can sin k 16 mA (10 t imes 1 .6 mA) and the output is guaranteed to be no higher than .4 V or it can source 800 uA {20 tim es 40 uA) and the out put is guara nteed to be high er than 2.4 V. If you co mpare these o ut pu t specs wi th the input specs you will fi nd t here is a .4 V safety margin. Th e re are several ICs wh ich are specifi cally designed to drive large r loads. The 7437, 7438, 7439 a nd

BOTTOM TRANS IST OR

Fig. 7. Totem pole output cir cuit.

TTL

7440 will all sink 30 UL. The 7437 and 7440 will a lso source 30 UL. The 7438 and 7439 belong to another class of out pu t ci rcuit call ed "open coll ect or. " In t hi s co nfigu ratio n t he top transistor is mi ssing a nd the bare collect or of the bottom transistor is brought o ut. With this circui t you need a n external load resistor of some sort t o provide the pull-up to +5 V. If the voltage rati ng of t he IC output is h igh eno ugh {the 7407 is rat ed for 30 Y, for exampl e), yo u ca n switch much h igher vol tages, a nd even drive relays and la mps if the current rating is not exceeded. The open col lector circui t is also used in a logic co nfiguration known as both "wired-and" and "wired-or." Fig. 8 shows how this works. All t h e o p e n coll ector outputs are ti ed to a common

pul I-up resistor . If any output goes lo w they all go low {wired-or), and the o utput wi ll o nl y be high when a ll t he o ut put t ransistors are o ff {wired-a nd, h e n ce both terms). T here is a practical limit to how many ou tputs you can connect together. Th e pul I-up resistor must s uppl y the leakage curre nt for all inputs and all o utputs when they are all off and still m aintai n t he voltage above 2.4 V. Ho weve r, it must st ill be large eno ugh to lim it t he total c urrent of resistor plus inputs to 16 mA {10 UL) when any o u tpu t is on. Contrary to what you may have read previously, it is OK to con nect TTL ou t puts in paral lel, provided you also connect the inputs in parallel so the ou t pu ts are doing the same thing at t he sa me time. In fact, the manufactur ers recomme nd thi s tech nique as o ne way to increase fa n-out when the load is too much for one ou tput. However, you should restri ct this para lleli ng to elements in th e same package because large transient currents are generat ed and can cause p rob lems if they are not closely confined. The th ird and newest ty pe of outpu t configu ration is the so-call ed tri-sta te or 3-sta te output. This is a normal TTL totem pole outpu t where both transistors can be turned off. An extra "enabl e" input

+5 R RE SISTOR SUPPLIED L EAKAGE CURRENT

--

_.,.._--+__.

N I NPUTS EACH I UL

N UL CUR RENT IF ANY OUTPUT IS L OW

Fig. 8. Using open collector outputs for wired-or configuration. 31

+5 360.0. MINIMUM

OPEN COLLECTOR OUTPUT

Fig. 9. TTL driving transistors.

is added to the circuit and when enabled the output functions as a normal TTL out put. When disabled t he output is essentially disconnected. This allows one common wire with many tri-state out puts connected to it to carry all sorts of different information (even in different directions) on a time division multiplex basis. All you have to do is enable the appropriate outputs and inputs at the proper time. This "bus structure" is very common in the world of computers and microprocessors. I have used tri-state circuits to latch 336 bits of data at one t ime and then output them 8 bits at a time. That is 42 different outputs on each data line. Someplace in your design you have to connect outputs to the outside world. There are special !Cs for driving displays of differen t kinds as this is one of the most common outputs encountered. I have also mentioned using hi gh vol tage ope n col lector outputs. If you need more current or voltage, you can use a circuit such as shown in Fig. 9. In both versions the resistors lim it t he base current to a safe value. When driving an external circuit of any kind it is best to use an

output dedicated to only that load. That way, if any stray signals are picked up and fed back on this line to the outside world they won't be able to couple into another input and d isrupt operation. Also you sho uld never use t he output of a flip flop (this inc ludes cou n te rs, shift registers, etc.) to connect to the outside world . It is too easy for a stray signal to sneak back, get inside the flip fl op, and do weird things. When it becomes necessary to switch large output loads, often there are transients generated that ride back in on the ground and cause stray triggers of flip flops and other nasty things. A relatively new circuit element called an opto-isolator eliminates this problem completely. Even when driving all 8 channels pl us sprocket advance of a h igh speed paper tape punch there is no problem - and that represents 9 A at 24 V every 9 ms. The opto-isolator (see Fig. 10) consists of (\n infrared LED and phototransistor. The LED is driven from an open collector outp ut and its energy is coup led optically (no physical co nnection) to the phototransistor, which is then used as a low level switching stage in a totally electrical ly isolated circuit . The preceding ru les a nd suggestions will not elim inate all your digital logic problems but they will greatly reduce them, especia ll y those frustrating random ones. Remember the manufacturers only guarantee proper operation if you stay with in the specs. Exceed the specs a nd all bets are off. •

+5

16 mA ~x OPEN COLL ECTOR OU TPUT

Fig. 70. Using an opto-iso/ator. 32

I 11"0

EDITORIAL

COMPUTER. PUBLICATIONS Wayne Green W2NSD /1 F red R. Goldstein WA1WDS PCC - People's Computer Com· pany, Box 310, Menlo Park CA 94025. This is a tabloid newspaper bi-monthly ... $5 for six issues, $9 for two years ... ran 32 pages in the latest issue. PCC is a mixture of chitchat, news of computers in the schools, game programs, news of products and services ... emphasis is school computer use . Delightful. PCC has just announced a couple of new publications, TINY BAS IC at three issues for $3, a newsletter on T iny Basic, a new program language for tiny kids so they can w rite games, do math recreations and operate relays and other real time stuff. T he other new publication is a series of booklets on Computers in t he Classroom. Book 1, 60 pages Xeroxed. is $3. Computer Hobbyist, Box 295, Cary NC 27511 . $6 a year. This is an advanced type of newsletter and a major source for info from Hal Chamberlin, one of the leading com· puter hobbyist circu it designers. This is a little heavy for rank beginners . . . a recent issue had a program for generating ra ndom numbers and a cassette recorder interface circuit. Editor Stallings is doing a fi ne job. Computer Notes, MITS, 6328 Linn Ave NE, Albuquerque NM 87108. While this newsletter is designed primarily for Altai r owners, and much of it is far beyond the beginner to comprehend, it is a very wel l done and interesting publication. Costs $30 per year. Creative Computing, Box 789, Morristown NJ 0 7 960 . . . $8/ yr. Bi-monthly. Heavy on games, co m· plete with programs for them ... heavy on school use o f computers. Micro-8 Newsletter, Cabrillo Com· puter Center, 4350 Constellation Road, Lompoc CA 93436. $6/6 issues. Aimed at the hobbyist, particu· larly the hardware enthusiast and the 8008 user. Ti ny type and an enor· mous amount of info in each issue ... sources of info, parts, equipment, names and addresses of o ther hobbyists. Circui ts of interest. First rate source. Microcomputer Dictionary and Guide. Matrix, Champaign IL 61820; $ 15.95 postpaid. Also available from Radio Bookshop, Peterborough NH 03458. It's a whopper . .. well over 700 pages . .. and the price is right at $15.95. The term "dictionary" is not qu ite accurate .. . this is more like what you might expect in an encyclo·

pedia. The definitions o f computer terms are not brief; they are almost enough for you to learn about com· puters just from reading the book. In a field where there is a com· pletely new lexicon, where it is almost impossible to read articles in com· puter magazines or newsletters with· out an interpreter, where you can't even understand the computer fo lk w hen you try and talk with them, a dictionary such as this is invaluable. It is an unfortunate fact that virtua l ly everyone who is deeply involved with computers and has learned the new language also seems to have forgotten English. Computer folk are unable, to a man (it would seem). to writ e in English or even to talk it . They no longer talk with people, they interface. Without a lot of reading of 13 articles (many of which are not even written yet) you will be plain high and dry trying to fathom what these strange folk are trying to say in their weird new language. My Computer Likes Me (when I speak in BASIC) by Bob Albrecht. Dymax, Box 310, Menlo Park CA; 64 pp., $2.00. BASIC IA Self-Teaching Guide) by Robert L. Albrecht, LeRoy Finkel, and J erald R. Brown. Wiley, New York; 324 pp., $3.95.

The most popular computer language for both small systems and t ime-sharing is BASIC. It is a powerful language, yet easy to learn, and is fast being adopted as the standard language for hobby computer program exchange. The computer novice who pu rchases a microcomputer will probably want to obtain a BAS IC operating system for his computer, as it speeds up programming immensely. These two textbooks are very d ifferent in scope and approach, though both are authored by Bob Albrecht of the People's Computer Company. My Computer Likes Me is written as a simpli fied approach for rank beginners, and seems aimed at the secondary school user with a classroom ter minal. The approach is friendly, informal and light, with plenty of examp les to show every step of the way . Only the fu ndamenta ls of BAS IC are covered, with a demonstra· t ion of mathematical modeling to predict population. For a student wi th an innate fea r of the computer and what it takes to understand one, this sim ple text is p erfect to brea k down that first barrier. Continued on page 43

T

he purpose of this article is not only to teach the basics of flip flops, but also to help the h am bui lder understand t he circuits which he sees every day in magazines and construction project books. All of us try to follow the bui lder's explanation of operation but may fall short of fu ll understanding due to ignorance in certain shorthand notations or unfamiliar phrases such as "the flip flop is now set," or " it ope rates in a m aster-s lave con figuration ," or more common, "the device will be allowed to toggle." We decide to skip the explanation and build it anyway. It works, but we miss t he joy of kno wing how it works. Hopefull y, these intermitt ent knowledge gaps now can be filled once and for all. The fli p flop has an amazing talent: a memory . This may not seem like much to you, but for a chunk of silicon it 's quite an accomplishment. This memory is the basis of all computers and cou n ters. After all, what is cou n ting but remembering what you had last? And the beauty of learning about flip flops is that there is no new backgroun d material with which to grapple. All that is need ed is an understandin g of the TTL p rimer in th e July issue. Take a minute an d review the four basic gates and t he action of the clocki ng input. There are fou r basic types of flip flops. They are the R-S, O,T and J-K. All have two stable states, either 0 or 1 . Th is is known as bistable. Sometimes flip flops are referred to as bis table mu ltivibrators. Another nam e

you migh t have seen is bistab le latc h. Th ey are all the same thing, a form of the flip flop . R-S Type Fig. 1 sho ws the simple R-S flip flop or latch . The S means SET and the R means RESET. Other terms used are PRESET a nd CLEAR, respectively. By conve ntion, the outputs Q and Q cannot be equ al. In fact, the bar over any letter means "not". Q is called " not Q". To show t he action, let's assume that Q = 1 and Q = 0. Because of the feedback loops

::

~

combines with th e S = 1 input to make a 0 outpu t a t Q. This 0 feeds bac k to the input at B, as seen in Fig. 2(b). Whew! But look what happened! Our o u tpu ts are reversed! Even if we return R to its initial state of 1, the output will still remain, as we see in Fig. 2(c). SI 10

::

Fig. 1. R-S flip flop.

t he B input is 1 and the A input is 0 . For the initial state in the NANO fli p flop (NO R gates can also be used) Rand Sare always 1. So we have the in itial co ndi tion, as shown in Fig. 2(a). If you recall t he NANO truth table, on ly inpu ts of 1,1 yield O; all other combinatio ns give 1 . If we drive R to 0 the fo ll owi ng chain takes place. The R input of 0 combines with the 1 input at B to make the output at Q = 1. This 1 feeds back to the A input and

IQ RI

Fig. 2(c). Outputs reverse and stay, even though R

is returned to J .

flip flops Exposed

Larry K ahaner WB2HEL 4259 Bedford Avenue Brooklyn NY 11229

3J

That momentary driving of R to 0 could be a push-button or a clock pulse. Now if we take our fin al condition of 2(c) and impress S to 0, the outputs wi ll flip around again. And they will stay, even if S is re turned Lo 1 . See Figs. 2(d) and 2(e) . The name flip Oop is thus shown to be qu ite appropria te. A flip flop is sa id Lo be in the SET condition if Lhe Q output is 1. The RESET conditi on ex ists if the Q is 1. Fig. 2(a) is a SET state and 2(c) is a RESET condition. The rule: If a flip flop is SET, driving RESET to 0 will change the output. If it is RESET, driving SET to 0 will change th e output. The symmetry is beautiful. If it's SET, reset it. If it 's RESET, set it. Bu t what happens if both R and S are impressed to O? Well, that is the problem with the R-S latch. The ans wer is ambiguous. Since you never know which 0 came first, the outpu t is unpredictable. Try it, and you 'll see the fun.

SI

0

1 -1721400- - 1 o-o----T"" l --i I

I I I

I I -"-----'1- - - - - i

I I I I I

o

I

L _ _ _ __ _J

Fig. 3( b). Flip flop showi ng ch ip it came from.

~--- ____!I.,

same (causing a n unpre dic table output). the best we can do is to insure that we don't have the same inputs at t he same time. In Fi g. 6 the inverter (E) negates all inputs; 0 becomes 1 and 1 becomes 0. We employ it to feed the B input. By placing it there wh ile feed ing it and A from the same input, we can be certain that the signals reach ing the gates will be different. Any signal going to A will remain the same and those passing through the inverter to B wi ll change. The D type can also have PRESET and CLEAR controls. They are superior or overri ding func ti ons. No matter what is go ing o n, commands on these controls have priority. When either of these in puts is present (0). the ou tput will go to 0 or 1 depending upon wh ich fun c tion is emp loyed. In schematic diagrams, the lette r "D" is the only indicati on of the fli p flop type.

0

-'Fig. 3(c). 7400 wired in R-S latch configuration.

0 10 RI

-,-Fig. 2(d). S goes to 0 and o u tpu Is reverse .

SI I

0

0

0

Fig. 2(e). Ou1p u1s s1ay reversed, even if S is rew rned 10 1.

A sc hema ti c di,1gra m of a flip flop may show the ac tu al ga tes or it may show a confi gura tio n such as Fig. 3(a). A person al favorite is shown in Fig. 3(b).

Fig. 3(a). R-S flip flop.

Either w - - - -- - - - - < : > - --

BIT OUT

CONTROL

Fig. 9. A dynamic MOS RAM cell stores data in the gate-source capacitance of one of its transistors.

once. After th is entry, a ROM the prese nce or absence of a always produ ces t he same diode deter mines t he logic output when addressed. state of a particular locatio n; The difference between such a network is shown in the read/write RAM and the Fig. 11 . The row address ROM can perhaps be best decoder raises the voltage on illustrated with t he example the appro priate word line to a of the pocket calculator. In high posi tive level, for wardalmost al l calculator designs, biasing the d iodes attached to a RAM matrix serves as a t hat line. When the diodes "working," or data, memory begin conducting, they for ce and ROMs are used for thei r associated bit lines to a in put/output inter face-, high (logic 1} level, whi le bit timi ng control and program li nes not connected to diodes remain low (logic 0). Output storage (see Fig. 10) . Each key o n the calculator amplifiers sense t he state of keyboard is ident ified by a each li ne and present the bits unique binary numbe r; all of to the data processor's other th ese numbers are per- ci rcuitry. manently fi xed in t he ROM For example, if the row encoder so that, when a key address decoder raises t he is pressed, the corres po nding word line 1 level, diodes 01 , bi nary number appears as the 02, and 03 cond uc t, raising encoder output. If a digit key bit lines 1, 2 and 4 . In t his is pressed, the bits co mprisi ng case , the mat rix ou tpu t

KEYBOARD

ROM INPUT ENCODER

ROM OUTPUT

DECODER

ROM PROGRAM STORE

Fig. 70. A pocket calculator typically utilizes both RAM and ROM facilities to process input data. the number are written in to the RAM data store. Function key (add iti on, su btract ion , e tc.) numbers are applied to th e ROM program store as addresses. In the program store are contai ned instructio ns for each functio n; when an address is presented, the proper i nstru ctio ns are read out of the ROM, leading to perfo rmance of t he desired operati on upon the da ta held in the RAM. When the function has been completed, the result is read o ut and applied to t he decoder, whi ch puts it into a for m suitab le for disp lay. The basic ROM structure is a matri x of elements, each of which is accessed by a random address code, allowing ap p roximately equal access ti me to all bits. The simplest ROM structure is a netwo rk of diodes wherein

wou ld be th e binary number 1101. The next address might raise word line 4, in whi ch case t he ou tput would be 0110. In some applications, colu mn (bit line) addressing is added to select fewer than t he maxim um possible bit outputs. ROM matrices are also for med with bi polar and MOS devices. In the most common configurations, the presence or absence of conductors establishes logic states. Fig. 12 shows a ROM matrix ut ilizi ng mu ltipleemi tter bipo lar transistors. In t his case, the collectors are used as row enabling contacts, replacing the word lines, and emitter contacts are omitted from selected locations to set logic levels. When the row address decoder raises the voltage on the appropriate collector to a 41

ROW ADDRESS DECODER ADDRESS

SIT LINE I

BIT LINE 2

BIT LI NE J

BIT LIN E 4

Fig. 7 7. A diode network with random access addressing is the simplest type of semiconductor ROM. sufficie nt ly hi gh level, the tr a nsist or segm ents with emi tter co ntacts beg in co nducting: for example, if Q2 is se lected, the matrix o utput is 1001 (the level of columns 1 a nd 4 raised by cond uction, 2 and 3 remaining low). In Fig. 12, co lumn address and data outpu t decoding selects two of t he four bits for application to t he processor. In Fig. 13, a ROM matrix compo sed of static MOS FET devices is shown. Logic states are d ete rmined by t he presence or absen ce of gates v1ithin the transistor structures. Reading this m emory is acco mpli she d in th e same manner as di ode and bipolar ROMs, exce pt that the bit lines are driven low (to grou nd) when the FETs conduct.

however, in which standard memories are not availa ble to meet application requirem ents , so programmab le ROM (PROM) matrices are also prod uced. A PROM is essentiall y a semiconductor matrix which has its program written in to it at some time other than the manufacturing process. The manu fact urer provides a chip o n which all of the rows and columns (word and bi t lines) are linked by conducting d evices. Before integrating the chip into a circuit, the purchaser of t he PROM uses various techniques - from application of a h igh-level write current to a laser beam - to eliminate devices from t he matrix. In this way, a st ored program unique t o a given application can be produ ced.

Programmable ROMs Semiconductor memo ries are almost universal ly formed o n minute sil icon chips capable of holding large numbers of integrated circuit devices; the chips often conta in complete addressing, decoding, and outpu t circuitry in additio n to the m emory eel Is. In the formatio n of standard ROM matrices - in whi ch the stored data is never to be changed - logic states are estab lished during the m a nufacturing process by omi tting the proper elements to create the des ired bit pattern. Th is is th e most prevalent type of read o nly memory. The re are cases,

New Developments Thi s di sc ussi o n h as covered structures that are r e presentative of devices currently used in data processi ng me mory facil ities, a nd has not attempted to consi der a ll of the variat ions of the basic structures. Advances are being made at a remarkabl e rate , and today 's technology may be totally obsolete in a few years. Among the new memory dev ices that may bring t his about are charge co u p led d ev ices (CC Ds), bucket bri g ade d ev ices (BB D s) and m ag n e t ic bubbles. Charge coupled and bucker briga de d evices are simil ar in that both store

42

digits as the presence or absence of electric charge. A basic CCD is a semiconductor chip - either n- or p-type over which a dielectric material is laid. A series of gate contacts are placed a long t he d ielectr ic. Charge is stored as minor ity carr iers u nd er t he gate region s. When the substrate is p·type, for examp le, ap plyi ng a positive voltage to o ne gate attracts electrons out of th e substrate until they dominate in the area directly beneath t he gate, fo rming a "potential we ll." This storage condi t ion is maintained for ti mes up to several second s af ter the gate voltage is redu ced. Rai sing potential on the next gate in the series forms a second potential well into which the s tor ed charge is transferred; gate potentials are sequentially raised by a clocked voltage to move the stored bi t t hrough the device. T he CCD is t hus a sequentially accessed memory facil ity similar to the shift register. The' movement of charge in a bu cket brigade device is the same as in th e CCD. Potent ial wells, however, are rep laced by "buckets" of material unlike the subs trate; for example, n-type areas may be e mbedded beneath the gates in a p-type ch ip to act as MOS storage capacitors. Fabrication techn iques c urrentl y limit the producti on of CCDs and BBDs, but t hey hold the promise of extremely small, very fast, low power memories of high

density, and man y manufacturers are investigating thei r commercial feasib ility. Mag ne t ic bubble technology is sti ll in the developmental stage, but it also shows great promise. The bu bbles, wh ich are tin y, m o bi le pa r t i c les whose polarity is opposit e to that of th e t hin fi lm containing them, can be arranged to form coded data patterns, th us providing a storage med ium. Conventio na l bipolar and MOS devices are be ing modified to ach ieve an opti mum combination of memory cell size, speed and power cons u mpt io n. N-channel a nd p-cha nnel MOS FETs are bei ng combined o n one ch ip as co mpl e mentary MOS ( CMOS) devices for low pow e r app li cations, and Schottky diodes are being intro duced into various bip ola r configurations to decrease power consumption and increase speed. One such mo dification has resulted in t he low power Schottky TTL memory cell, which has access speed approachi ng that of ECL (the fastest presently availab le cel l ty pe) and power requ irements close to those of MOS FETs; GTE Lenkurt uses this family of devices in its 262A and 2628 data sets to ach ieve the most rap id data processing possibl e with the least power. In anot her d evelop ment, metal-nitride oxi de semiconductors are being looked at as possibl e non-vo latile read/write RAMs (memor y faci lities which

• VC

•VC

ROW

ADDRE SS

ADDRESS DECODER

COLUMN ADDR ESS 8 DATA OUTPUT DECODER CATA BI T OUT

DATA SIT OUT

Fig. 72. Bipolar read only memory matrix.

~EDITORIAL

BIAS POWER SUPPLY

ROW

AOORESS

R OW

ADDRESS DECODER

BIT L.INE I

BIT LINE 2

BIT U NE 3

BIT

U NE4

Fig. 73. The logic states within a static MOS RAM are determined by the presence or absence of gate contacts. would not lose stored data wh en power is re moved). Wh eth er improve ments to exist ing structures c ontinu e at t he present rate, or new tec hno logies take over completely, t here is no do ub t that sem iconduct ors will play an increasingly important role in data processing systems. • Bibliography 1 . Altman , L. "Se m icon ductor Ra n dom-Acce ss Mem o ries," Elect ron ics, Vo l. 47 , No .1 2 (J u ne 13, 1 974 ), 108-110. 2. Carr, W . a n d J. Mize. MOS/ L SI D esign and A pplicatio n. New York: McGraw-Hill Book Co., 197 2.

1/0 Editorial From page 32 BASIC IA Self-Teaching Guide) takes a more sober approach and goes much fa rt her. Programmed teaching, with step-by-st ep qu estioning of the student, punctuates the text into individual concepts, none of which intimidate the student the way a less cautious text can. After explaining input and output, arithmetic, and simple logical statements, the more sophisticated capabilities of BASIC, such as matrix arith metic and string (character) operat ions, are cautiously introduced. After complet ing t he text, the student should feel competent to han dle most problems that can be solved with BASIC and a small com· puter. No text in programming is really complete without a compute r to practice on, and t h e versions of BASIC that different manufacturers supply are not a ll identical to any textbook. But no manufacturer's reference book takes the time to start a new programmer off on the right track without major con fus ion unless perhaps he's a genius. For a t im id user, My Computer Likes Me would be ideal as an appetizer, but BASIC (A Self-Teaching Guide) provides a main course for the hungry learner.

3. Ei m b in der, J., ed. Semiconduc t or Memories. New York : Wiley- lnterscienc e, 197 1 . 4 . F ra n kenbe rg , R . " Designer's Gu id e to: S emi co n ductor Memories - Part 2 ," EON, Vo l. 20, No. 1 5 (August 20, 1 9 7 5 ), 58-65. 5. Kroeger , J. a nd B. Threewitt. "Review t h e Basics of MOS logic," Electronic Design, Vol. 22, No. 6 (March 1 5, 1974 ), 98-1 0 5. 6 . Luecke, G. et. al. Sem iconductor Memory D esign and A pp lication. Ne w York: McGraw- Hill Book Co., 1 973. 7 . O rl icky, J. The Successf ul Computer System. New Yo rk. McG raw-Hill Boo k Co., 1 969. 8. Reference D ata Fo r Radio Engineers. Hovvard W. Sams & Co., 1968.

What to Do After You Hit Return (or, PCC's First Book of Computer Games). People's Computer Company, Menlo Park CA; 158 pp . Computers are fant astic toys, and the best thing about them is that they can be made to do so many different things, so you never really get bored. Especially with this b ook, w h ich includes fifty different games you can play on a computer that speaks BASIC. T hese were developed on the Hewlett-Packard 2000 minicomputer system, and the programs were all tested by H-P personnel. Many have been circulati ng for years; some are qu ite recen t. There are number games, word games, pattern games, board games, simulations, and even scien ce fiction games. Nim, Lunar Lander, Star Trek, Madlib, Bagels, an d most other popu· lar computer games are included. Rules are explained, sample runs a re shown, and in most cases, program list ings are included (in BASIC) . Most can be played without a computer if you're so inclined, but the hardware is half the fun, right? What to Do A f ter You Hit Return is big and attractively put t ogether on giant pages t hat stay open on the table. It's the software equivalent of a barrel of monkeys. See why most colleges find that most of their com· puter time is spent playing games!

WANT TO MAKE A BUNDLE ? Not to be a name dropper, but sure as God made Yellow T ran sparent app les (to me t he finest apples in the wor ld) someone may make a for t une by coming u p with a smal l computer system for sma ll business and home use ... if he plays his cards righ t. Best of all, nothing further has to be invent ed to make t his a reality ... some of the pieces have o n ly to be put together. Since a small black and white televis ion set retai ls fo r around $85, a keyboa rd fo r $30, a microcomputer ch ip fo r $20, a cassette recorder for $20, how much could a small computer syst em cost embodying these element s? Oh, you'd need a display generat or for t he T V, an interface for t he cassette, and some wor king memory. I'll bet someone could put such a contraption on the m arket for under $ 1000 in six months ... and t he price would be down to half that in six more ... and event ually down to maybe $250 . . . o r $ 125. T he prices go down a lot when chips come available to hand le each function ... and eventually the whole works. T hey're al ready starting to put RAM memory on CPU chips . .. and 1/0 interfaces too. Add a small built· in ROM operating system and a TV d isplay generator . . . and the price plum mets fo r a complete small com· p uter system. Do yo u want to wait for someone else to get int o the busin ess or start working on it yo u rself? Here's a way for someo ne to in vest some time and mon ey in a. project whi ch could b e wort h m illions in a cou p le of years. MI TS had about 15 people when t hey entered the uP business .. . now look at 'em! HAM COMPUTI NG Most of us can think of a lot of good th ings we might do if we had a computer . . . li ke keep track of statio ns contact ed along with some details about them . . . mainta ining an index to ham magazine articles t hat we might want to look up ... deter· mini ng Oscar intercept times and bearings ... running all the functions of a repeater . . . playing any of the hundred or so popular computer games ... getting into computer art forms with a color television set ... experimenting with computer music . .. keep ing t rack of repeater channels and locations ... Morse code conver· s io n . . . RTTY operation . .. things like that. But t he next 'question is a tough o ne ... what hardware will it take to get involved in my interest ... and, even more difficult, what programs . . . and where can I either get t he

programs or get the t raining so I can deve!op my own programs? Frank ly, we could use a lot of input on bot h hard and software. Let's see some articles on this . . . showi ng configurations of available gear wh ich will do ham and hobby jobs. If we look at the Sphere equipment we see that for most ham applications we wi ll need t heir "200" system, their " B" package and BASIC on cassette. T h is comes to $B60 for the "~00." $20 5 for t he extra 4K RAM memory and charact er generator ROM of package " B" an d $ 100 fo r BASIC o n a cassette . . . to ta I $1 165 for the hardware. Now, if you buy the BAS IC textbook by Albrecht ($4). you wi ll be ready to go with almost a ny program you want, doing your own programming. T he DEC 101 Games in BASIC ($7) will launch you into t he game biz. You will need a television set for th e d isplay. The Sphere system will give you the computer, a character generator so yo u can read ou t the input and output of the system on a te lev ision set, a keyboard for inputting, BAS IC pro· gramming language which takes about 5K o f RAM memory, leaving about 3K for your use, a nd an 1/0 for a cassette reco rde r fo r use in entering programs, storing programs for later use, and storing data in long-term memory. T hat's a fa irly complete small system. If you want to go the MITS route you'll need an Altair 680 ($420). 12K of RAM memory 1$825). an 1/0 port t o int erface t he 6BO wit h a video d isplay terminal 1$144), BAS IC language on cassette ($75). cassette interface 1/0 p ort ($1 44). plus some sort of video generator and keyboard unit such as the Southwest Tech kit which runs about. $282 (and then you have to build it .. . which is fun) . T he cost of this system would appear t o come to around $1 B90. If you want to go the Altair 8BOO route . . and Ed Roberts points ou t in the Altair Comp ut ernotes publication t hat t he 8080 chip is substantially better in his estimation than the 6800 chip ... t h is would increase the cost even more. The Altair 8800 computer is $62 1, expander boards are $93, a cooling fa n is $20 , three 4K RAM boards are $825, t he cassette 1/0 is $174, the television typewriter 1/ 0 is $144 and BASIC language on cassette is $75, p lus the $282 for the TVT kit comes to $2234. T o do any work involving data yo u want to keep on file you will need a couple more cassette control systems so you can use one cassett e for yo ur data base, a second for any update to the dat a base, and a third for the Continued on page 47

43

John A. Lehman WB8TUR

716 Hutchins #2 Ann Arbor MI 48103

Computer Languages-Simplified A

nyone who wants to use a co mpute r has to have a way to communicate with it. Th is article is a si mple int roduction to some of the la nguages which are used for that purpose. It is inte nded for rank beginners, so all of the programmers, software freaks and computer hot dogs in the audience might as well stop here. For anyone else, I'm going to try to keep everything in English (wh ich is not a co mputer language, unfortunately) and avoid as much computerese as possible. So here goes. One might start by as king, "Why have computer la nguages at all?" Back in the dark ages 25 or 30 years ago t hey didn't - the machines we re wired up to do a certa in thing and that's wh at they did. But, somewhere along the road, some bright fellow realized that it would be much more efficient if you could feed the machine a fairly lo ng set of instruc ti ons and let it fol low them. T his also mad e fo r mu ch greater flexibility, since you could give t he m achin e differe nt sets of instructio ns. These instruc t io ns are wha t a computer la nguage commu nicates, and this art icle will go over some of the more co mmon ones, to wit: Assembler, BAS IC, FORTR A N, PL/l, COBO L and a little bit about some of t he mo re specialized ones. But f irst let's look a li ttle bit more at the nature 44

of the beast we ' re dealing with. It is helpful to th in k of a compu ter as a glorified electron ic calcu lator. In fact, some of the more mode rn calcu lators reall y a re computers. But let ' s look at the average four function calculator. It has a display, which is called an output devi ce in computerese, and it has a keyboard, wh ich is an input device. To do anything with it, you ha ve to enter the numbers thro ugh the keyboard and then enter what you want don e with them, be it to add the m or whatever.

machine which get done without your stand ing there pushing all of the buttons each t ime. But now we have to get this set of instructions inside the machi ne, and that is wh ere p r og r am m i ng languages come in . We need a way to co mmu nicate t he instructions to the mach ine. In the case of a calcul ator, this isn't mu ch of a problem. The "Instruction Set" (list of all of the instructions whi ch the machine is able to fo llow) is hard-wired in. If you want it to add, you push +. T his is obvious ly not too good an idea for a large computer, since the numb er of buttons

Machine language is the closest we can get to what the machine actually speaks.

But su ppose you want to do a mortgage calculation - say, figure out what yo ur interest payments and principa l payme nts are go ing to be each month for t he life of the 20 year mortgage. Thi s m ea ns that you're goi ng to have to do a: very repetitive calculation 240 times. It is to avoid this sort of hassle that real computers (and so me fa ncy ca lcul ato r s) have stored program ca pacity - a stored program being nothing but a se t of instructi o ns in sid e th e

gets pretty large . Besides, you tend to run out o f symbo ls, which makes everything even more confus ing. So we need som e sort of language. The simplest one is cal led "machine la nguage" and is the closest we can get to what t he machine actuall y spea ks. However, as any of you who h ave been follo wing the art icles in 73 about gates and such know, computers and othe r digital machines run on high and low levels of voltage. Since thi s is rather hard to

see, we usuall y represent it with o nes and zeros, or o n a nd off lights . The whole thing is like t rying to communicate using RTTY but d o ing it by ear instea d of with a TTY mach ine, which is to say tha t it's a roya l pai n. Anyone w ho's into interpreting th ings Iike 01001101 01 100001 an d so fo rth can really get off o n it, but for most of us there's gotta be a better way. Fortunately there is. Incide nta ll y, if you ever get a microco mpu ter, those switches and lights on t he front panel are used to co mmuni cate with the thing in mach ine language_ The next sort of language developed, a nd the one which is most widely avai l~ le for microprocessors these days, is the assembl er. Each type of computer has its own version; what it is, in short, is mach ine Ievel logic bu t using sym bo ls a nd normal numbers rather than o nes a nd zilches. Assemble r is related to what you do with a calculator - in fact, any of you who own or use HP calculators have been us ing a version of assemb ler la nguage usually known as Reverse Polish Notation. With an assemble r language, you specify what number yo u want, where you want it pu t a nd what you want done with it; for example {to use HP asse mbler): " 12, ENTER

[which puts it in the region where the arithmetic is done ]. 2, x" multi pli es 12 times 2 and comes up w ith

24. Al l assembler languages work t his way, although many of them have dozens of com mands and hundreds of locations where th ings can be put or obtained. This sort of computer language has a lot of adva ntages. It's very efficient not only where memory is concerned, but also with regard to execution time. This means that it's cheap to use. The assembler (the program which translates it into machine language) does n 't ta ke up much memory either, which means it can be used in a microprocessor wh ich doesn't have much memory (and memory costs like the devil , even these days). Using assembler, you can also anticipate situations where the machine might do something unexpected, si nce you're on the machine's logical level. Of course, it's got its problems too. It's hard to learn, not easy to use well, hard to debug (find errors) and is "machine depend ent," which means that each machine has its own. To sum it up, a lot of people don't I ike to have to write: "1 2, enter, 2, x." They'd rather write "A=l2 x 2." Th is

is what "high level" languages let you do, along with all sorts of other convenient thing s. For t his reaso n, almost all programming these days is done with one of the various high level languages, and the rest of this art icle wi l I be about some of the more common of them. First of all , a high level la n gu age is a computer language that is based o n some combination of English and algebra. So, to write two plus two you wo uld us ually write "2+2." To tell t he machine to print, you wr ite PRINT, WRITE or so me thing of that nature. The o ne t hing to watch out for is that, although there are many different ways of writing one thing in English (and to a certain extent in algebra), a high level computer language has a very narrowly defined structure and vocabulary. This means that the computer equivalent of " I ain't got none" will be rejected. In other words, you have to be very careful when writing any sort of program for a computer, since errors (the computerese term is glitches) get caught faster than they would

be by an old-fash ioned hi gh It wou ld be a pai n to have school Engli sh teac her. to spend a few weeks masterContinuing the compar- ing a new computer language ison with hum an la nguages, every t ime you wanted to do there are lots of different something different with a o nes for computers, too. At com puter - not to menti on first each company developed t hat you have to buy (or its own; now ma ny of them wri te) a special translating are standard and thus can be program (called a compi ler) used on any machine with for each one - and that can few, if any, changes - unli ke get very expensive (much assemb ler la nguages. We still more tha n the cost of t he have a lot of computer computer itself). So let's look languages, th oug h . For at some useful, fairly general example, the last time I purpose languages. checked the docu mentatio n, BASIC, whi ch stands for there were so met hin g like 35 " Beg i n n e r s' A II - p u r pose different high level languages Symbo lic Instruction Code," ava ilab le fo r use with t he was developed at Dartmouth University of Mi chigan comCollege a n umber of years puter system . The reason for back. It was designed for having so many is t hat each people who knew nothi ng language is designed to do about computers but who some particular thing we ll (in wanted to use them. Few ja rgon, t hey are problem dy ed-i n-the-wool progra mbased rather than machine mers care much fo r it, but based): This means that o ne most non-programmers love language is good for mat heit. It's based on algebra, and matics (also cal led numberthe non-algebra parts of it are crunching), one is good for in plain English. For example, elect r onic circuit design, to enter two numbers into another for librar y use, and the mach ine, multip ly them, so forth . There are also a div ide one by the other and couple of general purpose prin t the results, you would languages - whi ch happen to write: be the most popular for 1 IN A, B obvious reasons. 2 LET C =A* B 3 LET D =A/ B 4 PRINT C, D (* is the standard symbol fo r "times" on a computer) This language has quite a few advan tages. It's easy to learn, easy to use, and there are lots of books around which help people learn it. Equally important, t here a re lots of programs already written and pu blished in it (these are called can ned progra ms), and quite a few computers can use it. In particular, Altair has two (going on three) versions out at the moment, and other microcomputer manufacturers are making noises about su pplying it - or so I read. The compiler (remember, t hat's the program which translates t he things you write into t he machine's language) doesn't take up too much memo ry 45

ei th er, which means that BASIC is suitable for small comp ut er sys tems where memory is lim ited. A final advantage is that BAS IC is fairly flex ible - especially t he advanced systems. You can do many if not mos t of the same t hings with it as you could do with FORTRAN o r PL/1, alt hough the programming effort might be greater. It does have some di sadvantages, t hough. BA S IC has no mnemonic vari ables . T h is means that you have to remember t hat A stands for current, E for vo ltage and so on. In a more a dvanced language you could write AMPS, EMF, etc. Th is isn't so bad if you're worki ng with stan dardized sym bo ls, but gets to be a disadva ntage when you try to reme mber which was Accounts Paya ble and whi ch was Accoun ts Receivable. Also, BAS IC is somewhat Iimited as to what you can do with Inpu t/ Output. This o nl y makes a difference if you are working with a big sys tem that gives you lots of choices - it isn't of too much co ncern for a home co mputer system or a sma ll business o ne. Finally, BAS IC is structured somewha t a long t he same lines as FORTRAN, which is the oldest computer language still in use. This means that it does a lot of th ings in harder more roundabout ways than some of the newer la nguages, li ke PL/ l . Fo r examp le, its "either-or" choice is rather cum bersome to write. It's still a great language to pl ay arou nd with, though. FORTR AN is probably the best known of the various computer languages, par tly because it's one of the oldest. The name stands for FORmula TRANslatio n, and it was deve loped by IBM back in the early 1950s. It and the B-Zero language developed by Un ivac were the first high level la nguages used. No one uses B-Zero today (few have even h eard of it}, but

46

FORTRAN is probably the most widely used com puter language in t he Un ited States. Of cou rse, the FORTRAN we use now isn't the same as the FO RTRAN introduced back in 1957 - just as the Engli sh we spea k now isn't the same language as the peopl e in England spoke back in 1066. There have been three offic ial versions of FORTRAN: FORTRAN (the origina l), FORTRAN II a nd FORTRAN IV. Number three got lost in the midd le som ewhe re . Most computers these days use FORT RAN IV, a lthough there are some minicomputers around that still use FORTRAN 11 ; some of these compi lers might be adaptable to microcomputer use. Anyway, as yo u might guess from t he name of t he beast, FORTRAN is basicall y a scientific computer language; it was deve loped to make it eas ier to solve mathemati cal-type problems for sc ience and engineer ing. Over the years the language has expanded to the poi nt where it is usable as a genera l purpose langua?"', so it can do a

puter, the compiler (remember? the program whi ch transl ates it into m ac hin e language) takes up much more memory tha n a BAS IC compi ler, t ho ugh much less than one fo r most other high level lan guages. One keeps heari ng hints that one of these days someone may develop a version which is usable on a microcomputer, but I haven't seen any anno unceme nts yet. While FORTRAN was develo ped for scientif ic use, COBOL was developed for business use. It's the language used by the U. S. government for a lo t of the ir stuff, so it's got a pretty wide circulation. Needless to say, many bus inesses use it, too. From t he li ttle work I've done with it myself, it seems that you spend mos t of your ti me defi ning what your printout is going to look like and what the information which you feed into the thing is goi ng to look like (the jargon for this is for mat definiti o n ). It also takes lo ts more memo ry th an o ne woul d probably want to pay fo r in a mic rocomputer -

BASIC ... was designed for people who know nothing abo ut computers, but who want t o use them.

lot mo re than simply cru nch numbers. Moreovtr, since it 's such a popular language, t here are who-knows -howmany programs written (and somet imes published) in it, which makes it much easier to solve a given problem (since you can fre quentl y just type in a canned progra m ). The same structural pro blems encountered in BAS IC are part of FORTRAN, b ut t hese have already been covered. Perhaps more important for anyone who wanted to use FORTRAN on a microco m-

unl ess he wanted to do subcontracting for the gove rnment. Up unti l the ear ly 1960s, most computers were either scientific- or busin essoriented, and a machi ne wh ich was designed for one d id n't usually work too well for the o ther. Th en IBM started making their general purpose machines, a nd most other people followed suit. At abou t the sam e time, people started to worry about a general purpose computer language. A number were

developed, of wh ich my favor ite (jus t for the name) is MAD (Michigan Algorithmic Decoder) which was brought to us by the fo lks at t he University of Michigan Co mputing Center. Th en IBM got into the act, and, lo and behold, ou t popped PL/1 (Pr og ramming Language One). The best descript ion that I can thi n k of is that it was designed to out-fort ran FORTRA N and to out-cobol COBO L all at the same time. It does a pretty good job of it, too. I' m always am azed at all of the nice things you can do with PL/1 ; to use the computerese phrase, it has more bell s and whistles (ext ra options} than you can shake a stick at. Unfortunately, it a lso uses more memory th an yo u can s hake a s tick at, which ma kes it too expe nsive for microcomputer use (or eve n timesharing use if you have to watch your costs}. But never fear, o ne of these days we m ay be see ing a scaled down version of PL/ 1 (call ed PL/M} whi ch keeps a lot of the nice features without taking up mo re memory than most of us mere taxpayers can afford . To give an exampl e of t he sort of nice thing the I anguage can do (among others}, it lets you write a sim ple eithe r/or stateme nt (if this is true, do one thing; ot h erwise do t hi s oth er thing}, whe reas to do that in most other languages you have to play hopscotch with the line numbers. In sho rt, PL/ 1 is a great langu age, and if a cheap co mpiler ever comes out, I hope I own the microcompu ter it's wri tten for ! Another new language, agai n by IB M, is AP L. I wi ll confess h ere a nd now that I've never used it, so what I say is taken from what people who have used it have told me. This is a very powerful language; it can do in one line what most other languages require five or more to do. It

is not yet widely used; unless I'm mistaken (which is quite possible) IBM is the only company which makes compilers for it. It is, however, designed for the sort of sitd own-at-your-computer use that most hobby users probably have in mind. And good news! It's available for a microcomputer. The bad news is that said machine is the IBM 5100 and it runs about 1Ok - and those are k i Io bucks, not kilobytes. Anyway, the scuttlebutt has it that APL is one of the languages to watch, so keep your eyes peeled. I mentioned a while back that, in addition to the general purpose languages I've discussed so far, there are quite a few special purpose ones. For a hobby user {or would-be user) these aren't too important, but just to be more or less complete I'll mention a few which are good with which to impress people (besides being good to

1/0 Editorial From page 43 updated data base. This means two more I/0 interfaces and control systems ... it also means a lot of programming using BASIC. If you want to keep a file of every station you've contacted and be able to quickly get the data on someone, this is the system you'll probably want. The same system would work fine for keeping track of magazine art icles you might want to reference, recipes for the wife, addresses for a club, a fi le on music in your record collec· tion, a list of repeaters, etc. These systems wi II be a Iittle slow in locating data in memory since they will have to scan your cassette tape for the data file wanted. It won't be long before we have relatively inexpensive tape systems which can be searched much faster . . . and relatively low cost floppy disk memory systems are on the way. Disks don't hold much more than cassettes, but they search very rapidly. There are a lot more small computer systems coming along, but I haven't got much data on them as yet. It is almost impossible to understand some of the advertising literature in this field and even talking with the manufacturers can be frustrating , for some of them are so busy designing

know about if you tend to be around computer hot dogs who like to talk about such things). There is RPG , which is a Report Generating language, and therefore mu ch used for business and that sort of computing. Then there are several languages used to write simulations. {A simulation is like a computer

SPITBOL and so forth. Finally, there is at least one language used to design electronic circuits - u nfortun ately all my electrical engineering friends seem to be able to tell me is that it exists and Professor Zilch mentioned it. As a brief review, one needs some sort of language

FORTRAN . . . does things in harder more roundabout ways than some of the newer languages, like PL/1.

game except people take it seriously. Come to think of it, I know a couple of people who take the Star Trek game seriously, but we'll ignore that.) These languages are things like GASP, GPSS and so forth. There are a fair number of languages used for crunching words instead of numbers SNOBOL,

to give a computer instructions. You can operate on the machine's lev el (ca lled machine language) and feed it ones and zeros. O r, you can stay on the machine 's logical level but use decimal numbers and abbreviated com mand s. This is cal led an assembler I anguage, and requ ires a separate program for transla-

and turning out parts of their systems that they haven't given much thought to what it wi II be used for .. . or what problems the user may run into. I wou Id Ii ke to state that 73 is most anxious to hear from any ham computer hobbyists who have managed to put small systems together and get them to actually do something . Please let us know what you are using and how you programmed it. I would also be delighted to hear from any manu· facturer who can state just what hardware and software is needed ... and how much it will cost ... to set up some hobby systems such as outlined above.

Now is the day of the true pioneer as far as microcomputers are concerned . . . like sideband in t he m id-50s ... like FM in 1969 . . . and ATTY in the late 40s. We are a long way from the appliance operator phase of uP systems and these are the days which separate the men from t he boys. Let me emphasize again that having fun with computers does not take super brains ... it does not take a whole lot of money ... it does not take education . . . all it takes is enthusiasm and persistence. And, if you are young in spirit, there is a very good chance that you can parlay your knowledge into a very comfortable living.

For instance, any of the small systems being marketed are quite capable of calculating the Oscar acqu isition times, but where can you get the program for the calculation? Unless it is in either machine language for your particular chip or in BASIC, you won't be able to do much. And it has to be in a BASIC that is com· patible with the BASIC you've got for your computer, just to make matters a little more complicated, for there are BASICS and then there are BASICS, fro m Mini-BAS IC on up through Extended BASIC. Obviously we all need to know a lot more about this situat ion .. . and get some counsel on where to get the programs we need for Oscar. moonbounce times, etc.

THE MAGIC OF FRESH ORANGE JU ICE The other morning, as I was squeezing oranges, I had a dep ressing thought. I remembered a bit on a recent Today show lauding the wonders of Florida . It was a fi lm about the citrus indu stry there and t hey mentioned that two thi rds o f the Florida oranges are now processed into frozen concentrate. How many years since you have had fr esh orange juice for breakfast? Once you get into fres h orange juice you have a tough time gagging down the frozen stuff . . . or the "fresh" juice in cartons. You have to t'>tally forget what orange juice tastes

tion into machine language. Fina lly, you can use a combination of human logic and normal words and symbols, wh ich is called a h igh level language. This requires a program to translate it into machine language again, and such a program is cal led a comp ile r. The p rincipal a d vantages of high level languages are that they are easy to learn, easy to use, and are the same for any machine. They are not nearly so efficient as assembler language from the computer's point of view, bu t they a re much more efficie nt from our point of view - and that's usually what counts.• References 1. BASIC, Albrecht, Finkel and Brown. Wiley & Sons, 1973.

2. Digital Computing, FORTRAN

IV, WATFIV, and MTS, Carnahan and Wil kes. Chemical Engineering Dept., Un iversity of M ichigan, 1973.

3. High Speed Data Processing, Gotlieb & Hume. McGraw-Hill, 1958.

like to accept frozen. An electric juicer runs around $10 to $12.50 (Unity or Sears) and you can crank out a glass in about a m inute . .. you don't thaw out a can of frozen much quicker. Just as we have all come to accept t he frozen juice a lternative to do-ityourself juice, wit h a loss of substance, most of us hams have come to accept our ham gear as either readybui It o r in kits (paint by the numbers?). I have a strong feel ing that the computer revolution in amateur radio will bring back a lot of t he home squeezed flavor to our hobby ... for, even if you work from an assembled or kit computer, you are still only about 25% o f the way toward your goal. This is one field where the hardware is only the start and merely opens the gates for self-expression and creative fun via the programming you will be d o ing. I hope that the manufacturers of computers won't be angry at me for letting the cat out of t he bag, but t he fact is that getting your equ ipment working is only a small part of the fun and challenge. Oh, in t ime a lot of t he work will be done for you a nd will be available on .tape or something ... perhaps ROMs. At least, programs will be avai lable fo r ordinary uses of the equipment ... you will still be on

Continued on page 51

47

73 Magazine Staff

A Nifty Cassette - Computer System T

he most practical and economical way to store progra ms and large quantit ies of data for sma ll com put er systems is with th e common tape cassette recorder. Cheap a nd p l entifu l, audio-type cassette equipment is capable of storing several t imes t he amount of data that an equ ivalent volume of paper tape can hold, with the add ed benefits of erasabi lity and easier o pe ration. Floppy disks may be faster, but are beyond the price range of most hobbyi sts.

While computer manufacturers a nd software houses have long been suppl ying their programs o n audio cassettes, there has been a maj or problem with co mpatibi lity. Every ma nufacturer has had h is ow n pet system of recording, and a tape recorded for use with o ne brand of computer is utter gibberish to another brand of co mputer. For t h is reason, several manufacturers decided to adopt a standard system of tape interfaci ng. The proposed standard, as

LSB 26 . - - - - . . . , 34

....._.......-- +5 35

27 2B

B BIT PARALLEL INPUT

29

IC la UART TRANS MITTER

36

implemented by Pro netics Corp., calls for a frequencyshift keying stan dard not entire ly dissimilar to that used for RTTY, b ut with seve ra l cru cial differences. The two to nes to be record ed are ideall y to be square waves, with Mark {logic 1) to be 2400 Hz, and Space (logic 0) to be 1200 Hz. With a standard tape exc ha nge speed of 300 bau d (bi ts per second), Mark wo uld consist of eight cycles, Space of four. Thi s co uld be d ivided to 600 or 1200 baud, in which case one cycl e would be a space {1 /1200 sec). Higher density would be impracti cal. For comparison, 300 baud corres-

37

30

38

31

25

IC Be 116 4049

32

33 MSB OK TO LOAD

RI IOOK !---'";""'""-- - - - - AUX

22 23

l.005 Cl

40

{5p0-~mv)

R2 IOK MIC


R3 IK

Fig. 7. Cassette digital modulator. This circuit converts 8-bit parallel input data to a series of 2400 and 7200 1-/z tones for recording on cassette tape. 48

ponds r ough l y to characters per seco nd .

30

Within each character, the first recorded to ne shou ld consist of a Space {start) bit, fo ll owed · by eight data b its .{least signif ica nt bi t first, parity last) and two Mark {stop ) b its. All undefi ned bits, as well as the interval between characters, wou ld be Mark {2400 Hz). This system has several benefic ial features. It is se lfclocki ng. The first bit of any character is Space a nd must follow the Mark tone that ends previous characters a nd exists between characters. It is possible to tolerate as mu ch as a 30% speed var iation with th is system, which can be an important factor with inexpensive tape equipment. Do I Need a Good Recorder? Al mo st any cassette record er can be used fo r data storage usi ng this FSK standard sys tem . But for convenience and accuracy, th ere are a few cr iteria fo r selection that differ from hi-fi qual ity.

Yo u want a clean, rel ia ble machine. Dirty heads and mechan ism can spoi l data very easi ly. If you do n't have a cassette recorder already, a used model is adequate, but it s h ou ldn't show signs of mistreatm ent. It sho uld also have capstan drive - a fe w minia ture units don ' t. A digital tape co un ter is also a great convenie nce. Without o ne, ide ntifying programs o n a tape ca n be d iffi cult, a nd could lead to accidental e rasures. Th ese are fou nd o n many hi -fi ty pe machines, a nd occasiona lly on portable units. An important electrical feature is ac bias/erase. Some recorders, and most of t he under-$ 100 category, use de fo r erasi ng a nd record biasing. Thi s resu lts in higher no ise a nd less freq ue ncy respo nse. Whil e freq u ency respon se is not as critical with this system as wi th mu sic recording, it still helps to have a good clean trebl e response, which ca n hel p preserve the square wave shape. Low noise means fewer errors, so a high signal-to-n o ise ratio a ids rel iabil ity. Stereophoni c capab ility is u nnecessary. If yo u have a stereo recorder, be sure to record bo th tracks simulta neously, a nd bulk erase the tape before using it. Yo ur tape recorder must have an auxiliary or micropho ne inpu t jack, as well as a n earphone o r Ii ne output. Acoustic coupl"ing is unsatisfactory. The c hoice of levels can be perform ed in t he computer interface circuitry, so e ith er mike, li ne, or speaker levels can be used . What About Tape? Whil e the choice of tape recorder is uncritical, the tape itself is t he weak lin k in the chain. Do not skimp o n tape. Use the best tape you can get you r paws on. Since dr opout o n the tape means loss of data, the tape must have a

In a meeting organized by the staff of 73 Magazi ne, the microcomputer industry accepted this cassette system as the industry sta ndard.

hi gh manufacturing standard. Some cassettes jam easily, and t he thin tape fou nd in C90 a nd Cl 20 cassettes is t oo thin a nd fragile to be reliab le. A premium gra de C60 tape is ideal. Perfectionists might want to spend the ex tra money for chrom ium dioxide tape. The extra response ca n't hurt. Store the tapes in a dustfree loca tion, in th eir own contai ner . Do not smoke near the tapes or the recorder, a nd clean the heads freq uently. Tape cleanliness and quality are far more impor ta nt in digital app li cations than in music. The Recording Interface Digi tal informatio n fro m your compu ter is genera lly avai lable as 8 bits parallel from either an 1/0 port or data bus. Th e tape is recorded ser ially; t he conversio n is best accomplished with a Univer sa l Asy nc hrono us Receiver/Transmitter (UART) IC. The mod ulator is shown in Fig. 1 . The ser ial o utput of the UART has logic 1 as a high level a nd logi c 0 as a low level. IC2a and IC2b form a clock divider circui t, dividing the 4800 Hz clock signa l by 2 or 4, de pendi ng on the UART output level. The outpu t is a series of square waves which feed the tape reco rder 's input. The poor fre qu e ncy re s p onse o f some ta pe recorders, especiall y those wit h de bias, ca us es the manufactu rers to e xaggerate the treb le being recorded, wh ich distorts t he square wave. Sine waves record better, bu t are

\

harder to generate d igitall y. In so me cases using a lo w pass filter makes t he waveform usable; R 1 and Cl perform t his fu nction. A smaller val ue fo r Cl may increase effectiveness with be t ter recorde rs. Fig. 2 shows the effect of t he recordi ng process o n digital waveforms. The AUX outpu t of t he interface is 500 m V peak-topeak a nd is for use with hi gh impedance high leve l inpu ts. The MIC ou tput is 50 mV, suitable fo r most units with microphone inp uts. Th e 4800 Hz signal must be ca pable of driving two TTL loads. Wh il e a crys tal oscil lator and divider cha in work best, a nd a phase locked loop referencing the 60 Hz power line is also very good, the o scillator in F ig. 3 is si mple and quite sat isfactory (but requires calibration with a fre qu ency cou nter). If the avai labl e digital information from t he computer is a lready in ser ial form with the necessary start a nd

two stop bits, and is properly ti med at 300 baud, the UART is no t necessary. However, the 4800 Hz clocking signal should be synchronous wit h the ser ial data, with 16 clock pulses per bit. If the seria l da ta is not at 300 baud, a UA RT rece iver must first be used to convert t he data to parallel form. It then is cloc ked through the UA RT transm itter as shown . The OK TO LO AD line on the UA RT goes high when it is ready to accept a byte of parall el data. The data is then loaded into the UART transmitter by pulsing the LOA D line low for at least one usec o r un t il the OK TO LOA D line goes low. The tra nsm itter will t hen start transmitti ng the byte when the LOAD line is return ed to the high state. When no t tra nsm itting, t he out put is high, causing the modulator to generate t he 2400 Hz Mark signal. The Playback Interface There are several possible ways to recover the FSK signal from the ta pe. An FM discriminator or a phase locked loop demodul ator can be used, just as with an amateur RTTY signal. Users of previo u s n onstandardized cassette interfaces can read just them to decod e the 1 200/2400 Hz tones, but the most accurate syste m uses

A

B

c D

Fig. 2. If a square wave signal such as waveform A is recorded on a low cost cassette recorder, the playback response m ay look like waveform 8, which is very difficult to demodulate. If the square wave is filtered with a low pas~ filter before recording (waveform C), the playback response will appear like waveform D, a usable signal. 49

+5

l'

low, so it regenera tes pu re sq u are waves from the distorted tape input. IC4 is a retriggerable one shot with a period set to 555 microsecond s. As long as t he input signal is 2400 Hz, the o ne shot is retriggered before it times ou t. Flip flop IC5a re mains high, which is interpreted as logic 1 . T he 1200 Hz signal, on t he other hand, has a period between pulses of greater than 555 usec, so the on e shot t im es ou t, resetting IC5a . It stays at log ic 0 as long as 1200 Hz is being received because t he one shot is timed out whenever the next trigger ing edge occurs. When t he 2400 Hz signal return s, t he one shot stays high, perm itting IC5a to swi t ch back to high state. The output of th is flip flop is the serial data. Wh il e that si mple circuit will work well if the tape speed is accurate to better than ±6%, such is freq uently not t he case. Si nce tape speed variations wi ll be refl ected in pitch var iations in t he recovered tones, it is possible to

.01 MYLAR

Fig. 3. Circuit of 4800 Hz oscillator. Use this circuit if a more precise and stable source of 4800 Hz is not available. digital recovery to extract timing informatio n from the recorded signal and uses th at inform ation to ret ime the recovered data. Fig. 4 is a com plete schemati c of the playback demodulator. The signa l from t he cassette player is conditioned by IC3, an o p amp used as a Schm itt tr igger. The output of a Schmitt trigger is, by defi ni tion, either ful ly h igh or C4 .005 MYLAR

R9 50K

use the 1200 and 2400 Hz signals from the tape to reti me the recovered data. Flip flops IC6a and IC6b extract this timi ng informat ion. When the 1200 Hz signal is rece ived, IC6a is preset with a pulse generated by C8 and Rl 5 every time the one shot times out. The effect is to cause IC6 to divide by two. When 2400 Hz is be ing received, t he one shot does not t ime o ut and IC6 div ides by fou r. Th e resu lt is a cl ock at the output of IC6b, at 600 Hz. Instead of clocking the data into a shi ft register, the rece iver portio n of UART ICl is used. It has bui lt-in circuitry to ide ntify t he start and stop of each byte automatical ly. It also has threestate output (logic low, logic high, a nd fu nctionally disconnected), wh ich permits direct co nnection to most data buses and 1/ 0 ports. The UART needs a 16x clock, whi ch is for med by phase lockin g a 4800 Hz osc illator to the 600 Hz out put of IC6b. The PLL is adj usted to

oscil late a t 4 800 Hz in t he absence of any inpu t signal. ICSb and IC9 divide the PLL output by 8 to drive one of the phase detector inputs, while the other inpu t is driven by IC6b. The UA RT receiver raises i ts DATA AVAI LAB LE out put to logic 1 when it recogn izes that it has received a complete character. Since the UART outputs are threestate, it is necessary to drive the REC EI VE D DATA ENA BLE in pu t to logic 0 to read the parallel o utp ut data. After the parallel data has been read it is necessary to pulse t he RESET DATA AVAI LAB LE li ne to prepare the UART to o utp ut the next byte. The pulse must rema in at logic 0 for at least one usec, or u ntil t he DAT A AVAILABLE line d rops to logicO. Circuit Adjustments The on ly adjustment necessary fo r the reco rding modulator is to put the 4800 Hz signal exactly o n frequency. Since a Mark byte -12

+5

IC5 a 112 4013

2

5 2

3 12

8

ICI b 10

IC4 4047 ONE SHOT

6

1cea 116 4049

NRZ DAT A

7

8

II

5

Rll

471
C F74 3 2

74 7 4

743 2 DC OR PC FOLLOWS

Oo

0 R-i

s

~ 505~1

O•

0•

LOOKING DOWN ON CIRCUIT BOARD

Fig. 72.

.2!>A

7920 _ _ _ __ __

AHA7406 SN7402N

0

112 7 473

15,640 _ _ __

FAIRCHIL.0

Tl

l\IS 349 OM 7432N

+5 -5 -12

Max.

Mi n.

4.75 -4.80 -11.7

5.25 -5.90 -12.3

Logic testing: The 3320 display has a se lf-test featu re whi ch makes troubleshooting much easier. With this you can see any pulses t hat happen in the "visible" area of the frame. Th e visible area means any area of the frame t hat ca n be displayed on a television. Therefore, you can't see the sync pu lses, and you must have these pulses to be able to display anyth ing at all. To use self-test, d isconnect t he jumper between the output shift register and pin 1 of 56 (between po ints D and E). This will take any video data that you may have off the screen. Next, connect p in 1 of the input connector to the signal line that you want to chec k. There shou ld be a series of horizontal (for slower clocks) or ver tical (for faster clocks) li nes on the screen, where whi te is a logica l o ne a nd black is a zero. To be sure that sync is there, and to be sure that the display is hooked to your television correct ly, fo ll ow the above procedure and hook your jum per to a moderately fast clock (such as the G clock). In this case you should see 10 or 11 pairs of black and white verti cal bars on the screen. If nothing is there, first chec k the connection to you r television; if you 're sure that's OK, you will need a scope to check the sync pulses and the outpu t of the buffer transistor. After you get self-test work ing, go through a ny c ircuit that you think is bad and look at all of the signals. Please no te that only TTL level signals can be

Fig. 73.

displayed using self-test, so don't look at the outp ut of the page memory's clock d river, or either of the negative su pplies! If t he unit does not work, t he fi rst thi ng to check is the timing chai n. The T clock should be 60 Hz (one horizontal li ne o n t he screen). If it is no t there, start at the A clock and work you r way through the chain. If the master clock is not oscillating, be su re that ICl is a 7404 made by Texas Instruments. If it is not, it must be replaced with one that is. If the tim ing chain is all right, check the 01 and 02 clock pulses at pi ns 3 and 11 of 19, respective ly. Th ere should be 1024 small white dots on the tele vision screen. If there are o nl y 1000, check the divi de by 24 circuit, ICs 21, 13, and 22. If there are dots al I over t he screen {many more than 1024), make sure that character area is high only for the area shown in Fig. 2, and that t he d ivide by 24 circu it is working. L1 shou ld be one horizo ntal scan Iine out of eight white, whi le loa d shoul d be somewhat similar to t he C, D, and E clocks, except the pul ses wi ll o nly appear during character area. If everything seems to be OK in the timing section, check the cursor control. If a cursor ap pears on t he screen, but won't move when pulsing t he strobe Iine, first be sure that the jumper is in for positive or negative strobe! Then, see if t here is a pulse at pin 5 of 36 that lasts exactly o ne frame (it wil l appear as a fl ash on the screen ). If this pulse is not there, try clearing the uni t by bringing the clear line to +5 volts. Because of the random states that logic

Fig. 76. Timing.

comes up in, some units must be cleared before data can be entered. If a cursor doesn't appear, look for a character clock (1000 pulses on the screen) at pin 11 of 25. Be sure that this is clocking the flip flops and the di vide by 10 (ICs 30 and

31 ). There should be 25 short normally high pulses per frame at pin 11 of 32. These 25 pulses are sent through an AND gate to clock the two divide by five circuits. If nothing is clocking, check the clear li nes to the flip flops and the dividers. The output

of the second divider (IC34) should cause flip flop IC32 to toggle once per frame. This flip flop will soon be reset by the next character clock pulse. This line is called character position, and is used to put the cursor on the screen and to bring the write Ii ne of

the memory high during an update cycle. If the timing and cursor sections both work, but the memory either won't enter data, won't fi ll with spaces when the clear line is brought high, or is creating random characters on the screen, the

WA'ITfz

h BA

STROB£r

" ,,

38

JUMPE.AS· A·S ,.OA • GOIN----·· >--- --·· f--- 8' f - - -- •2 f - - -- ·· >----- •o

1' .1)0 6'~

,f,

POLY

Fig. 6. Serial in/parallel out (SIPO} for ASCII code. jumpers: A - B, 2 stop bits; A - C, 7 stop bit. Adjust for 76x baud rate: 770 baud= 7 760 Hz; 300 baud= 4800 Hz.

6 r:-,TTllP~

\!.I IN

MARK - 5 SPA.C E+5

RS 232 OUT

•5

MOTORO LA MCl488L I A80 UT $6 7!5l

•1 2

- OR-

@ 1~L '>--

47 K

--I

l') /6>0---~---''f' ~ ------__,.Cl

...

CJ ...

CJ

-- '__ o_

-

- : =: ~

-- - := - D

-

-

=:J -

- - : ~= - - ·-~ 2 - >------------...

- - :--::J - ..........- - - : :·.::

B

!-------'----~--~

I-----'----~---

z

0 15

E

v

...

• - : = D CJ • r·~ l ":"j ... Ci 1-•_ _-__;:_=_ _=_ _CJ_'_,_,_~ •_ __ _ ...

0

0 16 0 18

0

0

__Cl__

F

0 10

-----•

- - := -

A

-:~

>--------~--~

F IGS

00 7

- :c::; - - ...

c

>------'----~--1

005 006

- - :-=

- - :w - c:: ;- - - ::::J :-:-: := - ---------, = := !--- -------':= :-_- -:=; :-._- ---...

p

____ __

,_

0 1"•

G

____,:

023 024

025 026 028 029 030 0 l 3

L

~ k~~

-

• :=

~ - :-

c::; -

....---~ -·~:_= ___ -~:_=-_-____ __

. .-__-__;:_=__CJ =__--~:--­ :----~--

M

- • :c • • :o CJ • :o - CJ - a -:•' - -CJ- -LJ- ':-c-J f------

N H

0 CAR

RET

- : C.J LJ - - --... f-----'-- -- -: '- - -

-

'

C l : LJ

L.J



: -

- c:J:•

BT LANK ___ _-__;:_ -_ ___

_

_

-~:_•

CJ CJ

__ _

C:J : •

__ _

.

.

MARK SENSE PROGRAM CARD

WORD NOTES

&

91

1 I ti 96 I 55

5 B•

4 ~J

I l I B2

l 81

I 80

>----+-L-T_R_S:-=::::J-=--=-~-~:,,_•--:_-_--::_--:;:: ::: ::_-=.., 001

002

003

004

7 FI GS

005 006



c :-

CJ

-

CJ : •

-

•: o a • = :• • a :• • .• •]• 0

-

D ] CJ CJ -

-

-:- - --DJ •

o: o

2

-

-

-0 -

007

008 009 0 10

6

0 11

-

012

7

013

$

015

-

3

:=J

• • o :• • CJ • :CJ -

-

c::J

-

D



~

&

- ~



4

-

-

-

CJ -

CJ -

c

~

oo : ••

:=J

• :::=.

--...

!-------'----~--- :- c

0 25

029

!!m-

::::: : - c:: :::i I • c a •: ~b~'fi ~---'--:::i _ _o__•~;_ ;::; __• _ _ :::i . .

02•

028

Cl

• • w:=

021

02 7

o:

:::i

1----'---------~:::::J -::::J -::J -

020

026

: -

o :c - -• = ,• • • :o •

8

023

-

+-----~---~---2 -

017

022

o: -

w w

• L:= • lo • • +---'----• ---'------...

0 16 0 18

~

-

014

--~ ----, : -----

R

02 2

The CT-1024 Display Unit Construction The SWTP display unit is available in kit form for $190.50.1 Boards onl y are also availab le for $47 .50 . The ICs and discrete components can be purchased from 73 advertisers for $50-70 in total. Readers with a wel !endowed junk box might want to go the board route to save money. Caution: The boards are very complex and built to excel lent and exacting standards by SWT P. I would not re commend

-



#

o

:-

a :o

CJ Cl



...

t------0- -CJ- --'-- CJ a:o o - o- -

SPACE CJ

9

~~~



CJ

-

D

• • - :o

Cl 1-.- -CJ --';-0--0- -•--'-:----CJ -•- t-----'----~--~ --

030 OJ 1

5



o :-_____ m o: • o •_ w__,_:_- ______ _

BLAN~ ---•__,_ : _-

1 MARK ON LY S ITS TO BE PROGRAMM ED WITH SOFT LEAD PE NCIL

OVER FOR FULL INSTRUCTIONS Fig. 8. 8223 read only memory coding. Bell prints as or space. 86

MARK ONLY BITS TO BE PROGRAMMED WITH SOFT LEAD PENCIL

OVER FOR FULL INSTRUCTIONS

*. Blacken B 7 (first box) to block unshift

attempting to make th em yourself or to pu rchase them from anyone other thar. SWTP. Radio Electronics9 magaz ine carried a series of articles on the CT-1024 if you want to read more prior to maki ng a decision (the TV Typewriter 11 in the ser ies). I don't recommend the TV Typewriter I (Sept. 73 RE), as some additional interfacing is needed for it to properly hand le the line feed, carriage ret urn, no display of rubouts, scrolli ng, clear, etc. The TVT I is tough to use either wit h a micro or RTTY withou t extensive rework. A feature not described by SWTP is to tie pin 3 to 7 of the cursor socket (J3) . This causes the CT-10 24 to clear the next line upon receipt of a CR/LF comb ina tio n. Without this, it provides a very confusing display. It automaticall y starts a new line a nd clears it when th e end of a prior Iine is reach ed (nonoverline) when wired th is way. Assumi ng t hat you have bui It up t he CT-1024 in o ne fo rm or anot her, the next step is to interface it with a TV set. The CT-1024 instructions provide an interface to a Motorola TV. Lancaster 10 discusses interfacing video signals to TV sets in depth in a recent BYTE art icl e, and wil l have this available in a "TV Typewriter Cookbook" shortly . You should be able to test the CT-1 024 by grounding th e data line t hat you want to be a zero and then grou nding the strobe li ne to see t hat it is working. An ASC II keyboard coul d also be attached to check it out. The SIPO (Serial In/ Parall el Out) Circuit The circuit in Fig. 6 can be readil y constructed on perfboard or the same Radio Shack board s discussed previously. Set th e NE555 timer

rate to l 6x the baud rate; i.e., fo r 110 baud/10 characters per second, 1760 Hz would apply. Jumper A to B for 2 stop bits (110 baud), and A to C (300 baud +) for 1 stop bit as necessary. Convers io n to RS-232C Standard Data Logic Fig. 7 shows possible ways to convert from lTL to RS-232C logic. Either results in pretty much the same thing. The trade-off is what power you have available versus using discrete components. UART Considerat io ns

The UARTs specified in the va rious circuits are the "standard" variety. Makers and models are as fol lows: 1. Texas Instrum ents TM S601 l. 2. General Instrument AY-5-1013 or AY-5-1 014. The 1014 is nice in that no - 12 V is needed - pin 2 is left uncon nected. 110 Editorial from page 77 new industry started ... the hardware and software background combined . In five yea rs the big manufact urers in the micro fi eld may well be the small firms which are springing u p today to provide hobbyists with equipment. It is possible right now to develop a computer product and get into pro· d uction with it fo r very little ... and do well. Never has there been such an opportunity in the computer fi eld for small businesses to start and grow. An investment of a couple of thousand dollars today could wel l lau nch a company worth over a million dollars in just a yea r or two. Well, that's the message I thought the computer hobbyists and compu ter store owners might be interested to hear. Time w ill prove whether I am overly optimistic or not. My past pred ictions h ave come off well, so maybe I'll hit again. PROGRAMS FOR SALE? Newcomers to the computer field are sometimes surprised, o nce they have their system up and runn ing, to find that all they h ave is machi nery and the darned thing just sits there . . . not doing any thing. Not that everyone hasn' t heard of software and programs - it 's just that m any neophytes don' t understand the tremendous imper· tance of su ch. Old hands are culpable in this, too,

3. Western Digital TRl 6028. These are read ily ava ilable from 73 advertisers and other sources. Summary I have discussed vari ous ways of setting up th e conversio n from Baudo t to ASC II and the video display. Hope-

fully, you wi ll be able to select the o ptions that you wan t. The Baudo t to ASCI I circuit (BAC-2) in and of itself may be useful for working with a microprocessor in that the program to convert back agai n can be read ily loaded from 5 level paper tape usi ng Baudot equipment. Once loaded, the conversion

back can be done via the program. Th is enabl es SWTP M6800 microcomputer system users to use 5 level equipment and avoid going to ASC II equipment. I do not have a source for printed circu it boards - let 73 advertisers know if you need them and perhaps someone will make them up. •

References 1 . CT-1024 Terminal, Sout hwest T echnica l Products, Inc, 2 1 9 W. Rhapsody, San A n to n io TX 782 16. Pr ices for: A. Complete Kit CT-1024 T erm inal Syste m K it CT-P Power Supply Kit

$ 175.00 15.50

- --

$ 190.50 B. Boards Only CT-1 024 Board Set MP6800 Processor Conn ector Set {provides 50 pin s a nd mating m olex co n nectors)

$

4 7.50

$

50.0 0

2.50

2 . TTL Cookbook, Do n Lancaster, Howa rd W. Sams & Co., In c., 1974 , pp . 262-265. 3. "Using a Bargai n Su rplus Keyboard ," Cole El lswort h, 73 Magazine, January, 1976, p. 212 . 4 . "ASC II to Baud o t Converter," C ol e El lsworth , 73 Magazine, February, 1 976, p . 52. 5. " ATTY Autocall - t h e Digital Way ," L. W . Sanders, 73 Magazine, Februa ry , 1976, p. 76. 6 . " Th e Mainline UT-4," Irvin M. Hoff , R TTY Journal, March, 1975, p . 4. 7. Hand Wire Wrap Too l, Cambion #B01-2506. Less t han $3 from distribut ors. 8 . "Th e Computer QSO Machine," B. D. Lichtenwalner, 73 M agazine, J a nuary, 1976, p. 80. 9. " TV Typewriter 11," Radio Electron ics, Ed Colle, February /Marc h /April , 19 7 5. 10. "Television Interface," Don Lancaster, BYT E Magazin e, O c t o ber, 19 75, p . 20. for they are generally fam iliar with a commercial or school system w h ich came with software and, shucks, you can get all sorts of programs from the users groups .. . from libraries ... no strain . Oh yeah? Foreseeing this problem last year, I organized the Kansas City meeting of the microprocessor industry to form a standard cassette medium for program interchange. The meeting was di fficult to get going . . . I had to get the site set up for it ... send out letters to all involved ... write it up in Byte ... and t hen make an awful lot of phone calls to follow it u p . Th e meeting, for which Byte h as been given credit, was my idea and m y doing . .. and the people who h ad taken over Byte were f urious that I had set up the con· ference . . . they d idn't want to be bothered. So much for that. So now we have a medium which can be used for entering programs into small computer system s. O ne thing which I think will he lp ho bby computers and small business comput er systems grow more than anything else will be a low cost plentiful supply of programs. I hope to provide same. Here is the deal. I wi 11 buy pro· grams from programmers and pay a good royalty on them. I will duplicate these and· have them on sale in all of the computer stores arou nd the country ... and possibly in som e of the more forwar d looking electronics distri butors. I will h ave them careful ly

checked in my own lab to make sure that they work as advertised and that duplicates are perfect . We a lready have excellent tape duplicating equ ipment which we use for making t he Morse code and radio theory cassettes we are p resently selling ... over 2500 a month. If you are a programmer and have a good program available, p lease let me know. I need to know what it can do, what system it is for. and how much memory it takes. We will be able to check out programs on the Altair BBOO ... have b een promised a Sphere system . . . and hope to event ually h ave all other popular systems set up and running so we can check the programs. What kind of programs can sel I? Just about anything. I wou ld expect we might have a cassette with five games o n it which would go for $2.95. A real fine Star Trek program m ight go for $4.95. A payroll program fo r sm all businesses cou Id go fo r perhaps $19.95. We would want to keep the prices down to where it would not be worthwhile to bootleg them or even make copies for friends . . . thus getting out fro m under the problem MITS has had w ith t heir BASIC, which appa rently has been copied quite a b it. Programmers would benefit sub· stantially under this plan, since they would m ake 10% of the gross sales. Thus a $12 program would wholesale to comp ute r stores for about $B and

the programmer would make an BO!l royalty . This wou ld mean $B,OOO royalty for every 10 ,000 of the programs sold . . . and with several hundred thousan d customers out there, if only 10% of them bou ght a given program this would mean a very nice return for the effort of writing and documenting the program. T hese p rograms would be a bonanza for the stores ... it wou Id give them the ammunition they need to sell systems . . . not to mention that they might even tually be a good profit item in t hemselves as businesses and hobbyists come into the store to find out what new programs are avail· able every week or so. It is going to take this idea a while to yet into motion. First we will have to get our own computer systems up and working ... our experience has ~hown this not to be a minor u ndertaking. We have two computer techs and programmers on our stall right now and are looki ng for more. Th en we will have to run thorough tests on cassettes to see which work best ... using a computer to check each tape as it is made, comparing it, bit for bit, against the original. Programmers . . . it's ti me to get working on you r programs. Be sure to document them well .. . be sure you are not d rawing o n o the rs' work . .. a ll our programs w ill be copyright . . p lease put in some extra steps

Continued on page 93 87

ASCII to Baudot Converter by Cole Ell sworth W60X P 10461 Dewey Drive Garden Grove CA 9 2640

A

fter acquiring a surplus ASC II encoded keyboard 1 it was desired to use this keyboard on the amateur RTTY frequencies . Un der present FCC regu latio ns, onl y 5-level code is permitted (commonly cal led Bau dot code, but actually a version of the Murray code). Therefore, we needed a conversion device t hat would change the 8-level ASCII code to 5-level code. There are several diffe rent approaches to this problem presentl y in commercial use. One of the earl ier conversion methods utilized tape reperforators and tape readers to accomplish the co nversion. The more modern video display communications terminals in some instances use computer memory and so ftware to make th e conversion. Some integrated circu it manufac turers have made avai lable commercial versions of custom programmed ROMs which grea tly faci li tate a bi-directional conversion but seem to be somewhat different in format from my requirements, inc lud ing low cost. The ASC II code is capable of generating 128 characte rs (2 7 ), of whi ch up to 96 may be printing characters. (The rema ining 32 are termed "Control" characters.) The Baudot code is capable o f generating only 32 88

characters (2 5 ) so a "Case Shift" method is used to provide a second set of 32 characters wh ile maintaining a 5-bit code. Thus the need for FIGS shift and LTRS shift on 5-level mach ines is apparent. It is the requi rement for generation of the case shi ft character that makes the problem of conversion from ASCII to Baudot so interesting. Conversio n in the o pposite direction, i.e., from Baudot to ASC II , is relatively si mp le. Witness the recent publication of a circuit2 t hat requ ires only fo ur !Cs to perform the conversion. I had been mulling around several possible approaches to the conversion problem when two significant situations arose wh ich served to solidify the design approach. The first was during the course of a discussion of the matter with Jerry WB6WPX, when he suggested "jamm ing" the case shift character into th e Baudot output bit st ream just ahead of th e cha racter requiring the case shift. The second was the development of the UT-4 by Irv W6FFC 3 . The F IFO in the UT-4 makes the perfect buffer for absorptio n of the case shift character (which is generated within the period of a few mi croseeonds) wi thou t

Fig. 7.

ASCII

INPUT Bl

~STROBE IN

Lr

-~1

14

B7

P

I~

~

I

I Al

221

RI

C2

Al

4

5

~

3 ~

s7 "i

4

5 5 E

~

T

I

T

I

UH

T I

I

"~~

Al

U5 B I 2 11 21

3 4 5 6 16 ~ 4 5

2

3

4

U6 B I I

- l

~

1 )~-l

3

2

p!.5

U4 B I 2 I 2

-

QI 4

-

I I I 1ol II 12 13 14 Al 2 3 4 5

UIA

r

6

~ U7-14

7 us

Rl3

5

Cl

T1s /

2,3,11,16

4

EDCBAJFH

I

~

R l2

3

llA AAl ll II t

v

5v

2

2

3

21

4

5

4

3

5

6 7 6

3 B

13 A

I

2U1 U2B

.~~

221

I uS Q2

3

I I

.. R4

UIB

2

91111 ]

R~

IO B2

~

U7 0

\....

3

12 4~Ull - 1 3

2

4

6

10

-T .

f!B

12

R9

I

74365

U2D- 9

us

-

15

..--

Bl B2 83 B4 85 7 9 II 3 5

~21

11_12 U2A 09

,

51V

...... RN

II

6

Ull-< I - ;

~

R24

·~ ·~· 12

..

k_lh 02

4

r\. U2C

B2 ~

'i2.5

R7 4.7. K

= -

R22

Qi

5

Bl

1J II

c lu S

STROBE OUT

Lr 18

I \

7

1e l J J ~ I I I I I I I II l

7

6

9

K

N

M

Bl 82 83 84 85 B6 B7

p

C3

'

>

R14

3,11

16

15

QI

U108

6 us 6 uS

>

C4

Rl5

5V

vv

Rl 7•

J_ ••

§_LJC6

02 12

4 014 4

!ll6

10 82 7

221 UIOA

2uS

5V

'

\I

> Rll >

..._____.,

'ir" 8

C5

5V

'>

U98

12

2 Bl

'RIO

1J

J- 1\....~1 ,-1

.L_,

U3A

U3B

1_Ej13

-

Ul3-12

41.1

I

U9C

Ys

~----------~·

BAUDOT OR ASC II OUT PUT

significant delay in conversion of the fo llowing ASC II character. An initial cut at the design resulted in a 12-chi p circui t with a timing budget that appeared feasible. A second cut at the design res u Ited in an operational prototype requiring ten chips including the three conversion PROMs. At the suggestions of W6FFC, a circuit was developed to provide automatic generati on of a Baudot LETTERS shift character fol lowing a LINE FEED. This feature eases generation of proper end-ofli ne routine when usi ng an ASCII keyboard and is well worth the three additional chips required. The final design uses 15 chips and was dubbed the ASC II to Baudot Converter - version 1 (A BC-1 ). The logic di agra m of the ABC-1 is ill us trated in Fig. 1. Fig. 2 is the converter timing diagra m. Interface with the UT-4 is

shown in Fig. 3. Note that one additional 7400 chip (!Cl 3) and one switch (59) must be added to the UT-4 circuitry to provide ABC-1 interface while maintai ning ful l capability of the UT-4 in the originally intended application. Features 1. Converts all ASC II charac ters that have Baudot equivalents to the proper Baudot character. 2. Converts all non-equivalent characters to a Baudot BLANK unless otherwise programmed in the appropriate PROM. 3. Converts both upper and lower case ASCII alphabet characters to the eq uival ent Bau dot character. 4. Provides automatic Unshift-on-Space for Baudot mach ines. 89

~

TO INPUT LINES

Fig. 1(a). UI B-12

U8-3 U8 -5

U8-7

UB-9

I

UB-11

I e1

86

p

97

85

94

1,4 10 13 4

92 \

Ul5

74125

8

93

74125

5V

6

8

II

84

83

ez

10 SV Rl8 \Bl

B6

p

87

85

3,11, 16 TO OUTPUT L INES

C7

221

I

10 uF

+

91

R26

U7- 15

SV

17

10 ASCII

0

l

GRO

r 16

l

sv

KYBO OUT

SI

BAU DOT

Figs. 7 and l{a). Ul, 3, 70, 13: 74221. U2: 7409. U4, S, 6: 8223. Ul: 747SS. U8: 7436S. U9: 7470. Ull: 7404. Ul2: 7430. Ul4, lS: 7412S. Rl-S, 7-77, 18, 26: 4.lk. Rl2: 30k. Rl3- 17, 79, 20: lSk. R21-2S: !Ok. Cl: 330pF. C2, 3, 9: lOOpF. C4: 210pF. CS, 6, 8: S60pF. Cl: 10 uF, 70 V. Notes: ASCII inputs 87 through Bl are positive logic (Mark =High level). U4 is alphabet PROM that converts both UC and LC ASCII to Baudot. US is control function PROM for Carriage Return, Line Feed, and Bell. U6 PROM converts numerals, punctuation, and space bar. Most ASCII characters with no Baudot equivalent convert to a Baudot BLANK character. Ul 1, 72 and 73 generate a Baudot L TRS shift function immediately following a Baudot LF, thus providing a standard end-of-line routine capability of CR, LF, LTRS. Baudot outputs Bl through B5 are positive logic (Mark= High level). Ul 4 and l S provide direct ASCII throughput when Sl is in ASCII position. For Ul, 3-8, 10 and 13, Vee is on pin 16 and Gnd is on pin 8. For U2, 9, l 2, 14 and 7S, Vee is on pin 14 and Gnd is on pin 7. 5. Provides Automatic Le tters Shift after LI NE FEED. 6. Prov ides a Baudo t Lette rs Shi ft on recei pt of ASC II "RUBOUT" or "UNDERSCORE". 7. Provides a Baudot Figures Shift on receipt of ASC II "UP ARROW" or"""'". 8. Provides for direct throughput of ASC II code. 9. Provides 3-state buffered data outputs for data bus applications. 10. Easy interfa ce to the UT-4. Functional Descriptio n Parallel form at ASC II data is appl ied to inputs (address lines) of 8223/74188 PROMs U4, US and U6. Note tha t only bits 1 through 5 are used fo r addressing the PROMs. Bits 6 an d 7 are applied to 2-line to 4-line decoder U7. The binary state of bits 6 and 7 arc decoded by U7 to provide an enable signal to pin 1S o f the appropriate PROM. Decoding of ASCI I bits 6 and 7 is 90

arranged by means of U2B so that both upper and lower case ASCII alphabet wi ll be co n ver ted to the equivalent Baudot character. PROM output data (in Baudot code) bits 1 through S from al l three chi ps are "wireor'd" and applied to 3-state buffer U8. If U8 pins 1 and 15 are both low, data from the selected PROM passes t hrough U8 and appears at the output of the converter. Simultaneously with the appearance of ASC II da ta at the inputs of the PROMs, t he keyboard strobe signal is app lied to Ul A. Ul A and B provi de a total strobe delay of approximately 7 microseconds. At the end of this delay period, t he strobe signal appears at the output of U2A. When the ABC-1 is connected to a Fl FO such as in the UT-4, the delayed keyboard strobe signal causes a "shift in " signal to be applied to FIFO pi n 17. Because the data at the output of ABC-1 chip U8 is already present at the FIFO data inputs, this data is entered into t he F IFO as a parallel format Baudot character.

The preceding paragraphs describe what happens in the converter when no case shift is required. Let us say that the character converted in th e pr·evious examp le was the character "R". Let us now assume that t he next ASCI I character from the keyboard is a period. Conversion of this character to Baudot code requi res that it be preceded by a F IGS shift character. The states of bits 6 and 7 in the ASC II period character cause PROM U6 to be selected for punctuation characters (numeral co nversion also takes place in this PROM). PROM U6 output bits 6 and 7 are Low and High respectively for a period character and are applied to the case shift detector latch U9A,B where pin 12 of U9A was Low for the previous character R. Bit 7 is High and so has no effect on the latch. Bit 6 is Low, causing U9A,B to change state, and pin 12 goes High. This Low to High transition is applied to input Bl of 1-shot Ul OA, generating a 6-microsccond wide FIGS shift gate at UlOA pin 4. This gate performs three functions. It inhi bits U8, causing U8 outputs to revert to t he 3rd (high impedance) state, and because of the cu rrent sources through R21-R25, U8 output bits Bl , 2, 4, 5 go High. Bit 3 goes Low because of the inverted (Low) output of U2C which is the seco nd function of the FIGS shift gate. The 3rd function of this gate is to generate a "Case Shift Strobe" pulse by means of U3A,B and U2A. This strobe is delayed 2 microseconds by U3A, permitting the parallel data at U8 output (bi ts 1, 2, 4, 5 High and bit 3 Low= Baudot FIGS shi ft) to settle to a static conditi on before being entered into the FIFO by the strobe signal. So far, approx imately six microseconds have elapsed si nce the ASC II data and strobe for the ASCII character "period" appeared at the input to the converter. At the end of the 6 microseconds, U8 is enabled, and U2C output retu rns to a high level. At this time the Bau dot character for period (Bl, 2 = Low, B3, 4, 5 = High) is present at the output of U8. One microsecond later the delaye d (7 microsecond) keyboard strobe from Ul B appears at U2A pin 11 and now the Baudot period character is e nte red into the Fl FO. Generation o f a LETTE RS shi ft character in Ul OB is similar to the foregoing except that U2C ou tput remains High (U8 ou t puts Bl through B5 are all Hi gh). Thus it is apparent that all normally converted characte rs arc delayed by seven microseconds within the converter before being strobed into th e FIFO. If a case sh ift ch---]-

E 80(1') F >---;-- 87 H 86 I >----l- 05 2 >----l-B 4 3 >---l--03

>----!-

FROM ABC-I OUTPUT

: 00:-----------+-4 4 >----!- 82 L____1 J- - - - - --- - -~ 5 >-/Bl

:

L-----"

~~~

7

--

1

>-t-F~1R~CI I OUTPUT I L _ ____ _

~~ -T-X

~

I

r--+ - -- - - ~-- - ,

r-1-\