ABSTRACT

This chapter discusses the simplest circuits and programming operations. Using a PIC to control an Light-Emitting Diode (LED) or read a switch is as elementary as it gets. Other input/output devices that are also considered are seven-segment LED displays and multiple switches, sometimes called toggle switches. A bank of multiple LEDs can also function as a binary output device. Like the programmer uses a programming template for developing 16F84A code, the circuit designer uses a template circuit. This circuit contains the components that most 16F84A boards require. Every PIC-based circuit board requires a +5V power source. A slightly more complex circuit contains a pushbutton switch. In this case, the program monitors the state of the pushbutton and lights the LED accordingly. The elements include a diagram of the PIC itself with the pin-out, as well as the wiring of the standard components, including the power source, ground, the reset pin, and the most commonly used oscillator.