..................

Modified 01/30/07

PIC hints and direction

PIC = Peripheral Interface Controller

Possibly the most useful thing you can do is to find someone nearby who uses PIC or other microprocessors who can answer questions.

For experimentation and interface experience, Parallax, has a very nice breadboard system called the "Basic Stamp." Another site with similar products is Scott Edwards Electronics.

Reference materials...

  • MCUspace.com is a comprehensive source dedicated to connecting you to the resources for the Microchip Technology 8-bit PICŪmicro MCU and dsPICŪ microcontrollers. There are an abundance of software development tools that include compilers, debuggers/emulators, programmers, development boards, as well as sample projects, books and distributors all dedicated to the PICŪ MCU. Visitors are encouraged to use the forum for discussion and rating options for products, and to keep the information current and relevant to PICŪ users. CCS graciously sponsors this site and intends it for information and discussion about CCS and other manufacturers of software and hardware tools pertaining to the PICŪmicro MCU and dsPICŪ microcontrollers.
  • Nuts & Volts magazine is a worthwhile experimenters magazine. You may obtain a sample issue or subscribe at their web site.
  • Two beginning books such as "Easy PIC'n" and "PIC'n Up the Pace." can be found online at Amazon, and at larger bookstores such as Barnes and Noble Bookstores.
  • Check out DonTronics for links to plenty of web sites that are dedicated to using PIC microprocessors.
  • Peter Anderson has many good links for PICs and a book about CCS C.
  • Check out the PicMicro web ring.
  • Check out "Embedded C Programming and the Microchip PIC" by Barnett, Cox & O'Cull. It deals with the CCS compiler exclusively. It has a CD that contains all of the source code in the book, and a student version of the CCS compiler. Available at Amazon.com.

To use a PIC microprocessor...

  • Generating a design in PIC assembly language is probably useful at the beginning to get a basic understanding of the PIC. (A few of the projects on this web site are in assembly language.) However, assembly language quickly becomes tedious which is why most of my projects are written in the C language. While C insulates you from most of the intricacies of the microprocessor, the better you understand the microprocessor hardware, the easier it will be to program and debug in C. My suggestion is to start in assembly language, then move to C!

  • For writing programs in assembly language, Microchip Corporation supplies MPLAB, a free assembler/simulator that is a very nice learning tool that aids learning the hardware features of a PIC. They also market PicStart, a very nice PIC programmer that works directly with MPLAB.

  • For writing programs in C, a C compiler is necessary. C compilers can cost $500 U.S. and up, but there are a few inexpensive options...
    • CCS Corporation markets very credible compilers for as low as $125. Their software is a bargain and works well!
    • HI-TECH Software has a higher-priced (and more capable) PIC compiler.
    • C2C has a nice C compiler for PICs.

  • The assembler or compiler converts your source code to a hex file. A programmer device takes the hex file and writes it into a PIC. Programmers are commercially available or you can find designs on the web and build one yourself. DonTronics has links. Glitchbuster markets inexpensive programmers.

  • The particular PIC you need depends on each project. Certain PIC's are one-time-programmable (OTP) which means you must get it right the first time! Others are erasable (either by exposure to UV light for more than 20 minutes or by instant electrical erasure) and reprogrammable. The 16F84 chip is a good place to begin because it is relatively low cost and its flash memory is electrically erasable.

  • Sometimes pre-programmed PIC's may be bought from the originators of a project, but I would suggest that my projects (and perhaps most other projects you'll find) are meant more for generating ideas. If you obtained a preprogrammed PIC and built the circuit exactly as described, it would work. But, the source code is supplied so that you can modify a design at will. Thus, if you want to make a change or expand a design to suit your needs, you simply change the code, assemble or compile it, and program it into a PIC. It's probably worthwhile to to gear up and learn the entire process and soon you'll be publishing projects on your own!

In short, you need to:

  • learn practical interface methods
  • understand, at least to a basic extent, the inner workings of a PIC
  • learn the assembly or C programming language
  • obtain an assembler/simulator or obtain a C compiler
  • buy or build a PIC programmer
  • be able to build and debug such projects