Hello again, folks
Here's January! We can see the light
at the end of the tunnel now. Our
various toys seem to be humming right
along, and will probably continue to do
so until they break (now there's a
logical statement). As a matter of
distinct fact, if you'll look up at. the
CLOAD logotype in the upper right
corner, you'll see a blot right after
the word "magazine". That's an "inc."
blot, As of January first, it's CLOAD
Magazine, Inc. We have managed, with
hard work and understanding subscribers, to arrive at
it's appropriate to shift from the "garage operation"
to the club of True Capitalists,
garage in the process...
that point where
form and move up
If only we could move out of the
The Peripheral People (Box 524, Mercer Island, WA 98040) have
announced Yet Another Upper/Lower Case Conversion. Theirs has,
however, an Interesting Twist. First, it is switchable, so you can
return to the "normal" configuration easily. Second, all of the parts
come from your local Radio Shack (RS catalog numbers are included) .
And third, the associated word processing software (the Electric
Secretary) has a hyphenating dictionary. Bad news first: the
disadvantage of this last point is that to use it, you must have a
disk system. To explain the advantage of a hyphenating dictionary, we
must first describe a word processor.
a wore processor
writes text by typinq
keeps a copy of the
control, the memory c
the printer, the w
and carriage returns
insert a phrase in th
the lines "come out r
paragraph will appear-
Most people like fo
is a system where the writer (f'ri
it all up on a computer screen. Th
text in memory and/or on disk and und
ontents are sent to the printer. On t
ord processor software inserts and del
to "even up" the text. This allows th
e middle of a page without worrying ab
ight". This editorial is being writte
(confession - not a TRS-80). This
in the text that you read as "right
r the text to be laid out like this, b
he way to
e writer to
n on a word
ut I don't.
So I just turned it off. What a hyphenating dictionary does is
make the software more capable of handling this particular trick.
Suppose the right margin occurs smack in the center of a word like
"montmorillonite". It's too long to put on the current line, and if
it's put off to the next line, the current line is spaced just about
like this. A hyphenating dictionary allows the
computer to look the word up, and cut it into two pieces at a "legal"
Fine. Now what I'd like to see is an auxilliary program called
"spel" which looks up each word in a chunk of text, and prints out all
words it can't find, so the spelling can be checked.
By the way, for those of you who might recognize the Peripheral
People's address, they used to be CLOAD House.
A software tip for you level Il'ers who want to run a program
without changing the value of the variables already computed: Try GOTO
10 (or wherever) . When you type RUN or RUN nn the computer first
resets all variable space to zero. There are times when this is a
For those of you with disk systems, there has been a hardware hug
crawling around causing I/O errors . Turns out that there is a
hardware "data holder" whose duty it is to hold data coming off the
disk for up to 80 microseconds. Fine. There is also a heartbeat
interrupt which will occasionally stop the central processor from its
appointed rounds for up to 900 microseconds. So we have the possible
conflict of a heartbeat going flubadub in the middle of a data access,
getting the disk controller all upset over inattention, and routing
the data to the bit bucket. There are two fixes available,, Number
one is to tell the software to keep on trying... POKE 16553,255 :
DEFINT I, J : FOR 1=0 TO 7 : READ J : POKE 18104+1, J : NEXT I : DATA
203,87,32,19,254,32,40,17 Chop this up into whatever your style is in
line numbers, and execute it once at the beginning of your program.
This puts a machine language patch in Disc BASIC, giving it the word
to try again if there is an error. It is still (remotely) possible to
have a case of discular fibrillation, though, and the only recourse
short of drastic open-case surgery is to momentarily suspend the
heartbeat immediately before each disk access. How? POKE 18075,243
prior to the first disk access. This instructs the Z-80 central
processor to stop listening to the heartbeats while playing with the
disk. The disadvantage of this technique is that the real time clock,
like Galileo, uses the heartbeat as a time standard. Continued heart
stoppages lead to a lethargic clock, possibly several minutes a day.
Rumors mongered here:
Tandy Corp appears to be making a parallel printer interface and an
RS--232 serial interface that will not need the expansion interface.
This month, for our hardware talk, I'd like to start things off
with the information that yes, indeed, the 8255 chip is sold by Radio
Shack (catalog number 276-2555, price $9.95). A crazed but enthusias-
tic Tandy supporter broke into our international headquarters, beat me
severely about the head and shoulders with the jawbone of a used
computer salesman, and informed me of my error. 'Scuse me. One
logical common place we all know about is the local Radio Shack store,
so I'll try to use their parts as much as possible (I don't own any RS
stock, honest) .
Next I'd like to introduce the concept of voltage. Voltage, by
definition, is what a flashlight battery has 1.5 of (stop moaning, you
purists). It comes in two varieties, positive and negative. We
connect the negative side of our voltage supply to "ground" and forget
about it. When we speak of a point in a circuit having 5 volts, we
are really saying that the electrical force between that point and
"ground" is 5 volts. It turns out that nowadays the main power supply
voltage is this single value - not long ago it was three separate
supplies, but we'll get into that. Ground, for those interested,
refers to the most common point in the circuit. If the enclosure of
the circuit is made of metal, it is usually the ground connection.
All chips have one pin which must be connected to ground, partly
because ground is one of the power connections, and partly to act as a
At this point, I should put in a pitch for Ohm's Law. It is the
one which summarizes the relationship between voltage, current and
resistance. A working understanding of these three entities is the
basis for the field of electronics. Those who do not already know
this relationship should consult a basic electronics book before
actually getting" to the point of building something. For this
discussion we will use voltage almost exclusively, and resistance and
current will have to shift for themselves. We won't get overly
concerned about them at first.
There are five voltage levels which we are interested in. Tne
first, is (nominally) 5 volts. This is the main power source for the
various chips. The maximum value for this supply is 5.25 volts; the
minimum is 4.75. If the power supply is outside of this range, the
circuit might not work. The rest of the voltage levels all refer to
signal levels. Starting at the low end, we have .5 volts. This is
the upper limit for a logical "0" or "low" at any output pin of a chip
(74LS type outputs, for you purists). The next voltage level is .8
volts. This level is the highest that any input pin is guaranteed to
accept as a logical / low. We now look at the high side. 2.0 volts
Is the lowest voltage that any input pin is guaranteed to accept as a
Logical 1 / hi . 2.8 volts is the' lowest voltage that any qutput pin
will transmit for a logical 1 / hi.
These signal levels can be summarized as follows:
Now I'd like to discuss the philosophy of Power On Clear (POC) .
When starting up a system which is hooked up to motors, pumps, valves
and such, the general desirability is to apply power and have the
system "wait" in a relatively docile mode while the computer program
is being loaded. Example - if there is a valve controlling a gasoline
supply, it should start up in the closed position, and remain closed
until actively commanded to open. When the controller (that's what
we're hypothetically building) is turned on, the TRS-80 hooked into it
may or may not be ready to start control, and the power circuitry to
applied to our controller, we will let this pin go "high" (anything
between 2.8 and 5 volts will do). After a sufficient amount of time
has passed to allow the circuitry to stabilize, this pin is pulled
"low" (anything between and .8 volts) and the 8255 is now in its
initial state - all registers cleared, and all ports in the "input"
mode. Note that this does not insure that the whole project is
properly initialized - each subsystem must still .'be considered, and if
there is a "dangerous" mode of operation (to you or it) , some form of
initialization is required.
Why all this palaver? Isn't it enough to simply steer clear of
dangerous applications? Well, I'll concede that not too many of our
subscribers will be controlling bombs with their computers, but even
fairly simple ideas, like door and window management in a house, have
aspects which are uncomfortable if not actually dangerous. So you get
one more paragraph on the subject, entitled "Fail Safe".
In any mechanism or system, there are three general categories of
operation. One, working correctly. Two, working incorrectly. Trree,
not working at all. All systems that are presently in category ore-
have a finite chance of becoming category two or category three
systems. Sometimes it doesn't make much difference which way they go
( f ' r instance your TRS-80). Sometimes it is important for them to
continue to work, even if incorrectly (lights over an operating table)
and sometimes it is important for them to stop completely (nuclear
reactors). In these last two cases, the designer must take steps to
assure that they fail in the "safe" category - thus the name. Note
that we are not talking of preventing failure - we are assuming
failure is inevitable. How do we accomplish this controlled failiie?
Let's say we are controlling a motor and we are concerned that out
computer might have a heart attack and die after turning the mctoi on.
Let's also say that, upon system failure, we want this motor off. We
might design the switch circuit that turned the motor on such that it
only turned it on for one second. Our program would then have to keep
turning it on - at least once a second. If the computer dies, the
motor gets no more commands. Suppose we're really paranoid about it -
we could have two switch circuits and wire them such that they both
have to be on to turn the motor on. If either one fails in the off
direction, the motor turns off. If either one jams in the on
direction, the other one controls the motor. How about both switches
si mi; I tanec ,;sly jamming on? Suppose each switch has a one in one
tncasj.no cnance of failing on a given day. Two switches would then
have a one in one million chance of failing simultaneously on a given
day. Three switches? One in a billion. It gets expensive sometimes,
and reliability suffers (fail safe designs fail more often), but
there's little excuse for a failure to do serious damage.
The 8255 spec sheet promised this week has been canceled due to its
availability at Radio Shack (it comes with the chip - 12 pages' worth)
and the local shortage of paper for my own form of yellow journalism.
The circuit schematic that was to have replaced it has been postponed
until I can verify that the circuit works. There is also a fair
amount of local pressure to finish this so we can get the January
issue out - February is starting to roll off the duplicator, and I'm
beginning to wonder if they'll ever unchain me from this desk.
"Next Week" ,