
-October
2008-
-Coin
Cell-Powered Embedded Design
By Tom Cantrell,
author of Circuit Cellar’s “Silicon
Update”
With the kids growing up and moving on, my
wife and I are starting to think about moving to a smaller place. Smaller, that is, in terms of bedrooms. I’ll give them up to
get some more square feet for my work and play.
Yeah, the real estate market isn’t so hot
right now. But it will take a long time to get this place squared away for an
open house. To that end, we may as well get started by doing some organization
in preparation for an ultimate move.
Got
sidetracked going through some old boxes in the garage. This is
stuff that got boxed up the last time we moved and I never got around to
unboxing it for lack of space.
Oh my, what have we here (see Photo 1)? Talk
about a flash from the past. It’s my first computer, a mid-1970s IMSAI 8080.
Dragging it into the office, I sat on the floor caressing the switches and was
taken back.
Photo 1—Digging
through the past in my garage, I found a long-lost friend.

WILL
WORK FOR COMPUTER
Actually, I was into computers before the
IMSAI. But that’s “Computers” with a capital “C,” as in the mythical
“mainframes” of yore. I well remember my first computer experience as a student
at the University of California, Los Angeles, writing programs that ran on the
campus’s then state-of-the-art IBM 360/91 (see Photo 2). These days, that once
mighty “mainframe” couldn’t keep up with a Sony PlayStation, but back then it
was a big deal. Indeed, it was such a big deal that it was kept hidden behind
locked doors and mere undergraduates were never allowed near it.
Photo 2—I guess
you could call the IBM 360/91 a “Personal Computer,” but only if you were
among the privileged few like these engineers at NASA. (Source: Frank da
Cruz, Columbia University Computing History, www.columbia.edu/acis/history/36091.html)

