how to program my robot vex v0.5 in mplab/ other program

Hello everyone
I have a robot model of VEX V.05, I built it and checked his movements by remote control,
I want to program it to work alone using several simple commands.
First I want to understand the electrical diagram of microcontroller I mean,
the use of I / O of PIC18F8520, I’d love to see a link on this issue.
I know how to program the pic18 mplab environment, and program c language,
How do I start programming my robot to perform simple commands
Such as reverse, drive forward, turn right, turn left
I would be happy if something could help me
Note: I am open to suggestions also use other programs if they are more simple and my robot’s programming.
Thank you all,

eagal

Try here:

http://www.vexrobotics.com/products/programming

There are several environments you can use in addition to mplab.