Robotics experiment with PIC microcontroller l 1Robotics experiment withPIC microcontrollerbased-on Robo-PICA robot kit3rd Edition(C) Innovative Exp
10 l Robotics experiment with PIC microcontroller1.3.2.2 Using PICkit2TM Programming Software1.3.2.2.1 Testing hardware connection(1) Connect the U
Robotics experiment with PIC microcontroller l 11(3) If the connection is incompleted. The message PICkit 2 not found. Check USBconnections and use
12 l Robotics experiment with PIC microcontroller1.3.2.2.2 Command menu descriptionFILE• Import File – Import a hex file for programming• Export Fi
Robotics experiment with PIC microcontroller l 13PROGRAMMER• Read Device – Reads the program memory, data EEPROM memory, ID loca-tions, and Configur
14 l Robotics experiment with PIC microcontroller• Fast Programming - Select the PX-200 to programs the Flash device with high speed.• Check Commun
Robotics experiment with PIC microcontroller l 15(b) Access only Flash program memoryClick at Enabled box in EEPROM data border to remove the mark.
16 l Robotics experiment with PIC microcontroller(3) Browse to the directory where the latest Operating System code was saved,Select the PK2*.hex f
Robotics experiment with PIC microcontroller l 171.4 Programming devleopment for Robo-PICAThe summary of steps of program the Robo-PICA robot kit ar
18 l Robotics experiment with PIC microcontrollerTarget microcontrollerdeviceComplie buttonClock frequency ofmicrocontrollerProgram editor areaOut
Robotics experiment with PIC microcontroller l 191.5.4 Create the new project file by entering to menu Project and select NewProject...1.5.5 The New
2 l Robotics experiment with PIC microcontrollerContentsChapter 1 Part list of Robo-PICA and Introduce software tools...51.1 Robo-PICA
20 l Robotics experiment with PIC microcontroller(a) Project Name : Put the project name. mikroC IDE will create the folder tosupport your project
Robotics experiment with PIC microcontroller l 21void main(){ TRISB.F3=0; // Set RB3 as Output while(1) // Infinite Loop
22 l Robotics experiment with PIC microcontroller1.5.9 Put 4 of AA batteries into battery holder of the RBX-877V2.0 Controller board.1.5.10 Connect
Robotics experiment with PIC microcontroller l 231.5.15 Select the HEX fle which require program to microcontroller by entering menuFile à Import He
24 l Robotics experiment with PIC microcontroller
Robotics experiment with PIC microcontroller l 25Robo-PICA robotic kit is controlled by the RBX-877 V2.0 (PIC16F887 Robot Experi-ment board). The ma
26l Robotics experiment with PIC microcontroller2.1 Technical featuresl Controlled by PIC16F887 Microcontroller with 8Kword memory. Run with 20MHz c
Robotics experiment with PIC microcontroller l 272.2 RBX-877 V2.0 board circuit description2.2.1 Microcontroller circuitThe heart of this board is t
28l Robotics experiment with PIC microcontrollerFigure 2-3 : Schematic diagram of RBX-877 V2.0 Robot Controller board231837RB4RD0RD1RB1RB2RC4/SDARC
Robotics experiment with PIC microcontroller l 292.2.5 Programmable portThe RBX-877 V2.0 board provides 9-programmable multipurpose ports. It includ
Robotics experiment with PIC microcontroller l 3Chapter 6 Line following mission...716.1
30l Robotics experiment with PIC microcontrollerActivity 1 Write programs for testingRBX-877 V2.0 Controller boardProcedureFor all activities of the
Robotics experiment with PIC microcontroller l 31Activity 1-1 LED testingSee the Figure A1-1, RB3 of PIC16F887 is connected to LED via current limit
32l Robotics experiment with PIC microcontrollerActivity 1-2 Reading digital data via switch and driving soundSee the figue A1-2, it shows the schem
Robotics experiment with PIC microcontroller l 33Listing A1-3 : The C program of reading digital value from the Switch inputat RA4 pin to control t
34l Robotics experiment with PIC microcontrollerListing A1-4 : The C program for displaying message on LCD module ofRBX-877 V2.0 Rob
Robotics experiment with PIC microcontroller l 35This chapter describes about how to building the Robo-PICA robot kit. The featuresof Robo-PICA ro
36 l Robotics experiment with PIC microcontrollerActivity 2Make the Robo-PICAFigure A2-1 : Shows the parts for making a Robo-PICA.30mm. Hexstandoff
Robotics experiment with PIC microcontroller l 37A2.1 Fix 2 of DC motor gearboxes at the base. Turn the extrude side of the right gearboxout side
38 l Robotics experiment with PIC microcontrollerA2.4 Attache the rest of Long angled shaft base with a base by inserted the 3x10mm. screwsfrom top
Robotics experiment with PIC microcontroller l 39A2.7 At front side, attach 2 of the Hexagonal standoffs. Insert the 3x10mm. screw throughthe 3-ho
4 l Robotics experiment with PIC microcontroller
40 l Robotics experiment with PIC microcontrollerThe example shown above is only a sample to show you the standard type oftrack width used. You can
Robotics experiment with PIC microcontroller l 41A2.11 Attach the RBX-877 V2.0 controller board on top of robot’s chasis. Please fix theboard with
42 l Robotics experiment with PIC microcontrollerA2.14 Connect the ZX-IRM structure from step A2.12 to the Right angle joiner on the RBX-877V2.0 co
Robotics experiment with PIC microcontroller l 43A2.16 Install the ZX-03 Infrared reflector sensor board at the bottom of the robot’s chasis.Attac
44 l Robotics experiment with PIC microcontrollerA2.19 Plug the GP2D120 cable to RA2 port, the left ZX-03 sensor’s cable to RA0 port andthe right Z
Robotics experiment with PIC microcontroller l 45The first thing is to control robot Movement. The heart of this movement is DCmotor circuit. In Rob
46 l Robotics experiment with PIC microcontrollerTable 4-1 : Shows logic signal to control motor directionMotor operationShaft freeShaft locked or
Robotics experiment with PIC microcontroller l 47char motor_duty_= 127; // Defalt PWM 50%char motor_init_=0; // Status init
48 l Robotics experiment with PIC microcontrollerListing 4-1 : The source code of motor.h library file for driving the DC motor(continue)/********
Robotics experiment with PIC microcontroller l 49/********** Go Backward ************/void Backward(char speed){ Motor_Init(); Change_Duty(sp
Robotics experiment with PIC microcontroller l 5Chapter 1Part list of Robo-PICA andIntroduce software tool1.1 Robo-PICA part listThere are 2 groups
50 l Robotics experiment with PIC microcontrollerMotor_B_FWD : Drive motor B (M-2 output) to forward direction (LED indi-cates of M-2 lights in gre
Robotics experiment with PIC microcontroller l 51Robo-PICA moves forward or backward by driving both DC motor gearboxes insame direction and at the
52 l Robotics experiment with PIC microcontrollerListing A3-1 The movement program demonstration of Robo-PICA2. Drive both motors in opposite
Robotics experiment with PIC microcontroller l 53A3.2 Remove the downlaod cable from Robo-PICA. Place the robot on the floor. Turn-on power to run t
54 l Robotics experiment with PIC microcontrollerRobo-PICA can control the speed movement by send the signal to the enablepin (EN) of motor driver
Robotics experiment with PIC microcontroller l 55For Robo-PICA, we prepare the speed control with PWM technique via soft-ware by the motor.h library
56 l Robotics experiment with PIC microcontroller
Robotics experiment with PIC microcontroller l 57The one of most important function of mobile robot is interfacing the sensors. Robo-PICA can interf
58l Robotics experiment with PIC microcontroller5.2.1 ADCON0 : A/D Control register 0Detail of each bit in ADCON0 register is shown below.ADCS1 CHS
Robotics experiment with PIC microcontroller l 59bit 1- GO/DONE: A/D Conversion Status bit1 = A/D conversion cycle in progress. Setting this bit sta
6 l Robotics experiment with PIC microcontroller1.1.2 Electronic partsZX-03Infrared Reflector(x2)ZX-01Switch input(x2)ZX-IRM38kHz Infrared Receiver1
60l Robotics experiment with PIC microcontroller5.2.3 ANSEL : Analog Select registerThe ANSEL register is used to configure the Input mode of an I/
Robotics experiment with PIC microcontroller l 615.3 ADC configurationFor using the ADC module of PIC16F887 microcontroller the following functionsm
62l Robotics experiment with PIC microcontroller5.4.5 Result formattingThe A/D converter result will store in a pair of regeter; ADRESH:ADRESL. Th
Robotics experiment with PIC microcontroller l 634. Wait the required acquisition time.5. Start conversion by setting the GO/DONE bit in ADCON0 regi
64l Robotics experiment with PIC microcontrollerGP2D120 Infrared Ranger module has 3 terminals: Power input (Vcc), Ground (GND)and Voltage output (
Robotics experiment with PIC microcontroller l 65LFAX=Therefore, L equalsFALX×=Thus, the distance value from the phototransistors will be sent to th
66l Robotics experiment with PIC microcontrollerGP2D120output voltage (V)10-bitA/D converter resultDistance (cm.)0.4 82 320.5 102 260.6 123 220.7 1
Robotics experiment with PIC microcontroller l 67This activity introduces the simple experiment about reading the analog signal.The simple Variable
68l Robotics experiment with PIC microcontrollerA6.1 Write the Listing A6-1. Compile and download the code to Robo-PICA.A6.2 Plug the GP2D120 senso
Robotics experiment with PIC microcontroller l 69A7.1 Write the Listing A7-1. Compile and download the code to Robo-PICA.A7.2 Turn-off power and unp
Robotics experiment with PIC microcontroller l 71.3 Software development tools for Robot programmingThe RoboPICA kit uses the PIC Micrcontroller PIC
70l Robotics experiment with PIC microcontrollerA7.3 Place the robot on the floor. Turn-on the power and observe its operation.A7.4 Try to place
Robotics experiment with PIC microcontroller l 71Line tracking or following is a popular activity in any Robotics activity. The purposeof this activ
72l Robotics experiment with PIC microcontrollerActivity 8Reading the Line tracking sensorIn building Robo-PICA from activity 2, both of ZX-03 Infr
Robotics experiment with PIC microcontroller l 73Listing A8-1 : The C program for reading ZX-03 line tracking sensor of Robo-PICA/*****************
74l Robotics experiment with PIC microcontrollerFrom installation ZX-03 Infrared reflector in Robo-PICA can set the line followingbehavior to 4 sce
Robotics experiment with PIC microcontroller l 75From the black line following behavior, you can apply to make the program tocontrol the Robo-PICA.
76l Robotics experiment with PIC microcontrollerListing A9-1 : The C program of Line tracking robot/**********************************************
Robotics experiment with PIC microcontroller l 77SummaryThe heart of line following robot operation are 3 factors. First, the sensor’s perfor-mance.
78l Robotics experiment with PIC microcontroller
Robotics experiment with PIC microcontroller l 79Another feature of automatic robots is that it can receive commands from a fardistance by using inf
8l Robotics experiment with PIC microcontrollerl Monitor your program structure, variables, and functions in the CodeExplorer. Generate commented,
80 l Robotics experiment with PIC microcontroller7.2 ER-4 Infrared Remote controll Operational distance is 4 to 8 meters in any open space.l The 4-
Robotics experiment with PIC microcontroller l 81In the Listing A10-1 is C program for reading data from ER-4 remote control andshows on LCD screen.
82 l Robotics experiment with PIC microcontrollerListing A10-1 : Reading data from ER-4 remote control program (final)Lcd_Init(&PORTD); // Initi
Robotics experiment with PIC microcontroller l 83This activity shows how to control Robo-PICA’s movement via ER-4 Infrared remotecontrol. The switch
84 l Robotics experiment with PIC microcontrollerListing A11-1 : The C program for Robo-PICA to controlled with ER-4 remotecontrol (continue)#inclu
Robotics experiment with PIC microcontroller l 85Listing A11-1 : The C program for Robo-PICA to controlled with ER-4 remotecontrol (final){Lcd_Out(
86 l Robotics experiment with PIC microcontroller
Robotics experiment with PIC microcontroller l 87Apppendix AActivating the License Keyof mikroC compilerAbout Free VersionThe latest version of comp
88l Robotics experiment with PIC microcontrollerCOPYRIGHTSThis documentation is copyright 2007 by Innovative Experiment Co., Ltd. (INEX) Bydownload
Robotics experiment with PIC microcontroller l 9(A) Install of the Microsoft .NET FrameworkFirst thing to do is to install the Microsoft.NET Framewo
Komentáře k této Příručce