Instead, you’d type your program onto punch
cards (careful, no backspace key—and watch out for the infamous “hanging chads”)
and run it through the mechanical marvel card reader. Some time later, a bunch
of paper would come spewing out of a slot in the wall, usually an
incomprehensible “core dump” mocking your feeble attempts at telling this
megabuck machine what to do. For all I knew, the whole scenario could have been
some kind of perverted Turing test. Maybe it wasn’t really a computer behind
the slot, but a gaggle of giggling grad students sticking it to the scrubs.
I still remember the frustration I felt
sitting on the steps of the computer center, trying to figure out why my bubble
sort didn’t. I was pretty handy as a lad, fixing my car and such. I thought:
Why, if only I could get “hands-on” and “under-the-hood” with the computer,
then I’d have a chance of really understanding what’s going on and showing it who’s boss.
It was right around this time (i.e.,
mid-1970s) that the microprocessor was being born. Although preceded by lesser
“calculator” chips, it was the circa-1974 Intel 8080 that was the first
“computer on a chip” with enough smarts to inspire the concept of a “Personal
Computer.”
I don’t remember when I first became aware of
the possibility of actually acquiring my own “PC.” Certainly, by the time the
Micro Instrumentation and Telemetry Systems (MITS) Altair
8800 was introduced in 1975, the prospect became real (www.pc-history.org/altair.htm).
It wasn’t long before I found myself at The Computer Store
(www.mactech.com:16080/articles/mactech/Vol.02/02.04/Apr86History/) in Santa
Monica, CA, where I lost my virginity and actually touched a computer for the
first time.
Talk about love and lust—man, I needed it
bad! But believe it or not, the $400 to $500 or so it cost for an Altair kit
was a showstopper for this typical semi-starving student. Don’t laugh. My handy
inflation calculator informs me that $500 in 1975 would be approximately $2,000
today. And remember, that was just a “starter kit” that included only the box
and a CPU board. You still had to pay as much again or more to get some memory
(each RAM board held a whopping 8 KB comprising 64 1Kx1 RAM chips), a keyboard
and screen, and putting it charitably, “mass storage” in the form of a cassette
tape interface.
Undaunted, I approached the problem strategically.
You want fresh eggs, get a job on a farm. So, next
thing you know, I leveraged my “mainframe expertise” into a part-time job at a
local Byte Shop computer store (see Photo 3). Read about how the Byte Shop
franchise founder Paul Terrell played a pivotal role in the birth of a little
garage shop, one called Apple Computer, that might
still be in a garage but for his willingness to back their hand
(http://en.wikipedia.org/wiki/Paul_Terrell). It was all happening fast and
furious then.
Photo 3—Here is
the Byte Shop in Mountain View, CA, where the first 50 Apple-I computers
were sold in the mid-1970s. (Source: Dvorak Uncensored, www.dvorak.org/blog/?page_id=7678)

DISCO
AND DIGITAL
Eventually, by taking money out of each
paycheck, I finally had my own computer. The IMSAI 8080 was a second-generation
PC quite similar to the Altair 8800, but with improvements such as a fancier
front panel and a bigger power supply (www.computercloset.org/IMSAI8080.htm).
Best of all, it had a 22-slot motherboard, so the only limit to expansion was
your imagination and your bank account.
Before building the kit, I kind of knew how
to solder. Thousands of connections later (2,200 for the motherboard alone), I
really knew how. Amazingly, I don’t recall having much trouble getting the
IMSAI working, something that can’t be said of subsequent projects over the
years. Of course, while other young folks were “Shaking Their Booties” in a
1970’s gas line, I was consumed with all things digital, and debugging was just
part of the 24/7 love affair.
I have a friend who actually worked for IMSAI
(i.e., IMS Associates) way back when. He relates heady times under the
leadership of founder Bill Millard, who was into then-new-age ways of thinking
such as Erhard Seminars Training (EST)
(http://en.wikipedia.org/wiki/Erhard_Seminars_Training). Needless to say,
things got pretty wacky, and it wasn’t long before IMSAI went bankrupt in 1979.
As an aside, the smoking rubble was purchased by a couple of employees, Thomas
Fischer and Nancy Freitas. Fischer-Freitas still tends to the legacy over at
www.imsai.net.
Undaunted by the failure of IMSAI, the
irrepressible Millard went on to found his own computer retail chain
ComputerLand, which ultimately made him a rich man. Later, he lost a bunch of
the money to lawyers and lawsuits, dropped out (Millard moved to Saipan), and
left it all, including the legacy of IMSAI, behind. Like I said, it was all
happening fast and furious then.
SMOKE
TEST
Coming out of the clouds and deposited safely
back on my office floor, I knew what I had to do. Time for a smoke test!
I’ll admit to a bit of trepidation. Not only
is this stuff 30-plus years old, I can’t remember the last time I fired it up
(certainly before the turn of the century). The IMSAI had been in a deep sleep
for a long time, and I was thinking it might not be real happy getting a
120-VAC wake-up call. And what finally happens to really old chips, do they die
or just fade away or what? I wasn’t even sure exactly what I was dealing with,
because by the time the IMSAI was put to rest, it had repeatedly been upgraded
from the stock configuration.
It all came back when I popped the hood (see
Photo 4). OK, somewhere in another box there are some 8 floppy drives and hopefully a keyboard and CRT. If and
when I find them, I’ll definitely let you know what happens. For now, it was
time to let there be (LED) light.
Photo 4—Awoken
from a deep sleep, these S-100 boards stand ready to be called to duty once
again. From front to back: a Z80 CPU board, two 32-KB SRAM memory boards,
an 8² floppy disk controller, a keyboard/display board, and,
bringing up the rear, an old-school terminator.

That big “boat anchor” (i.e., linear) power
supply was always really scary. Those capacitors look a lot like hand grenades
and 28 A is nothing to sneeze at. So I stood well back as I hit the ON switch.
The fan turned over and the front panel sparked to life and, best of all, no
pyrotechnics.
Seemingly on their own, my fingers remembered
the old riffs and flew over the switches. I didn’t have a moment’s hesitation
toggling in a short test program, just as I must have the day the IMSAI was
born. Holding my breath as I hit the SINGLE-STEP switch, I actually laughed for
joy as my old friend faithfully did my bidding once again (see Photo 5).
Photo 5—Reliving
its youth, the IMSAI runs a test program (DB, FF, D3, FF, C3, 00, 00 if
you’re interested) that reads the input switches (eight switches on the
lower left) and writes the data (inverted by the hardware) to the output
LEDs (top left).

The rush I felt all those years ago came
back. I am totally in charge of this computer. It may not be able to do much,
but it will do exactly what I tell it to do, nothing more and nothing less. I
reflected how today’s PC seems evermore insular and removed, indeed like the
mainframes of old, with faceless others’s software and servers in charge.
OLD
TIMEY MUSIC
It would be easy to fall into the
“good-ol’-days” trap. But the truth is, by modern standards, the IMSAI could
barely compute its way out of a paper bag. My kilobuck one-hit-wonder of the
1970s has the brainpower of today’s $1 MCU.
Even though I’m more into “embedded” than
“computers” these days, the lessons of the past still resonate. For instance,
I’ve recently been looking at Altium’s Innovation Station for an upcoming
column (see Photo 6). It’s a tool that gives designers total visibility and
control, just as the IMSAI did, only on the much grander scale of today’s
software and silicon.
Photo 6—The “good old days” were indeed good, but captivating
gear like this Altium Innovation Station shows these days are even better.

I won’t say the feelings are as intense as
they were in my youth. After all, can anything replace your first romance? But
while playing with the “Innovation Station,” I was reminded of why I love this
business. The real lesson? When you find your muse,
whether it has switches and LEDs or a fancy LCD touchscreen, follow.
It was all happening fast and furious
then—and it still is.
Tom Cantrell has been working on chip,
board, and systems design and marketing for several years. His column “Silicon
Update” is published monthly in Circuit Cellar’s print magazine. You may reach
him by e-mail at tom.cantrell@circuitcellar.com.
![]()
-Advertisement-Return to the fundamentals of computers and computer
programming with the Retro computer system from Multilabs. The 8-bit
microcomputer with a built-in BASIC language interpreter and minimal
operating system has been reborn. Take a journey back with Retro and bring
it into your future. www.multilabs.net

![]()
Coin Cell-Powered
Embedded Design
Low-power
design techniques
Students and electronics enthusiasts alike should make
use of this complete book download, made available at no cost to Circuit Cellar News Notes subscribers by
author John Peatman.
Readers learn to develop application code in C while
attempting to minimize average coin-cell current draw. For readers new to C
programming, the book offers a series of template programs written in C that
provides a jumping off point for further lab projects. And the intrinsic
creative opportunities of lab projects offer plenty of interest to those
students who are already comfortable writing code in C.
-Click here to download the full book in PDF format
Chris Paiano – Author of Circuit Cellar Article Series “PSoC Design Techniques” (Circuit
Cellar 216 and 217).
CIRCUIT
CELLAR:
You call yourself “a child of the eighties.” Tell us more about yourself and
your engineering background.
PAIANO: I live in
Elko, Nevada. I grew up on video games and computers. Most of my favorite games
were on computers (Apple II, Commodore 64, IBM PC/XT)
before and during the big Nintendo/console gaming boom. My father always made
sure I had a computer since I was two years old. As an electronics guy, he
recognized the future of computers. All I had to do was figure out how to
set up and run these games on the various operating systems—thereby providing
motivation to learn how to get computers to do what I wanted.
This eventually led me to programming. I like
open-source applications and games since I can directly modify these to suit my
purposes without having to resort to untidy hacks or starting from
scratch. However, creating a new application or game from scratch because it’s never been done is even
better.
That being said, I’ve always found
computer-related work in one way or another. Since the age of 14, I’ve
made local house calls as a computer consultant. My work experience varies
widely from there: 3-D modeling, immersive military simulation,
tactile/“haptic” feedback, animatronics, kiosks, web pages, closed-loop control
systems/servo applications, etc.
Currently, I make a living as a freelance
R&D engineer. Two notable past iPod projects are now available in
retail stores as Griffin Technology’s iTalkPro voice recorder and the iKaraoke.
I will typically use a PSoC microcontroller (or multiple PSoCs) to handle
engineering tasks as it offers me the largest flexibility to begin with (and
also results in rapid conceptual prototyping). Then, if a different
microprocessor or external active component is needed for some reason or
another, I will implement that in the next prototype.
I have an R&D lab set up in my home. I
run a very small and green company. I rarely have to drive anywhere but
the occasional grocery store. Even those trips will be green in the near
future, as I continue development on my electric vehicle retrofits—using my
fleet of Subarus as test beds. (I have three first-generation Subaru Legacy
Sport sedans, all turbocharged boxer engines with AWD, and I have plans for
them beyond their current grocery-getting duties.)
CIRCUIT CELLAR: How long have you been reading Circuit
Cellar?
PAIANO: I started
in the early 1990s, and have used Circuit
Cellar as reference (and inspiration) for most of my projects ever since.
Whenever I have a question about something technical, my library of Circuit Cellar magazines always provides
an answer.
CIRCUIT CELLAR: What was your first MCU-based design?
PAIANO: My first
MCU-based design was a universal direct replacement electric motor controller
for golf carts. Coincidentally, this was also my first PSoC project. It
consisted of a control PSoC that regulated current through an array of FETs to
the motor with a closed loop, which communicated via infrared (directed through
a fiber-optic cable) to a custom display application I wrote for the Palm
family of handheld PDAs. This Palm handheld could be mounted to the golf cart
dashboard or used for handheld diagnosis of the control unit. It would display
information such as throttle position, battery voltage, motor current,
tachometer reading, approximate speed in MPH, and any active errors. I had an
electric go-cart that I used as a development test bed for this project.
Testing was quite fun.
CIRCUIT CELLAR: You have a long history of working with Cypress Semiconductor’s PSoC.
How did it begin? Why the PSoC?
PAIANO: In the late
1990s, I read about a SoC—probably in Circuit
Cellar—that had analog and digital programmable/reconfigurable blocks. I
looked for it when I was hired to design a golf cart controller in 2000. I
wanted to standardize on an MCU and really get proficient working with it, in
order to simplify future project development.
The original CY8C26443 was quirky and a bit
buggy, but I learned how to make it do pretty much whatever I wanted. I ended
up writing several application notes that Cypress published; however, when they
released the CY8C27xxx and CY8C29xxx series, all of these old app notes
were removed for the phasing out of the CY8C26xxx chips. I’ve since updated a couple of these old notes to
the new family of chips, and I’ve written several other app notes that Cypress
has published on their site.
The PSoC has handled every project I’ve had
since then, from the Griffin iKaraoke and iTalkPro products to the no-touch/hand-wave
intercom system now being used in London for a lab performing otoacoustic
studies.
I’ve even turned a single PSoC into a full-on
game of Color Video Pong in one of my latest app notes for the CY8C29466
entitled “PongSoC.” This project was just for fun. I like to challenge myself
with new and interesting functions to attempt with a PSoC. It always
provides some inspiration for a future product. For the record, the PSoC can
indeed generate basic dots and rectangles and a corresponding composite video
signal without much difficulty (and minimal external components). I had
plans to implement a basic sprite system in a future PongSoC revision so other
types of games become possible (such as a side-scroller), but the attention my
application notes were getting gave me more profitable work to pursue
(Griffin/iPod accessory development).
The PSoC was also used to create some custom
devices for friends. Someone wanted his Jeep to play a certain sound clip when
the key is turned on and another sound clip when the key is turned
off. Another friend wanted a way to keep his television’s output volume
normalized so loud commercials would seem the same volume as the lower-volume
content (and not wake him up if he falls asleep with
the TV on). The PSoC handles this kind of thing with no problems, minimal
external component count, and minimal circuit design.
![]()
Problem:
When
designing a PCB with “1-oz. copper,” how wide should a trace intended to carry
1 A be? What else do you need to know in order to answer?
Think You Have a Great EQ Challenge of Your
Own?
E-mail your best EQ question and
answer to eq@circuitcellar.com. The best EQs will be published by
Circuit Cellar. Authors of the top four EQ picks will receive an Atmel
In-Circuit Emulator mk-II.* All published EQs will earn the author a
Certificate of Appreciation from Circuit Cellar.
Solution: PCB trace width
depends on how much voltage drop and temperature rise can be tolerated. Let’s
say that the trace is 10 cm long and you want no more than 10-mV voltage drop.
The
resistivity of solid copper is 1.7241 µW-cm. From this, you
can calculate the required cross-sectional area of the trace:
![]()
1
oz. per square foot corresponds to a copper thickness of 34 µm, or 0.0034 cm.
Therefore, the trace width should be:
Because
1 mil (0.001²) corresponds to 0.00254 cm, the trace should
be at least 200 mils (0.2²) wide. Such a trace
has about 1 mW per cm of length.
This
also corresponds to a power dissipation of roughly 2 mW/cm2.
In order to calculate temperature rise, it is necessary to know what the
effective thermal resistance to ambient (per unit area) is. This is affected by
many factors such as the orientation of the board (convective effects), the
presence of a fan or an enclosure, coatings on the copper (e.g., solder mask
and silkscreen), etc.
![]()
A Lighting System that Responds to Audio Stimuli
By
Matt Corne, Chad Harvey, William Hock, Benjamin Wolpoff, & David Wolpoff
With
a Luminary Micro LM3S828, this group of designers built an interactive coffee
table that responds to audio stimuli and produces flashy visual effects. The
design—which features 96 tricolor LEDs, five custom circuit boards, and four
electret microphones—generates a single color display or exciting lighting
effects. Be sure to read the full article in Circuit Cellar magazine’s upcoming
print issue #220.
*EQ award of Atmel
In-Circuit Emulator mk-II: recipient responsible for any applicable duties and
taxes. No cash alternative. Awards will be made at sole discretion of Circuit
Cellar editorial staff. By submitting an EQ Q&A, Circuit Cellar is granted
the right to publish the submitted material and the author’s name. Submissions
must be original (not published in print or online previously).
|
*EQ award of Atmel In-Circuit Emulator mk-II: recipient responsible for any applicable duties and taxes. No cash alternative. Awards will be made at sole discretion of Circuit Cellar editorial staff. By submitting an EQ Q&A, Circuit Cellar is granted the right to publish the submitted material and the author’s name. Submissions must be original (not published in print or online previously).