the new software prorgam

hello

i was from team 849 of unionville high school

this year we have not entered the robotics competition so we didnt get our packages and stuff like that…i was wondering if someone could e-mail me the new program for the the c-bot chip i heard about. since we are no longer using the pbasic stamp, and instead using c, i would like to learn it before next year’s compeition, where we will most likely have a robotics team

my e-mail is [email protected]

thank you

You can download the MPLAB IDE and a 60 day trial of the C-18 compiler from Microchip: http://www.microchip.com/1010/pline/tools/index.htm

A non time limited version that was provided to the teams, but that can’t be distributed.

thx. ur link helped me greatly

can any1 send me a copy of the non-time limit edition lolz

It’s illegal to send it to others. Much like using P2P programs.

=(

ok thx anywayz…i’ll just have to learn it on 60 dayz lolz

If you have knowledge of the previous (PBASIC) system, all you should need is an elementary knowledge of C to make the transition. Mostly everything is the same for people who aren’t doing fancy stuff. (interrupts, EEPROM access, etc.)

A good tutorial on C can be found here: http://www.strath.ac.uk/IT/Docs/Ccourse/

I recomend Pic-Lite. It is quite simple to integrate with MPLAB and there is a book that helps you program with it. Unfortunately it only programs some of the mid-range pics but that limitation is a small one.
http://www.htsoft.com/

Help ME!!! I spent all of my summer learning PBasic and did not know that we were going to use C. Can someone please tell me where i can get info on programing in C.

This resource was recommended before – it’s not for the faint of heart, but it has good examples and is fairly thorough. Should be sufficient to get an understanding of the default code.

Also, read through the default code documentation and programming guides available on Innovation First’s website.

Good luck!

well, there are TONS of resources on the net where you can learn C, type in C programming tutorial in any major search engine and you are going to get a TON of hints. Supposedly the one on the way stuff works website is pretty good. If you have the time before you need to be writing a ton of your own code, though, I would recommend getting a book on it at your local bookstore, or amazon.com or something like that. Also, there are many other FIRSTers out there that are more than willing to help teach you…such as, for example…Me :smiley: :stuck_out_tongue: I’d tell you the books that I learned from, but they are currently loaned out to teammembers to help them out.

Once you know the basic commands and syntax etc, the best thing you can be doing is reading through the default code and figuring out what each line, function, and algorithm does. Then try modifying it to do something a little different. Test, debug, and do the same for another function. (obviously some functions are more easy to do this with. I wouldnt go messing around with the initialization functions and such as of yet). Then, start trying to write your own functions. Before you know it, you’ll be able to program in C!

Any questions, comments, etc feel free to email me, PM me, IM me, etc etc. If for some reason there is trouble looking up my profile or if you feel lazy my email is [email protected]
Good luck and have fun!

-Neal Orman, Lead programmer for team 1002: Circuitrunners

Thanx 4 the help

Unlike PBASIC, C is a very standard and widely used language. You can go to your local bookstore and probably find about a dozen different books on C. Don’t get a C++ book. Years ago I used Ivor Horton’s Beginning C++, it wasn’t the most readable book out there but it was very comprehensive. I imagine that there is a C version available. There are also numerous online tutorials available, some good, some awful, just search google.

If you’re looking for a compiler to learn C, I recommend Codewarrior Learning Edition. Its for Mac/PC and its very powerful and easy to use and comes with a lot of different reference stuff. Also check out www.codewarrioru.com, they have free programming classes online with a real instructor, forums to ask questions, etc.

You could also look into taking a basic computer science class at a local high school or college, many of them have switched over to Java, but there are plenty of holdouts.

Honestly, if you want to learn programming or computer science, PBASIC is a terrible language to start with. If you want to do anything in CS beyond FIRST I’d highly recommend taking an introductory class taught in Java. Once you know Java and have a good background in CS writing code for FIRST is fairly easy to pick up.

For $50 you can buy C18 from IFI, probably only to schools and FIRST teams, but I guess you can get it even if you’re not competing this year. It may be “dumbed down” a bit from the full version, but it’s plenty complete for learning how and doing our RC programming.

If you just want to have a C environment to work with (and many others have given suggestions) the LCC environment from Univ of Virginia is pretty good, reasonably simple and lightweight to install, and FREE for non-commercial use. Get it at http://www.cs.virginia.edu/~lcc-win32/.

We use LCC quite a bit, since it gives a way to develop C modules for inclusion in the RC code w/o every programmer needing an RC to test on. If you do this, my recommendation is to use no int variables in your program, since int in C18 is 16 bits and int in LCC (and most “big machine” compilers) is 32 bits. This means if you use int variables while testing in LCC, you won’t find out about fixed point overflow (and other) problems until you move the code to the RC. To get around this, use char, short, and long, which turn out to be the same length in C18 and LCC.

Bill

Ahem…“using P2P programs” is not illegal. Please don’t spread FUD.

I’m not sure, but can’t you use “short int…” w/o quotes and ellipse to get a 16-bit value?

You can use “short int”, but it’s equivalent to “short” alone. The default variable type in C is int, so if you leave out the word “int” you get an int anyway. It’s common practice to leave out the word “int” when declaring shorts and longs, but either way is fine.

unsigned a; // an unsigned int (16 bits in C18, 32 bits in most “big” machines)
short b; // a signed short int (16 bits in C18)
short int c; // same thing
long d; // a signed 32 bit int
unsigned long int e; // unsigned 32 bit int
And so on.