ABSTRACT

This chapter discusses simple input and output devices that are controlled by one of the most basic PICs of the mid-range family. Although using a PIC to control an Light-Emitting Diode (LED) or to read a switch is as elementary as it gets, these operations are by no means trivial to the beginner because they require building a working circuit and developing and installing the corresponding PIC program. The chapter also discusses more complex input/output devices, including the Seven-Segment LED display and circuits with multiple switches. One of the circuits uses a bank of multiple LEDs to function as a binary output device and reads four toggle switches. Program development can be considerably simplified using code templates. A code template is a program devoid of functionality that serves to implement the most common and typical features of an application.