PIC Elmer 160

HOME PAGE

 

An online course for learning how to program the PIC16F84 microcontroller

About the AmQRP Club
Frequently_Asked_Questions
Kits
Projects
QRP Forums
Contesting
References
Links                 


Intro PIC-EL Kit Tools Software Lessons FAQ QRP-L Discussion

Course Instructor:
   
John McDonough, WB8RCR wb8rcr@arrl.net

This is the web site for the Elmer 160 PIC course. On this page you will find an overview of the course, as well as information about the PIC-EL project board and links to the course material.
What is Elmer 160?

Elmer 160 is an online introductory course for the PIC microcontroller from Microchip. In this course we start off with very basic principles and take you to the point of designing your own PIC applications. While we focus on the PIC16F84, the principles are applicable to the entire range of microcontrollers from Microchip.

The session is aimed at amateur radio homebrewers, although it could be of interest to anyone interested in learning how these microcontrollers work.

We start off the course with very basic principles, then proceed through writing some simple programs and testing them on a simulator. We will then graduate to programming a PIC chip with our program and testing it in a real circuit.

The course incorporates a project board called the PIC-EL board. This board serves as a platform for our tests, but could later be used as many different tools when the course is complete.

The course is centered around the PIC16F84, a very popular microcontroller among hobbyists. Toward the end of the course, we will discuss some of the many other varieties of PIC parts. All the PIC microcontrollers share the same basic instruction set and the same programming techniques, so students should be able to choose the right microcontroller for their projects.

Why?

Over the past few years a large number of amateur radio projects have appeared using the PIC microcontroller from Microchip. This micro has the advantage of a FLASH program memory on some models, which allows the part to be reprogrammed many times, and a simple architecture. In addition, the chip needs only minimal support circuitry. This combination makes it easy to apply, and thus a good candidate for many applications.

Still, many homebrewers have been reluctant to dive in. In spite of the simplicity of application and the relative simplicity of programmers, the whole concept of having a "computer" in the radio has been alien to many homebrewers. This, along with the barrier of needing to buy or build a programmer has provided a good excuse for many amateurs to avoid incorporating the microcontroller into their projects.

However, the PIC can greatly reduce circuit complexity, especially when the builder wants some sort of display beyond a few lights. The learning curve of using a PIC has led many builders to avoid projects which could be very satisfying.

Recently there have been a number of successful "Elmer" projects on QRP-L to help folks get past their fear of doing certain types of projects. It seems like the time has come for a series to help folks apply microcontrollers to their projects.

What do I need?

The course is conducted online, so most obviously you need a PC with an Internet connection. The course material is produced in Adobe's Portable Document Format, so you will need a copy of Acrobat Reader or some other program capable of reading Version 3 or later PDF files. Some of the supporting materials from Microchip may require the ability to read later versions of Adobe's Portable Document Format.

Early on in the course we will begin using Microchip's Integrated Development Environment called MPLAB. In order to use the latest version (6.30) of MPLAB you will need to have a PC with Windows 98 Second Edition or later, Microsoft Internet Explorer version 5 or later, and about 80 Mb of available disk space.

Earlier versions of MPLAB are available from Microchip, and can run on earlier Windows versions. Most also require significantly less disk space and versions prior to 6.0 do not require Internet Explorer. However, there are some operational differences with these earlier versions, so the step by step instructions included in the course might not apply. Still, all the major capabilities exist as far back as version 4.21.

A little later we will begin programming the 16F84 microcontroller and using it in a number of test circuits. You will need to be able to program the PIC and test it in a variety of circuits. The American QRP Club is offering a companion board to the course. See the section on the PIC-EL board below. The PIC-EL board requires that you have an available serial port on your PC and a 12-volt power supply. The power supply should deliver between 12.6 and 14 volts at around 100 ma. Should you choose to do later experiments using the optional DDS Daughtercard, you will need to supply about 150 ma.

If you do not have an appropriate serial port, or are not using the PIC-EL board, you will need a programmer for the PIC 16F84 that works with your computer. There are a large number of parallel port programmer designs on the web, and they are fairly simple to build. USB port programmers tend to be a little more expensive, but for students with newer PC's, this may be their only choice.

The programming software we will be referencing in the course can support most serial and parallel port programmers. If you must use a USB programmer, you may need to use software supplied with the programmer.

Course Conduct

The Elmer 160 course consists primarily of a series of PDF documents which are posted on the AmQRP web site. Each document covers a particular topic. Except for an occasional lesson to introduce some basic concepts, most of the lessons introduce a topic and then run some experiments to demonstrate that topic. The initial experiments use the Microchip MPLAB SIM simulator. Later experiments are performed on actual hardware.

The hardware experiments assume use of the PIC-EL board. Although a reasonably-equipped experimenter is likely to have the necessary parts on hand, the PIC-EL board provides a convenient and inexpensive platform for the experiments.

Students will undoubtedly have questions as the course progresses. These questions will be fielded and answered on QRP-L.org or Ham-PIC. From time to time, the discussions will be summarized and posted on the AmQRP web site. Those who are not members of QRP-L.org may join, or read the archives, at  http://mail.qrp-l.org/mailman/listinfo/qrp-l_qrp-l.org. For Ham-PIC the address is http://mailman.qth.net/mailman/listinfo/ham-pic.

Course Outline

The course began on November 23rd. There will be approximately one lesson per week, with some stretching out around holidays to allow folks to keep up with family duties.

Coursework requiring the actual hardware will begin around the end of January.

The following are the lessons planned - as we get further along, it is likely that there will be some changes as we see how folks are progressing:

  • The PIC Architecture
  • Installing MPLAB
  • First MPLAB Project
  • More fun with W and F
  • Let's play with the status register
  • Subroutines
  • Using that status word
  • Building the PIC-EL board
  • Installing FPP
  • Programming a PIC
  • Let's make the PIC do something
  • Timing loops
  • More simple experiments
  • From thought to code
  • Still more simple experiments
  • Reading the encoder
  • Let's play with interrupts
  • Using the timer interrupt
  • Let's build a keyer
  • Would you like memory with that?
  • Table lookups
  • Controlling an LCD
  • Using the LCD with our keyer
  • More complex math
  • Still more complex math
  • Counting frequency
  • ICSP and other circuitry issues
  • Other PICs
  • Controlling the DDS
The PIC-EL Board

The main platform for the PIC Elmer 160 course is a pc board containing all components, controls and connectors required to perform the series of experiments specified in the course material.  PIC-EL is available as a kit from the AmQRP Club. See all the details, schematic, photos and kit ordering information here.

What if I don't use Windows?

The course material is built around Microsoft Windows. However, much of the content is not dependent on the particular development platform you choose.

Some members of the QRPLINUX-L reflector have been working to identify the appropriate software to use with Linux. This author is unaware of development software for less popular platforms such as the Macintosh.

Using Linux

David Willmore, N0YMV has provided some resource links for Linux users trying to follow the course.

 

 

Back to AmQRP Home Page

 

Page last updated:  May 5, 2007