|
Home Updates Prior Products - no longer available Documents Book Modulation Loads Lattice Crystal Filter IMD Measurements Using LP100 Coupler Prototyping Software Updates K2 Measurements Oscillator Noise Measurements Bypassing Capacitor Voltage Change K2 Freq Stability Cohn Crystal Filter Receiver AGC Curves K2 RX Sensitivity Canned Osc Phase Noise K2 Interface K2 Filter Surface Mount Assembly TL750L Low Dropout Regulator Swordfish DDS Swordfish GLCD Module Bessel Nulls AM Modulation Z10000 with FT-920 Z100 Tuning Aid Dayton 2007 Softrock Lite 6.2 Header Adapter Carbon Composition Resistors Thermometers Hakko FT-800 Thermal Wire Stripper Heat Sinks Diode Turn-On Time Bill Hewlett and his Magic Lamp Tektronix P6022 Current Probe 1N400x Diode Family Forward Voltage Temperature Chamber Diode Vf vs If Ferrite Transformers 6 dB Hybrid Combiner Type 43 Ferrite B-H Curve K3 IF Bandpass Filter Estimating Q of Ferrite Cores Z10000 Buffer Amp Z10010 Bandpass Filter Using Softrock as a Panadapter for the K2 Signal Generator Phase Noise & Elecraft K2 Audio Transformer Data and Modeling Measuring 60 Hz Frequency Compact Fluorescent Lamp Z10000-U Buffer Amp and FT-1000MP WJ-8617B Receiver Impressions Weather in Clifton VA Radio Intelligence Example Diodes for RF Probes PIC Development Boards and Programmers Elecraft K3 and Panadapters Elecraft K3 AGC and S-Meter Elecraft K3 Noise Blanker and Crystal/DSP Filtering Jackson Harbor Press VLF Converter Elecraft K3 Receive Audio Headphone Impedance Non-Linear Transformer Behavior Off-the-air Frequency Measurement Easy Broadband Transformer Norton Amplifier Signal Levels EZGPIB and Prologix GPIB Adapter Signal Statistics FM & TV Subcarriers
| |
PIC Development
Boards and Programmers
I'm occasionally asked "which PIC programmer and development board should I
purchase"? This page presents my limited exposure to several boards and
programmers and is not intended to be a comprehensive of the field.
|
|
Table of Contents
Introduction
Micro_Engineering_Labs_USB_Programmer
Micro_Engineering_Labs_X1_Development_Board
OLIMEX_Development_Board
Basic_Micro_2840_Development_Board
Microchip_MPLAB_ICD_2_
Other_Development_Boards
My__Recommendations
|
|
Before discussing specific hardware, it's first necessary
to understand how a PIC is programmed. (PICs are one-chip microcontrollers. For
more information, see my book (linked at Book). My
discussion is, moreover, limited to the PICs developed by
Microchip. I'll also limit my discussion
to the later version 16F and 18F 8-bit line of flash memory PICs, as those
are the ones I'm most familiar with.
Flash memory PICs (identifiable by the "F" in the part
number, such as a 16F877, or an 18F4620) keep their program code in non-volatile
electrically alterable "flash" memory. Wikipedia has a decent summary of what
flash memory is and how it works at
http://en.wikipedia.org/wiki/Flash_memory but for our purposes the important
elements of flash memory are:
- It is electrically alterable and erasable
- It requires no power to maintain its values
(non-volatile) over a reasonable lifetime (commonly said to be 40-50 years)
- It has a limited number of read/write cycles,
but for Microchip's products this number is sufficiently large as to not be
a practical problem (in the hundreds of thousands of cycles
The programming process starts, of course, with a program.
The program may be written in a high level language, such as
Swordfish BASIC, or in
assembler. The diagram below presents a generic version of how a program goes
from human cognizable form into the PIC. If written in assembler, the top block
is replaced with the assembler's IDE. (IDE is integrated development
environment, and is the program that integrates a text editor with the compiler
or assembler functionality.)
|
 |
Whether generated from a high level language compiler or from an assembler, the
program instructions are ultimately transformed into a binary file,
commonly called a "hex" file from its traditional .hex name extension. The hex
file contains the specific machine instructions to be executed.
The loader program, running on the PC, transfers the hex file
data to the programmer hardware, which in turn, moves the data into the PIC
where it is saved in flash memory.
The programmer-PIC interface is generally accomplished
through "high voltage programming," in this case "high voltage" meaning a
voltage above the normal PIC supply voltage. A typical programming voltage is
12V, whilst the PIC normally runs with 5V, or 3.3V. Microchip has changed the
specific transfer protocol relatively frequently and hence the programmer is
itself updateable. High voltage programming requires the programmer be able to
control both the voltage applied to the master clear pin and the PIC supply
voltage.
Most new PICs also have a "low voltage programming" mode
whereby the code may be transferred using only the PIC's normal supply voltages.
The programmers discussed in this page, however, are all high voltage
programmers.
The electrical and data flow specifications for
programming that Microchip commonly issues a separate data sheet just covering
programming for a particular group of chips. For example, members of the 18Fxx8
family, such as the 18F458, use the following pins during programming: |
 |
A high voltage programmer requires access to all the pins identified
above, except for RB5, which is used for low voltage programming.
The prototype boards discussed in this page are arranged for
automatic connection of the correct pins when used with a compliant programmer.
Except during the actual programming cycle, RB5 and RB6 are available for their
normal use, although there may be limits upon what can be connected to these
pins.
This arrangement is called ICP or "in-circuit programming"
in that the PIC may be programmed without removing it from the development board
and associated components.
A second method of programming the PIC, and one that I
generally use, is through the PIC's serial port and a "bootloader" program.
Most PICs have internal serial hardware allowing them to
communicate with a PC using the PC's RS232 port. Level shifting hardware is
required, of course, to convert the PIC's logic-level input/output to the
bi-polar RS232 standard, and all the development boards examined on this page
have the necessary level shifting hardware.
The bootloader program is a small program resident in the
PIC that accepts data from the PIC's serial port and writes the data into the
PIC's program flash memory. Thus, if the PIC has the necessary bootloader
software, and with corresponding software on the PC, a hardware programmer is
unnecessary. However, it's important to understand several shortcomings of
bootloader programming, based upon my experience with Swordfish's bootloader
code:
- The bootloader is specific to each PIC type and clock
speed.
- A PIC cannot be purchased from Microchip with
bootloader code installed, so you must have access to a high voltage
programmer to install the bootloader program. The bootloader software
prevents itself from being written over, so the bootloader need be installed
only once.
- Swordfish has very good integrated support for the
bootloader, but this may or may not be true for other compilers and
assemblers.
- In order to use the bootloader, the PIC circuit must
have a serial connection to the PC. This is not an issue with the
development boards, but might be in a real circuit.
I should add that Swordfish comes with bootloader code
files (hex files) for a variety of common PICs and clock speeds.
|
|
The high voltage programmer I use is
Micro Engineering Lab's USB
programmer, illustrated to the right. The connector at left center is the
USB port, whilst the 5x2 header pin connection at the right goes to the PIC or
the development board.
The version I have includes a plastic case, which I highly
recommend as a safety measure when working on bench with odds and ends of wire,
components and the like.
|
In
addition to the enclosure, I also purchased the optional ZIF (zero insertion
force) socket adapter and the short 10-pin jumper cable.
The ZIF adapter permits programming just the PIC, without
a development board. I use this combination to install Swordfish bootloader
software in a PIC as well as to program the chips associated with my Z100 tuning
aid kit.
The first USB programmer I purchased was from
mikroElektronika. It proved to be essentially unusable as it consumed 100% of my
computer's USB resources and would not release them without rebooting the
computer. I've read that mikroElektronika's current USB programmer is redesigned
to avoid this problem, but I have not independently verified this.
In contrast, Micro Engineering Lab's USB programmer has
worked flawlessly since the beginning. I highly recommend it. The configuration
I have has a current price of $145, which includes the Windows-based control
program.
|
|
Dave, W6OVP, recently asked me to look over a used
Micro Engineering Labs X1
development board, he purchased on E-bay, pictured below.
|
 |
I removed a few parts from the "experimenter's area" of his used X1, restored
some cut traces and installed sockets for easier access to the PIC's pins. This
board is advertised for 16F-series PICs, but in fact it works w ith
many 18F-series chips as well, since Microchip's 18-F parts generally are
pin-compatible, although the 18-F parts will usually have extra functionality
and significantly improved performance.
In using the X1 for a week or so, I've found it to be an
excellent product and well suited for its intended purpose, learning how to
program PICs. The photo at the right shows Dave's X1 board with my USB
programmer connected to its programming port.
|
The idea behind the X1 and similar boards from Microchip and
others, is that many common components are installed on the PCB and connected to
the PIC. In some
places, components are not provided, such as a temperature sensor, but the
board has pads where the user may install the components if desired.
I wrote a short Swordfish program, for example, to display
integers from 0 to 255 on the LCD in decimal (d), hexadecimal ($) and
binary (b) in an endless loop. Each time the digit increments, a short 1000 Hz
beep is sounded using the X1's miniature speaker.
Since no wiring or jumpers were required with the X1, this
allowed me to concentrate on the code.
For a beginner desiring to learn how to program a PIC, the
X1 is an excellent choice, albeit a bit on the expensive side with a list price
of $200. If, on the other hand, your primary interest is developing circuits
using a PIC, or don't wish to spend $200, other options exist.
I used the USB programmer to enter the code a couple of
times to verify that functionality of Dave's used X1, but then I loaded the
18F458 PIC with Swordfish bootloader code and did the remainder of the
program development over the serial interface.
|
|
If MEL's X1 board is one extreme of integration of PIC and
experimenter's parts, Olimex's board, pictured below, is the opposite.
|
 |
|
I purchased this board recently from
Spark Fun Electronics, their stock number
DEV-00021, for $15.95. And, at that price it isn't a kit, but rather comes
fully assembled (no PIC provided, of course). I added header sockets to the
board to make it easier to access the PIC's pins but it's otherwise the stock
board. I also added a power-on LED (the LED installed on the board is used for
other purposes.) The DEV-21 board includes a serial
port with level converter chip, power connector, reset switch, 20 MHz crystal
(in a socket), regulator for PIC power (+5 or +3.3 V, selectable via a jumper)
and a 6-pin connector for ICP, although not compatible with MEL's USB
programmer.
The extra PCB space is intended for circuit development
via soldering to isolated pads.
I'm not a fan of this style of circuit development, but
rather prefer solderless "plug board" providing the desired circuit speed
permits.
|
|
|
 |

I've had these boards for several years, acquiring them when learning MBASIC,
Basic Micro's compiler for 16-F series chips.Basic
Micro also has a high voltage programer, the ISP-Pro, currently in version 3.0.
If you intend to program 16F chips only, Basic Micro's
MBASIC, the 2840 development board and ISP-Pro are a good combination.
You should also be aware that I've received several recent
(summer 2008) reports of prospective purchasers having a very difficult time
contacting Basic Micro via E-mail or telephone. In addition, I do not believe
MBASIC is currently supporting 18F series devices, although I understand 18F
support has been "in the works" for several years.
When used with the ISP-Pro, the 2840-board supports ICP.
However, the ISP-Pro is incompatible with Swordfish, even though it will program
many 18F chips.
When I say incompatible, I mean that it does not integrate
with Swordfish's IDE so that one may compile a program and load it into the PIC
via single key press or mouse click. It remains possible to have Swordish's hex
file output manually loaded into a PIC using ISP-Pro. The lack of integration is
because Basic Micro's control software is not a separate program accessible by
other IDEs but rather is integrated as part of the MBASIC compiler.
When using the 2840 boards with 18F parts and Swordfish, I
first program a suitable bootloader version into the 18F PIC using the MEL USB
programmer and ZIF adapter. I then put the PIC with bootloader into the 2840
board and program in the Swordfish code using the bootloader. This step can be
done with a single mouse click in Swordfish, plus the extra step of pressing the
reset button on the 2840 board.
|
Microchip MPLAB ICD 2
I also own a Microship ICD 2 USB programmer, compatible
with all Microchip's 16-F and 18-F devices.
I have not yet used it, however, because it does not
easily integrate with Swordfish. The non-integration is for the same reason
as the MBASIC programmer; Microchip does not have a stand-alone programmer
control program that may be chained in from Swordfish's IDE. I've read some
work-arounds for this on the Internet, but have not found it necessary to
pursue the matter further as the MEL USB programmer works so well.
Microchip's ICD 2 is integrated with Microchip's
assembler package MPLAB and, I believe (but have no direct experience) with
some compilers available through Microchip.
|
|
There is a line of development boards from China sold on
E-bay amongst other places with similar features to the X1 board. I have no idea
how good or bad they are, nor how well they integrate with programmers such as
the MEL USB device. However, since they have serial interface ports, a
bootloader approach should work with Swordfish compiler, assuming, of course,
one has a way of getting the bootloader code into the PIC.
Microchip also has a line of development boards that
should be considered. Their ICP interface is intended for the ICD 2 which will
not, as mentioned above, easily integrate with Swordfish's IDE. However,
programming via bootloader and serial port should be possible, assuming, of
course, one has a way of getting the bootloader code into the PIC.
|
|
If you are a beginner wishing to learn how to program a
PIC with a modern high quality compiler, I would purchase the following:
This combination allows you to then program bootloader
code into a wide variety of 18F-series chips, thus allowing you to use any of
the development boards described at this page, based upon your desires. If price
is not an object, ME Lab's X1 board is an excellent choice for the beginner. If
you know your way around a PIC, then perhaps the inexpensive Olimex board will
be suitable when used with a auxiliary solderless board. |
|
|
|
|
|
|
|
|
|
|
|
|
|