MikroElektronika PIC Microcontrollers PIC18 Uživatelský manuál

Procházejte online nebo si stáhněte Uživatelský manuál pro Barebones pro PC / pracovní stanice MikroElektronika PIC Microcontrollers PIC18. mikroElektronika PIC Microcontrollers PIC18 User manual Uživatelská příručka

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 88
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 0
Robotics experiment with PIC microcontroller l 1
Robotics experiment with
PIC microcontroller
based-on Robo-PICA robot kit
3rd Edition
(C) Innovative Experiment Co.,Ltd.
INNOVATIVE EXPERIMENT
Zobrazit stránku 0
1 2 3 4 5 6 ... 87 88

Shrnutí obsahu

Strany 1 - PIC microcontroller

Robotics experiment with PIC microcontroller l 1Robotics experiment withPIC microcontrollerbased-on Robo-PICA robot kit3rd Edition(C) Innovative Exp

Strany 2 - Contents

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

Strany 3 - (www.microchip.com)

Robotics experiment with PIC microcontroller l 11(3) If the connection is incompleted. The message PICkit 2 not found. Check USBconnections and use

Strany 4

12 l Robotics experiment with PIC microcontroller1.3.2.2.2 Command menu descriptionFILE• Import File – Import a hex file for programming• Export Fi

Strany 5 - Chapter 1

Robotics experiment with PIC microcontroller l 13PROGRAMMER• Read Device – Reads the program memory, data EEPROM memory, ID loca-tions, and Configur

Strany 6 - 1.1.2 Electronic parts

14 l Robotics experiment with PIC microcontroller• Fast Programming - Select the PX-200 to programs the Flash device with high speed.• Check Commun

Strany 7 - 1.3.1.1 Overview

Robotics experiment with PIC microcontroller l 15(b) Access only Flash program memoryClick at Enabled box in EEPROM data border to remove the mark.

Strany 8 - 1.3.2 PICkit2

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

Strany 9

Robotics experiment with PIC microcontroller l 171.4 Programming devleopment for Robo-PICAThe summary of steps of program the Robo-PICA robot kit ar

Strany 10

18 l Robotics experiment with PIC microcontrollerTarget microcontrollerdeviceComplie buttonClock frequency ofmicrocontrollerProgram editor areaOut

Strany 11

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

Strany 12 - DEVICE FAMILY

2 l Robotics experiment with PIC microcontrollerContentsChapter 1 Part list of Robo-PICA and Introduce software tools...51.1 Robo-PICA

Strany 13 - PROGRAMMER

20 l Robotics experiment with PIC microcontroller(a) Project Name : Put the project name. mikroC IDE will create the folder tosupport your project

Strany 14 - Editing memory value

