|
User's Guide Appendix Datasheets PDXBot RoboMaxx Robothon Buy Robots! View Cart Shipping Privacy About Contact |
ProgrammingOne of the goals for the Mark III is to provide software and a programming environment that is easily accessible to beginners, while at the same time not limiting for experts. In particular, no proprietary programming environment or software is required. The Mark III supports a variety of languages and computing platforms to appeal to all levels of expertise.There are a variety of languages that can be used to program the Mark III. It is suggested that you pick the one most suited to your level of expertise and experience. Sample code for self-test, servo calibration, MiniSumo and Line Following is available for each of the supported languages. First, a Note About SupportWhat kind of support do you get, you might ask? Well, we can't guarantee much hand-holding or personal attention. Sorry! We're all doing this for free and have jobs of our own, so please rely on the following:
Supported LanguagesThe members of the MarkIII project have figured out and documented methods for the use of a variety of programming languages with the robot.Your choice of a programming language depends on your experience, interest level, and budget. There are other languages and programming tools for the PIC16F877 than these; we just aren't currently supporting them. The supported languages and their advantages are:
The MarkIII kit comes with a license for CH Basic, a nice BASIC language compiler specially designed for the PIC. This compiler normally costs $99, but is included in the price of your kit. The maker of the compiler has donated licenses to the project for $10 each, which is a great bargain. For nonprogrammers, this is the best way to go. Links to Example ProgramsCH Basic examples are here: http://thegnar.org/mIII/markIIICode.htm. CC5X examples are here: http://groups.yahoo.com/group/MiniSumoMarkIII/files/C-Samples/. OOPIC examples are here: http://groups.yahoo.com/group/MiniSumoMarkIII/files/OOPIC%20Samples/. CCS C examples are not ready yet. Sorry. Neither are JAL examples. Links to Software ToolsMembers of the MarkIII community have created tools to help program the robot.Rick Farmer's PICLoader, a boot loader or ROM Monitor program that comes preprogrammed into the PIC chip included with the Mark III kit. This small program gives the PIC chip enough smarts to talk to a computer and enables it to reprogram the Flash memory in the PIC with new robot programs using only an RS232 serial cable. Without the PICLoader, you would also need to buy a PIC programmer board, such as the Warp-13a from Newfound Electronics (available from the Mark III Store). Mark Gross's miii_tools (http://thegnar.org/mIII/mIII_tools.zip) include CHPre.exe and mbuild.bat, which help convert the output of CH Basic so that it can be loaded into the PIC using Rick's PICLoader and either HyperTerminal or BotLoader (see below). These are required for all CH Basic users. Power users can hand-edit the CH Basic assembly code and run MPLAB themselves to do this, but even they can benefit by having it done automatically using Mark's tools. Mark's instructions for using them can be found at http://thegnar.org/mIII/mIII_tool_chain.htm. Pete Skeggs's companion BotLoader and BotLdrCmd are Windows programs that make it easy to send your robot programs to the MarkIII's PICLoader. You can upload programs to the MarkIII using only a simple terminal program such as HyperTerminal (that comes with Windows), but it can be difficult to get all the settings right. BotLoader automatically finds the serial port in use, configures it correctly, and talks to Rick's PICLoader for you. Just browse your PC's hard disk to select your .hex file or type it in to the filename box, then click Go!. BotLdrCmd does the same thing except runs as a command line program for power users to integrate with their make environment. Instructions are here. Pete Skeggs's CLst2Asm program for enabling the use of CCS C with the version of the PICLoader (1.1) burned into the standard MarkIII PICs. This is useful if you plan to use a variety of languages with the MarkIII. Alternatively, you can reprogram the PICLoader with version 1.3, which automatically works with the hex files output by CCS C, but which makes it hard to use other languages. Pete Skeggs's Reloader, which (seemingly) does the impossible -- it can reprogram the PICLoader with another version of PICLoader. You can use this program to switch between versions 1.1 and 1.3 of the PICLoader. Instructions are available here. General Procedure for Programming the RobotRegardless of the language you choose, you will need to perform these steps:
Mark's miii_tools performs steps 3 and 4 for CH Basic users. Steps 3 and 4 are not necessary if you are using CCS C and have switched bootloaders to version 1.3. Describe functioning of example sumo code, example line following codeT.B.D. |
| webmaster@junun.org | |