The PIC family of microcontrollers is the most popular series of microcontrollers in the world. However, all of the computing power of the Microchip PIC microcontrollers is useless without effective, well-written software. The traditional method of creating PIC software using assembly language is time-consuming and difficult. Fortunately, there is a better soluction: PicBasic, a powerful but relatively simple version of the BASIC language optimized for PIC microcontroller applications. Using PicBasic lets you create software in days instead of the weeks required with assembly language. In this applications-oriented guide, author Chuck Hellebuyck assumes no prior knowledge of PicBasic. He begins with an introduction to basic programming concepts such as variables, statements, operators and structures. He then discusses such important concepts as: - differences between the standard PicBasic and PicBasic Pro compilers
- instruction sets and architectures of commonly used PIC microcontrollers such as the 15F84 and 16F876
- key differences between 12-bit, 14-bit and 16-bit core versions of the PIC
- handling interrupts and exceptions
- redirection and branching commands
- communication between multiple PIC microcontrollers
- direct access to input/output and special function registers
Throughout this book, Hellebuyck takes and integrated software/hardware approach to PicBasic programming, using simple code examples to accomplish basic hardware tasks (such as driving an LED display) and gradually increasing example complexity until you are able to program complex tasks and functions in PicBasic. Full software and hardware details are included so you can replicate the designs for yourself or use them as the starting point in your own development efforts. The included CD-ROM contains the source code and executables mentioned in the book as well as an electronic version of the book itself. Table of Contents Introduction 1. Getting Familiar with PICs and PicBasic PIC Overview Software for PICs Assembly Language PicBasic Compiler 2. PicBasic Compiler (PBC) How PBC Works Variables, Memory, and I/O Program Operators PBC Commands Using PBC 3. The PicBasic Pro Compiler Variables Constants Symbols Numeric and ASCII Strings I/O Access I/O Control Comments Math Operators Arithmetic Operators Binary Functions PBPro Commands 4. Inside the PIC Microcontroller Fundamentals Program Memory Reset Vector Data Memory Status Register I/O Registers A/D Registers Peripheral Interrupt Vector Option Register Intcon Register Summary 5. Simple PIC Projects Project 1: Flashing an LED Project 2: Scrolling LEDs Project 3: Driving a 7-Segment LED Display 6. Moving on with the 16F876 Project 4: Accessing Port A I/O Project 5: Analog-to-Digital Conversion Project 6: Driving a Servomotor 7. Communication Project 7: Driving a LCD Module Project 8: Serial Communication Project 9: Driving a LCD with a Single Serial Connection 8. Memory and Sound Project 10: Using External Memory Project 11: Accessing Internal Memory Project 12: Making Music 9. Robotics Project 13: Robot Base Project 14: Line Tracker Project 15: Obstacle Detection Appendix A Appendix B Index Paperback; 317 pages.
|