Lesson 1: Setting Up The PIC

ukrainianlegalElectronics - Devices

Nov 2, 2013 (4 years and 6 days ago)

92 views

Lesson 1
: Setting Up The PIC

Objective:


The student

will learn how to set up the VEX PIC microcontroller for programming.

Lesson:


Before doing anything you must make sure you are in the correct platform.

Go to Robot
-
>
Platform Type and make sure it
says “VEX 0.5 PIC”. If it does not, in the same menu go to
Innovation First (IFI) and find VEX 0.5 PIC and click on it. It should have changed, but double check just to
be safe. If you skip this step none of the code you compile will work.

Next you need to

download the master firmware.

The Master firmware allows the robot to understand
how to read code and needs to be replaced at the start of every class. If you do not reset the master
firmware your code will probably not work.

Make sure that the microcontr
oller has a batter, it is turned on and the orange cable is plugged int
o the
Serial port. Go to Robot
-
> Download Firmware
-
> Master CPU firmware
-
>

Standard
File(VEX_Master_V10.bin). Do not touch the microcontroller until the process is completed.

After
downloading the master firmware you will need to download the

RobotC

firmware.

The RobotC
firmware allows the robot to understand the commands used in RobotC. If you don’t upload the RobotC
firmware you won’t be able to compile your code onto the robot.

Ma
ke sure that the microcontroller has a batter, it is turned on and the orange cable is plugged int
o the
Serial port. Go to Robot
-
> Download Firmware
-
>
RobotC

firmware
-
>
Standard File(VEX_
PIC
_
0955
.bin).
Do not touch the microcontroller until the proces
s is completed.

Now you are ready to compile your code. If you hit F7 you can “spellcheck” your code for errors. Hitting
F5 will spellcheck it first and then; if there are no errors, it will send the code to the robot.

You can also load sample code by goin
g to
File
-
> Open Sample Program
and clicking on the folder that
interests you. Check out the
Basic Movement

code to see how code is run.