Go Back   VEX Forum > Official VEX Technical Support FAQs > Programming FAQs

Programming FAQs This section contains FAQs dealing with Vex programing using Microchips MPLAB IDE only. This is NOT EasyC Tech Support.

Reply
 
Thread Tools
  #1  
Old 10-28-2005, 04:07 PM
Programming the VEX Controller

Can the VEX Controller be programmed? If so, what do I need? Also, what language will be used for programming?

Yes, the Vex Controller can be programmed using the C programming language. The Programming Kit available on the web uses easyC. Also, we have VexLabs MPLAB Programming Kits available which comes with cables, programming board, MPLAB and a C18 compiler from Microchip. The VexLabs MPLAB Programming Kits are not available online. Please see our Downloads page for more info.
Reply With Quote
  #2  
Old 10-28-2005, 04:15 PM
Re: Programming the VEX Controller

Is anyone aware of a JVM that can be used on the Vex Controller?

No, the Vex Controller can only be programmed in C or Assembly Language, these are the only languages supported by the Microchip Compiler.
_________________
Ricky Torrance
Electrical Engineer
VexLABS
Reply With Quote
  #3  
Old 10-28-2005, 04:17 PM
Re: Programming the VEX Controller

I don't know much about programming, but I am familiar with C programming. Any suggestions on getting started for the beginner?


