The robotic projects outlined in this book make extensive use of the PIC series of microcontroller rom Microchip Technology Inc. In addition to its ability torun programs, the microcontroller has input and output lines (pins) that are used to control motor drive systems, read sensors, and communicate. We demand a lot from our microcontroller(s), so it’s important to have a good idea of what a microcontroller is right from the start. A microcontroller is essentially an inexpensive singlechip computer. Single chip means the entire computer system lies within the confines of a sliver of silicon encapsulated inside the plastic housing of an integrated circuit.
The microcontroller has features similar to those of a standard personal computer. The microcontroller contains a CPU (central processing unit), RAM (random access memory), ROM (readonly memory), I/O (input/output) lines, serial and parallel ports, timers, and sometimes other builtin peripherals such as ana logtodigital (A/D) and digitaltoanalog (D/A) converters. The key feature, however, is the microcontroller’s capability of uploading, storing, and running a program. Being inexpensive singlechip computers, microcontrollers are easy to embed into larger electronic circuit designs. Their ability to store and run unique pro grams makes them extremely versatile. For instance, one can program a microcontroller to make decisions and perform functions based on situations (I/O line logic) and events. The math and logic functions allow the microcon troller to mimic sophisticated logic and electronic circuits. Programs can also make the microcontroller behave as a neural networkand/or a fuzzy logic controller. Microcontrollers are incorporated in consumer electronics and are responsible for the “intelligence” in these smart electronic devices.