Issue
147 October 2002
12,
16, 18 Hike!
Dashing
for Flash
by
Jeff Bachiochi
Whether
you’re gearing up to participate in the Microchip
2002 design contest or getting ready to follow the
action from your favorite recliner, now is the perfect
time to tune in for Jeff’s pre-game analysis.
Start
PIC18F252
Instruction Set
Reset
Serial
Port
In-Circuit
Sources
& PDF
In
the past few issues while covering my SmartMedia project,
I’ve been talking about Microchip’s PIC18F252. I didn’t
spend much time discussing the processor then, but it’s
an apropos topic now that Circuit Cellar is kicking
off the Mad Dash for Flash Cash Microchip Design Contest
2002. In addition, to give you a leg up in the contest,
I’ll cover the rest of the Microchip product basics
in this article.
RISC-based
MPUs began like most with ROM parts for production and
EPROM-based parts for development. Although EPROM (windowed)
parts are erasable via UV, one-time programmable (OTP)
parts don’t have a window and cannot be erased even
though they’re conveniently user-programmable. For many
years, development was accomplished with expensive emulators
or blow-and-go, using slow-turnaround (erase time) EPROM-based
parts. Some frustrated engineer asked about using the
new EEPROM/ flash memory technology in a micro, allowing
it to be quickly erased electrically. Although the packaging
would not require the expense of a ceramic-windowed
part, using the part only for development would keep
volumes low and costs high. Because cost was of great
concern, it was deemed foolhardy to consider a flash
memory part for production use. After all, when the
code works, there’s no need for further tweaking and
higher costs for erasable parts.
Upgrading
a product with external program space consists of replacing
the code-bearing ROM/EPROM devices. Thanks to the companies
that used socketed parts, this replacement was easy
even though it was expensive. When a product used a
microprocessor with internal code, the costs were higher,
even if it was socketed. On the production line, it
took months to use up the old revision stock. This,
of course, would lead to unhappy customers further down
the road. In terms of inventory, there were advantages
to using a reprogrammable part in production, such as
the lack of waste and immediate revision updates without
the loss of stock.
Early
programmable parts required special voltages for the
programming process and high programming currents prevailed.
Although using internal voltage-boost converters hid
some of this, flash memory technology has now advanced
to the point where devices are fully reprogrammable
in-circuit, even using normal operating voltages. Today,
a product can be updated without having to remove the
processor from the circuit. In fact, many products that
are currently on the market can be updated through a
phone/cable/network connection.
DRIVING
DOWN COST
OK,
so it doesn’t start out that way. Investing in technology
costs money; however, when the long-term benefits outweigh
the costs, the end product’s cost can go down. For example,
take the PIC16C6x/7x, which is one of Microchip’s most
useful parts. It was redesigned using flash memory technology,
and now it sells for about half of the original OTP
part and one-third the cost of the EEPROM version. Essentially,
you’re getting a better part for a cheaper price.
From
day one, Microchip’s top priority was to keep future
products code-compatible. Their "seamless migration
path" objective is not an easy one to obtain. Even
though the word "seamless" probably originated
in Microchip’s marketing department, the engineering
department has obviously attempted to hold onto this
mantra with both hands.
LINE
’EM UP
The
product lineup began with 12-bit instruction products
using only 33 instructions (i.e., the 16C5x-series parts).
The industry’s first 8-pin micro also used this 12-bit
RISC instruction set, which is referred to as the 12-series.
(Remember asking yourself, "What good is a micro
with only six I/Os?")
New
devices bragged an increase in instructions to 35 with
an increase in instruction width to 14 bits and the
addition of interrupts. Reprogrammable parts began to
hit production (the PIC16C84) and simplify development.
Success triggered a natural progression toward a 16-bit
instruction set that used 58 instructions. As a result,
the 17-series was born.
C
compiler-optimized architectural enhancements gave rise
to the 18-series micros and an increase of the instruction
set to 77. Meanwhile, flash memory technology has been
applied to many devices in the 12-, 16-, and now 18-series
of micros.