We have more documents on our IFIRibotics web site to help you get started. We have developed 2 other Robot Controllers, the FRC and the Mini; both pages have more documents that you can look at. Although you can not use any of the code from these sites, you can gain a lot of information and examples. All the controllers use the same Microchip processor and all use “C” as the programming language, therefore; the code is very similar. By comparing the Reference Guides to the Default Code, you can see examples of how the default code works. I would start from the Mini Controller page (http://www.ifirobotics.com/edu-rc.shtml) and then use the Start Programming link (http://www.ifirobotics.com/mini-rc-read-me.shtml). After reviewing all the manuals, try making small changes to the Default code. If you make a mistake, no problem; just download the Vex Default Code and your unit is just like it came from the factory. Soon, you should be well on your way to writing your own code.
_________________
Ricky Torrance
Electrical Engineer
VexLABS
Reply With Quote
  #4  
Old 10-28-2005, 04:18 PM
Re: Programming the VEX Controller

I have the full array of tools from developing code for our FRC robot last spring. It looks like Can I use the same tools to program the VEX. I have the CBOT compiler, MPLAB and I understand I need a different version of the IFI loader. Am I accurate in my accessment?


Yes, you can use the same tools for developing your code and use the current version of the IFI Loader to download your hex file. The other item you need is the Programming Module which is included in the easyC or the Prototype Programming Kit.
_________________
Ricky Torrance
Electrical Engineer
VexLABS
Reply With Quote
  #5  
Old 12-09-2005, 09:56 AM
Can I progam the bot without knowing C++

I’m 16 years old and am looking forward to get this vex kit. Will I be able to control the robot without programming C++. Is there something I can learn on?


No programming is required, the unit comes with default code. The Vex System is the good place to start learning C. The easyC Programming Kit comes with software developed by Intelitek. This is a graphical tool that allows you to begin programming in C much easier. If you have further questions about easyC, you will need to contact Intelitek at support@intelitek.com or call 1-800-777-6268.
_________________
Ricky Torrance
Electrical Engineer
VexLABS
Reply With Quote
  #6  
Old 08-15-2006, 10:27 AM
Re: Programming the VEX Controller

Is there a way to program without easy C (meaning I want to create my own .c file)?


Yes there is a way to program with out using easyC. You can use Microchip’s MPLAB IDE and Microchip’s C18 Compiler (these come with our Prototype Programming Kit), see our Downloads page for more info .
Reply With Quote
  #7  
Old 08-15-2006, 10:31 AM
Re: Programming the VEX Controller

If I program something in easyC and download it to the Vex, does it wholly replace the startup code or does the new code somehow coexist with the startup code? I want to implement interrupt-driven buffered serial i/o without breaking the ability to communicate through the program port.



When code (Default/User) is download to the Vex Controller, the previously downloaded hex file (Default/User Code) is completely written over with the new hex file.
Reply With Quote
  #8  
Old 08-15-2006, 11:03 AM
Re: Programming the VEX Controller

Our school district owns 5 Vex controllers and one programming kit. We are unable to download programs or the default code (using EasyC) to one of the controllers. We always get the message "make sure your controller is connected and turned on". All other controllers work fine. So, I downloaded your IFI_Loader and have attempted to use it to download the factory firmware. But I get a message saying to hold down the programming button until the PRGRM STATE LED is orange. However it stays green. Attempts to download yield "Opening port...no robot controller found."


Since other units work fine, you will most likely have a problem with that one Controller. You can return it if it is still under warranty. If not, please call us for repair, but here are a few things to try first: Try downloading new Master Code and Default Code to the Vex Controller using our IFI Loader.
Reply With Quote
  #9  
Old 08-15-2006, 11:17 AM
Re: Programming the VEX Controller

I am a new Vex user. I purchased the programming kit (EasyC) and have also downloaded the MPLAB IDE and C18 compiler. What do I need to do to get this config working? I am not certain how to set MPLAB to use the Radio Shack programmer. It only offers MPLAB ICD 2 as a programmer choice. Is there a doc that shows what header files, libraries, etc. are needed to start programming with MPLAB?



For help on using MPLAB you need to contact Microchip http://www.microchip.com/stellent/id...&part=SW007002. As stated on our Download page: The MPLAB IDE allows you to open your workspace and edit the files, the Compiler allows you to create a new .hex file, and the IFI Loader allows you to download these .hex files to the Vex Controller. Thus you do not use MPLAB to program but only to create/build a .hex file. You must use MPLAB version 7.2 and the C18 Compiler version 2.4 that comes with our C-BOT disk. Our IFI Loader is used to download or program the Vex Controller. For the files you need in MPLAB, just open the workspace using MPLAB and it will load the files you need.


I have installed the Prolific USB driver that came with the EasyC install disk. I believe the correct procedure is to create a .hex file with MPLAB/C18 and then use the IFI Loader to install - outside of the MPLAB environment.

My current problem is that I have installed:
o MPLAB IDE v7.30
o MPLAB C18 Compiler v3.02
o MPLIB v4.02
o MPLINK v4.02

I have also downloaded the Vex starter code at http://www.vexlabs.com/docs/vex-startup-code.zip

The problem is that the library files in the starter code contain COFF files that are not compatible with the MPLAB tools listed above. I get the following error at link time:

Error - Coff file format for 'ifi_library.o' is out of date.
Error - Could not build member 'ifi_library.o' in library file 'C:\VEX\VexCode\Vex_alltimers.lib'.
Errors : 2

Is there anyplace where I can get an updated version of the starter code? If not, I don't see any easy way to get an older version of the MPLAB toolsets



No, there is no updated version. You are correct. You must use MPLAB version 7.2 and the C18 Compiler version 2.4 that comes with our C-BOT-COMPILER disk. The C-BOT disk is on our Downloads page .
Reply With Quote
  #10  
Old 08-15-2006, 12:11 PM
Re: Programming the VEX Controller

1) Does the kit come with a full license of easyC and C18? I see Microchip sells C18 for $499. What is the difference. Is it limited to Vex chips, programmer, etc?

2) I own several other tools for PIC programming, CCS C Compiler, PIC Basic, Pic Start programmer. Can any of these be used?


1. The Programming Kit, that is available online, comes with version 2 of easyC and a C18 Compiler that work with the Vex micro-processor - PIC18F8520. Microchips Compiler works with all their micro-processors.

We also sell a VexLabs MPLAB Programming Kit that is available only over the phone. This Kit comes with MPLAB, a Vex C18 Compiler, a Programming Module, and our IFI Loader. See our Downloads page for details.

2. You must use one of the above programming kits to program the Vex controller.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 11:02 PM.