Simple PIC18 Projects

In this chapter we will look at the design of simple PIC18 microcontroller-based projects, with the idea of becoming familiar with basic interfacing techniques and learning how to use the various microcontroller peripheral registers. We will look at the design of projects using LEDs, push-button switches, keyboards, LED arrays, sound devices, and so on, and we will develop programs in C language using the mikroC compiler. The hardware is designed on a low-cost breadboard, but development kits such as BIGPIC4 can be used for these projects. We will start with very simple projects and proceed to more complex ones. It is recommended that the reader moves through the projects in their given order. The following are provided for each project:

• Description of the program

• Description of the hardware

• Circuit diagram

• Algorithm description (in PDL)

• Program listing

• Suggestions for further development

The program’s algorithm can be described in a variety of graphic and text-based methods, some of the common ones being a flow diagram, a structure chart, and program description language. In this book we are using program description language (PDL).