Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 20 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
20
Dung lượng
1,49 MB
Nội dung
[...]... 1. 2). (EPIC is a product and trademark of microEngineering Labs, Inc.) Robot Intelligence 3 Figure 1. 1 PicBasic Pro and PicBasic software packages and manuals Figure 1. 2 EPIC Programmer software and hardware PicBasic and PicBasic Pro Compilers The PicBasic and PicBasic Pro compilers both function in the same way. Saved program code (text file) is run through a compiler (either the PicBasic ... programming carrier board (hardware). The EPIC software package has two executable files, one for DOS and another version of the soft ware for Windows It is the EPIC hardware and software that takes the compiled .hex file gen erated by the compiler and uploads it into the microcontroller, where it may be run. The EPIC Programmer is compatible with both the PicBasic and PicBasic Pro compilers The programming carrier board (see Fig. 1. 3) has a socket for inserting the. .. PicBasic compiler. The Pro version offers an enhanced and richer basic command syntax than is available in the PicBasic compiler package. A few of the addition al commands that can be found in the Pro version allow the use of interrupts, direct control of LCD modules, DTMF out, and X 10 commands, to name a few While the PicBasic Pro is a more sophisticated package, the compiler does not handle two of my favorite Basic commands, peek and poke. Although the commands are listed as “functional” in the Pro manual, it is emphasized that... code and accessing the different aspects of the microcon troller’s features and memory The highlevel language I use is a derivative of the Basic language. It is called PicBasic. (The PicBasic and PicBasic Pro compilers used to write PicBasic programs are products and trademarks of microEngineering Labs, Inc.) PicBasic is similar to the PBasic language ... ning. I recommend beginning with the 16 F84 PIC microcontroller. The 16 F84 is an 18 pin dip chip with 13 I/O lines and has 1K � 14 of rewritable memory The rewritable memory allows you to reprogram the PIC chip up to 10 00 times to test and troubleshoot your programs and circuits. The minimal support components are a 5V dc power supply, oscillator (4.0MHz crystal), and one pullup 1 4W resistor (4.7k�) 16 F84 PIC Microcontroller The PIC 16 F84 microcontroller is shown in Fig. 1. 4. It is a versatile microcon... Servomotor Brackets Footpads Assembly Schematic Program Subroutines M1, M2, and M3 Going Further Turning Right and Left Parts List ix 228 228 230 2 31 233 234 2 41 242 242 Chapter 14 Color Robotic Vision System 243 CMU Camera Serial Communication VB Application Program Interfacing the CMU Camera to a Robot PIC 16 F84 Runs at 16 MHz Program 1 Program 2 Incandescent or Fluorescent Lighting Servomotors for Robot... commands are listed as “functional” in the Pro manual, it is emphasized that “PEEK and POKE should never be used in a PicBasic Pro program.” There are workarounds to using the peek and poke commands in the Pro version that will be covered when needed later on In the balance of this book, at times I will refer to both the PicBasic and PicBasic Pro compilers simply as the compiler(s). This saves me from continu... is started, its CPU will run through the programmed list of hexadecimal num bers, running the PicBasic program. Uploading the machine code (.hex file) into the microcontroller is the job of the EPIC Programmer board and soft ware, which we will look at shortly The PicBasic Pro compiler is considerably more expensive than the standard PicBasic compiler. The Pro version offers an enhanced and richer basic command... into the microcontroller, it may be referred to as firmware. Other phrases may include the term firmware instead of software, such as “upload the firmware” or “once the firmware has been installed into the device.” Consumables Consumables are the electronic components, the PIC microcontroller chip itself, with a few support components to get the microcontroller up and run ning. I recommend beginning with the 16 F84 PIC microcontroller. The 16 F84... 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 log to digital (A/ D) and digital to analog (D /A) converters. The key feature, however, is the microcontroller’s capability of uploading, storing, and running a program Why Use a Microcontroller? Being inexpensive singlechip computers, microcontrollers are easy to embed . of Operation 88 Contents vii Observed Behavior 88 89 90 91 97 99 10 0 10 1 10 4 10 7 10 9 11 2 11 4 11 5 12 1 12 1 12 1 12 1 12 1 12 3 12 3 Building a Walter Tortoise Drive and Steering. Installing the PicBasic Compiler Software 11 Installing the PicBasic Pro Compiler 12 Chapter 3. Installing the EPIC Software 19 Installing the EPIC Software in Windows 19 Installing the EPIC. The high-level language I use is a derivative of the Basic language. It is called PicBasic. (The PicBasic and PicBasic Pro compilers used to write PicBasic programs are products and trademarks