This is only a preview of the April 1994 issue of Silicon Chip. You can view 28 of the 96 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Items relevant to "Remote Control Extender For VCRs":
Items relevant to "Sound & Lights For Level Crossings":
Items relevant to "Discrete Dual Supply Voltage Regulator":
Items relevant to "Low-Noise Universal Stereo Preamplifier":
|
Review: PICSTART Development System
Microcontrollers with
speed: the new PIC series
The new PIC-series microcontrollers from
Microchip Corporation use new RISC
architecture which contain as little as 33
instructions. We review these microcontrollers &
the new PICSTART development system.
By DARREN YATES
Microcontrollers have taken off in
the last few years or so, yet the internal
structure of most of them is based on
the 8-bit microprocessor system that
dates back to the days of the Z-80.
At the moment, there would hardly
be a semiconductor house that doesn’t
manufacture at least one micro
controller. And most have at least a
dozen or more in their range. Looking
through the databooks, many are simply variations on the same theme with
maybe just extra I/O ports.
The PIC series from Microchip are
radically different from the rest of the
pack because of the RISC (reduced
instruction set) architecture.
There are only 33 instructions in
the most basic unit but because each
instruction is 12 bits wide, it gives
each instruction a much greater degree of flexibility. What’s more, all
instructions are single- or two-clock
cycle, with most being one clock cycle.
This makes time-related programming
much simpler than most of the standard 8-bit controllers.
The RISC architecture also enables
PICs to run very fast. In fact, they can
operate at up to 20MHz yet they are
still low power devices. At 4MHz,
the current consumption is less than
2mA at 5V and only a tiny 15µA at
3V for 32kHz operation, making them
This is the initial screen displayed by the MPSTART system. This menu-driven
package is used to program most of the PIC series microcontrollers.
36 Silicon Chip
ideal for extended battery operation.
Further, there are extra features to
improve power consumption performance, including sleep modes and
low-power clock oscillators. They are
also guaranteed to operate down to
2.5V supply.
Each device has on-board EPROM
memory varying from 512 bytes to 2Kb
for program storage, as well as between
25 and 72 8-bit registers for general
use. There is also a code protection
fuse which can be blown once final
code has been programmed in. One of
the most useful programming features
is the inclusion of an 8-bit real time
clock\counter with a programmable
prescaler. This makes it easy to program the device to work as some clock
type function.
There are two main families of PICs
– the PIC16CXX and PIC17CXX series
which are tailored for different applications but all with the high-speed
RISC system.
PIC16C5X series
The basic PIC series is the
PIC16C54/5/6/7. The PIC16C54 is
the simplest and smallest, and comes
housed in an 18-pin DIP package, either ceramic or plastic. You can also
get it in surface mount. It has 512 bytes
of 12-bit EPROM, 32 bytes x 8 bit RAM
and 12 I/O lines.
The PIC16C55 is the same as the
above 16C54 but with 20 I/O lines.
It comes in a 28-pin package. The
PIC16C56 is also based on the ’54 but
with 1Kb of EPROM. The top of the
range PIC15C57 has 2Kb of EPROM,
80 bytes of RAM and 20 I/O lines. For
most applications, this makes the PIC
the ideal single-chip computer since
there is no external memory or driver
hardware required.
In all PICs, the RAM is individu-
The PICSTART Development System comes with two manuals: the complete
Microchip Databook & the Embedded Controller Handbook.
ally addressable when programming
whereas the EPROM is addressable
in 512-byte pages. The I/O lines are
banked in groups of eight so that they
can be read as either single inputs or
as a byte from say an 8-bit analog to
digital converter (ADC).
For mass production, the 16CXX series is available in erasable-UV form as
well as OTP (one time programmable)
for code protection once the device is
in the marketplace.
Second generation PICs
The PIC16C71 is the start of the second generation of PIC microcontrollers
which include 14-bit wide instruction
sets and only 35 instructions. What
sets this apart is the on-board 8-bit
ADC.
This ADC has four multiplexed
analog inputs, sample and hold, 20µs/
channel conversion time and an external reference input. Accuracy is
quoted at ±1 LSB.
The PIC16C71 also has 1Kb x 14-bit
EPROM, 16MHz clock speed, 13 I/O
lines (each with individual direction
control) and an external interrupt pin.
All this is in a package that only has
18 pins. The has been achieved by
multiplexing most of the pins to perform two functions. Depending upon
the instruction, the pins are set to act
as either inputs or outputs.
The I/O pins are capable of sinking
and sourcing up to 20mA, which
reduces the need for external drivers
and helps to reduce the design cost.
Power consumption for the ’71 is
basically the same as the PIC16CXX
series with slightly more current
consumed with the ADC in operation.
Other 16CXX series features such as
power saving sleep mode, 8-bit real
time clock/counter, power-on reset
and watchdog timer are also included.
The watchdog timer is basically a
free-running RC oscillator which has
a nominal timeout period of 18ms but
can be prescaled with a division ratio
of up to 1:128 to produce a period of
2.5 seconds. Once the timer has timed
out, it generates a RESET condition
which can be used in programming
to either reset the device or branch to
another section of code.
PIC16C84
All of the devices so far have used
an EPROM which is UV-erasable. The
16C84 differs in that it contains a 1Kb
x 14-bit electrically erasable PROM for
program and a 64 byte EEPROM data
memory. This could be used for entering external data which changes from
device to device while the program
code remains unchanged.
It operates down to 2V and has a
standby current consumption of less
than 1µA. The package is an 18-pin
outline with 13 I/O lines, capable of
25mA sinking and 20mA sourcing current. Maximum speed is 10MHz with
a 400ns instruction cycle. Program
interrupts are available from one of
four sources – the external INT pin,
real time clock overflow, toggling of
one of the I/O lines and filling of the
data EEPROM.
The PIC17CXX series
The PIC17C42 represents the latest
step in RISC microcontroller design
with 16-bit wide instruction at up to
25MHz clock speed. What makes this
device different is that it has four modes
of operation: standard microcontroller
mode, secure microcontroller mode,
extended microcontroller mode with
both internal and external program
access, and microprocessor mode with
external program access only.
The 17C42 has 2Kb of 16-bit EPROM
for internal stored programs or it can
address a maximum of 64Kb x 16
memory space outside.
In standard microcontroller mode,
the 17C42 allows only internal program execution so that only the onboard 2Kb EPROM memory can be
April 1994 37
Protect your valuable issues
Silicon Chip Binders
These beautifully-made binders
will protect your copies of SILICON
CHIP. They feature heavy-board
covers & are made from a dis
tinctive 2-tone green vinyl. They
hold up to 14 issues & will look
great on your bookshelf.
★ High quality
★ Hold up to 14 issues
★ 80mm internal width
★ SILICON CHIP logo printed in
gold-coloured lettering on spine
& cover
Price: $A14.95 (includes postage
in Australia). NZ & PNG orders
please add $A5 each for postage.
Not available elsewhere.
Silicon Chip Publications
PO Box 139
Collaroy Beach 2097
Or fax (02) 979 6503; or ring (02)
979 5644 & quote your credit card
number.
➦
Use this handy form
Enclosed is my cheque/money order for
$________ or please debit my
❏ Bankcard ❏ Visa ❏ Mastercard
Card No:
______________________________
Card Expiry Date ____/____
Signature ________________________
Name ___________________________
Address__________________________
__________________ P/code_______
38 Silicon Chip
used. Secure mode incorporates code
and write protection so that your
program code cannot be overwritten
or copied.
Extended mode allows the inclusion of external memory above 2Kb
(between 2Kb and 64Kb) and the use
of the internal EPROM below 2Kb. In
microprocessor mode, the entire 64Kb
memory is mapped externally and the
internal EPROM cannot be used.
Other features of the 17C42 include
two high-speed pulse-width-modulation outputs with 10-bit resolution and
15.6kHz speed. These could easily be
used with say an H-pack output drive
circuit in part of a switching power
supply, for example. There are 232 x
8-bit general SRAM registers and up
to 33 I/O lines.
As with the other PICs available, it
also has a watchdog timer with its own
internal RC oscillator as well as three
16-bit timer/counters. For those who
require external control, there are 11
external/internal interrupts available
as well.
One of the more unusual features
is the fully featured serial port (USART) which includes a baud rate
generator. This can be configured
for either full-duplex asynchronous
or half-duplex clocked synchronous
mode. An 8-bit dedicated baud rate
generator which can be programmed
is also included.
Development system
To help the PIC push into the marketplace, Microchip have come up
with the PICSTART – a microcontroller
development system which mates
with any IBM AT. It contains a small PC
board which has a connector for your
serial port and a zero-force-insertion
(ZIF) socket. As part of the system,
the software package includes a PIC
device programmer called MPSTART;
the MPALC Microchip PIC Assembly
Language Compiler; and MPSIM, a PIC
simulator.
All software supports the PIC16C54
to 84 devices and can be run on any
PC with the following requirements:
(1) 1.44Mb drive; (2) hard disc drive;
(3) serial port; (4) 640Kb RAM; and (5)
DOS 3.3 or higher.
A text editor, VGA screen and mouse
are highly recommended but not mandatory. The PC board requires a 9VDC
250mA power supply which can quite
easily come from a 9VDC plug pack.
The board is quite small at just 117
x 76mm and you also get two sample
PICs to play with.
All programs run under DOS and
do not require Windows which is
a great idea. The programmer, MP
START, is activated simply by typing
MPSTART<enter>. It’s a menu-driven
package which automatically sets up
the link between the PC board and the
computer and warns you when the
connection isn’t made, for example,
if the power supply is not connected.
It has context-sensitive on-line help
in case you get into trouble at any
stage, as well as normal file handling
facilities. The program is completely
menu-driven so you don’t have to
remember any fancy command calls.
MPALC
The assembler, MPALC, is a command line driven program which requires your source code to be already
in an ASCII format file. To assemble
code, you simply add in the source
code file
name and the destination
filename of the compiled code plus a
number of option directives.
For example, the /P option allows
you to compile code for a specific device. Thus, “/P 16C54” would compile
code specifically for the PIC16C54
controller.
MPSIM
The MPSIM simulator, which also
runs from DOS, allows you to test
program files by loading them into
the simulator and checking the various registers and ports to check the
program’s correctness.
Programs can be tested by either
single command stepping or execution
up to a certain command or address
in EPROM. Register values are maintained on-screen at all times.
Overall, the PIC-series of micro
controllers represent a big step forward
in microcontroller design. They feature high speed and low cost in terms
of both code development time and
production. Watch out for the PICs to
make big waves in the microcontroller
industry.
The PICSTART system also includes
two manuals: the complete Microchip
Databook and the Embedded Controller Handbook. The PICSTART is
available from NSD Australia for the
bargain price of just $250, which is
peanuts compared to many other development systems. You can contact
SC
them on Sydney (02) 898 0133.
|