Robotics experiment with PIC microcontroller l 21void main(){ TRISB.F3=0; // Set RB3 as Output while(1) // Infinite Loop

Strany 15

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

Strany 16

Robotics experiment with PIC microcontroller l 231.5.15 Select the HEX fle which require program to microcontroller by entering menuFile à Import He

Strany 17 - 1.5 Getting Start

24 l Robotics experiment with PIC microcontroller

Strany 18

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

Strany 19 - Project

26l Robotics experiment with PIC microcontroller2.1 Technical featuresl Controlled by PIC16F887 Microcontroller with 8Kword memory. Run with 20MHz c

Strany 20

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

Strany 21

28l Robotics experiment with PIC microcontrollerFigure 2-3 : Schematic diagram of RBX-877 V2.0 Robot Controller board231837RB4RD0RD1RB1RB2RC4/SDARC

Strany 22

Robotics experiment with PIC microcontroller l 292.2.5 Programmable portThe RBX-877 V2.0 board provides 9-programmable multipurpose ports. It includ

Strany 23 - INNOVATIVE EXPERIMENT

Robotics experiment with PIC microcontroller l 3Chapter 6 Line following mission...716.1

Strany 24

30l Robotics experiment with PIC microcontrollerActivity 1 Write programs for testingRBX-877 V2.0 Controller boardProcedureFor all activities of the

Strany 25 - Chapter 2

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

Strany 26 - 2.1 Technical features

32l Robotics experiment with PIC microcontrollerActivity 1-2 Reading digital data via switch and driving soundSee the figue A1-2, it shows the schem

Strany 27 - 2.2.4 Display circuit

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

Strany 28 - LCD 16x2 (back light option)

34l Robotics experiment with PIC microcontrollerListing A1-4 : The C program for displaying message on LCD module ofRBX-877 V2.0 Rob

Strany 29

Robotics experiment with PIC microcontroller  l 35This chapter describes about how to building the Robo-PICA robot kit. The featuresof Robo-PICA ro

Strany 30 - Activity 1

36 l Robotics experiment with PIC microcontrollerActivity 2Make the Robo-PICAFigure A2-1 : Shows the parts for making a Robo-PICA.30mm. Hexstandoff

Strany 31 - 21+$.&&%

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

Strany 32 - 21+$.&&%

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

Strany 33

Robotics experiment with PIC microcontroller  l 39A2.7 At front side, attach 2 of the Hexagonal standoffs. Insert the 3x10mm. screw throughthe 3-ho

Strany 34

4 l Robotics experiment with PIC microcontroller

Strany 35 - Chapter 3

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

Strany 36 - Make the Robo-PICA

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

Strany 37

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

Strany 38

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

Strany 39

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

Strany 40 - Figure A2-13

Robotics experiment with PIC microcontroller l 45The first thing is to control robot Movement. The heart of this movement is DCmotor circuit. In Rob

Strany 41

46 l Robotics experiment with PIC microcontrollerTable 4-1 : Shows logic signal to control motor directionMotor operationShaft freeShaft locked or

Strany 42

Robotics experiment with PIC microcontroller l 47char motor_duty_= 127; // Defalt PWM 50%char motor_init_=0; // Status init

Strany 43

48 l Robotics experiment with PIC microcontrollerListing 4-1 : The source code of motor.h library file for driving the DC motor(continue)/********

Strany 44

Robotics experiment with PIC microcontroller l 49/********** Go Backward ************/void Backward(char speed){ Motor_Init(); Change_Duty(sp

Strany 45 - Chapter 4

Robotics experiment with PIC microcontroller l 5Chapter 1Part list of Robo-PICA andIntroduce software tool1.1 Robo-PICA part listThere are 2 groups

Strany 46 - 4.1 Motor library file

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

Strany 47 - (continue)

Robotics experiment with PIC microcontroller l 51Robo-PICA moves forward or backward by driving both DC motor gearboxes insame direction and at the

Strany 48

52 l Robotics experiment with PIC microcontrollerListing A3-1 The movement program demonstration of Robo-PICA2. Drive both motors in opposite

Strany 49

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

Strany 50

54 l Robotics experiment with PIC microcontrollerRobo-PICA can control the speed movement by send the signal to the enablepin (EN) of motor driver

Strany 51 - Activity 3

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

Strany 52

56 l Robotics experiment with PIC microcontroller

Strany 53

Robotics experiment with PIC microcontroller l 57The one of most important function of mobile robot is interfacing the sensors. Robo-PICA can interf

Strany 54 - Speed control of Robo-PICA

58l Robotics experiment with PIC microcontroller5.2.1 ADCON0 : A/D Control register 0Detail of each bit in ADCON0 register is shown below.ADCS1 CHS

Strany 55

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

Strany 56

6 l Robotics experiment with PIC microcontroller1.1.2 Electronic partsZX-03Infrared Reflector(x2)ZX-01Switch input(x2)ZX-IRM38kHz Infrared Receiver1

Strany 57 - Chapter 5

60l Robotics experiment with PIC microcontroller5.2.3 ANSEL : Analog Select registerThe ANSEL register is used to configure the Input mode of an I/

Strany 58 - %$#"!

Robotics experiment with PIC microcontroller l 615.3 ADC configurationFor using the ADC module of PIC16F887 microcontroller the following functionsm

Strany 59

62l Robotics experiment with PIC microcontroller5.4.5 Result formattingThe A/D converter result will store in a pair of regeter; ADRESH:ADRESL. Th

Strany 60

Robotics experiment with PIC microcontroller l 634. Wait the required acquisition time.5. Start conversion by setting the GO/DONE bit in ADCON0 regi

Strany 61 - 5.4.4 Conversion Clock

64l Robotics experiment with PIC microcontrollerGP2D120 Infrared Ranger module has 3 terminals: Power input (Vcc), Ground (GND)and Voltage output (

Strany 62 - 10-bit Result

Robotics experiment with PIC microcontroller l 65LFAX=Therefore, L equalsFALX×=Thus, the distance value from the phototransistors will be sent to th

Strany 63 - Vout Vcc

66l 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

Strany 64 - Transmit LED Photo arra

Robotics experiment with PIC microcontroller l 67This activity introduces the simple experiment about reading the analog signal.The simple Variable

Strany 65

68l 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

Strany 66 - Measured distance

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

Strany 67 - Reading the analog signal

Robotics experiment with PIC microcontroller l 71.3 Software development tools for Robot programmingThe RoboPICA kit uses the PIC Micrcontroller PIC

Strany 68 - Testing GP2D120

70l 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

Strany 69 - Activity 7

Robotics experiment with PIC microcontroller l 71Line tracking or following is a popular activity in any Robotics activity. The purposeof this activ

Strany 70

72l Robotics experiment with PIC microcontrollerActivity 8Reading the Line tracking sensorIn building Robo-PICA from activity 2, both of ZX-03 Infr

Strany 71 - Chapter 6

Robotics experiment with PIC microcontroller l 73Listing A8-1 : The C program for reading ZX-03 line tracking sensor of Robo-PICA/*****************

Strany 72 - Activity 8

74l Robotics experiment with PIC microcontrollerFrom installation ZX-03 Infrared reflector in Robo-PICA can set the line followingbehavior to 4 sce

Strany 73

Robotics experiment with PIC microcontroller l 75From the black line following behavior, you can apply to make the program tocontrol the Robo-PICA.

Strany 74 - Moves follow the black line

76l Robotics experiment with PIC microcontrollerListing A9-1 : The C program of Line tracking robot/**********************************************

Strany 75

Robotics experiment with PIC microcontroller l 77SummaryThe heart of line following robot operation are 3 factors. First, the sensor’s perfor-mance.

Strany 76

78l Robotics experiment with PIC microcontroller

Strany 77

Robotics experiment with PIC microcontroller l 79Another feature of automatic robots is that it can receive commands from a fardistance by using inf

Strany 78

8l Robotics experiment with PIC microcontrollerl Monitor your program structure, variables, and functions in the CodeExplorer. Generate commented,

Strany 79 - Chapter 7

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-

Strany 80 - Easy remote4

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.

Strany 81 - Reading Remote control data

82 l Robotics experiment with PIC microcontrollerListing A10-1 : Reading data from ER-4 remote control program (final)Lcd_Init(&PORTD); // Initi

Strany 82

Robotics experiment with PIC microcontroller l 83This activity shows how to control Robo-PICA’s movement via ER-4 Infrared remotecontrol. The switch

Strany 83 - Activity 11

84 l Robotics experiment with PIC microcontrollerListing A11-1 : The C program for Robo-PICA to controlled with ER-4 remotecontrol (continue)#inclu

Strany 84

Robotics experiment with PIC microcontroller l 85Listing A11-1 : The C program for Robo-PICA to controlled with ER-4 remotecontrol (final){Lcd_Out(

Strany 85

86 l Robotics experiment with PIC microcontroller

Strany 86

Robotics experiment with PIC microcontroller l 87Apppendix AActivating the License Keyof mikroC compilerAbout Free VersionThe latest version of comp

Strany 87 - Apppendix A

88l Robotics experiment with PIC microcontrollerCOPYRIGHTSThis documentation is copyright 2007 by Innovative Experiment Co., Ltd. (INEX) Bydownload

Strany 88

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

Žádné komentáře