Society of Robots - Robot Forum

Software => Software => Topic started by: polar bear6 on July 14, 2006, 11:39:09 AM

Title: PIC language
Post by: polar bear6 on July 14, 2006, 11:39:09 AM
what is the easiest programming language for PIC?
i have heard that PBasic is the easiest programming language but that is for Basic Stamp not PIC right?


Title: Re: PIC language
Post by: Admin on July 16, 2006, 09:25:59 AM
The basic stamp uses a version of BASIC, while PICs are made for C.

As long as your compiler (which converts the higher programming language to a machine level language) can produce a .HEX file in the format required, you can use any language you want for any microcontroller.

I recommend C for PICs.  8)
Title: Re: PIC language
Post by: polar bear6 on July 16, 2006, 01:10:37 PM
but isn't C quite hard to learn?
and by the way I'm buying Boe Bot tomorrow  ;D
Title: Re: PIC language
Post by: Admin on July 16, 2006, 01:31:00 PM
If you are buying boe bot just use BASIC.

A programming language is only complicated when the syntax is difficult to master (such as assembly). However, the concepts are what you really need to know to program. Once you learn a concept in one programming language, you can easily do that concept in any other programming language. Concepts include definitions, variables, functions, arrays, trees, pointers, etc.

The reason I say BASIC is easiest is because the syntax is the easiest. But it lacks in features and function, not allowing you to apply more advanced concepts in your programs.
Title: Re: PIC language
Post by: polar bear6 on July 16, 2006, 06:06:51 PM
is Pbasic the same as BASIC?
if i learn Basic, will it be hard to get into C?
and what is C++?

Title: Re: PIC language
Post by: Admin on July 16, 2006, 06:20:16 PM
PBASIC is the more modern version of BASIC. It has significantly improved and simplified syntax. Any version of BASIC out today will probably use the syntax of PBASIC.

C++ is the modern version of C. The syntax is basically the same, yet C++ has much improved functionality over C. This why it has ++ in front of it  :P
C++ has many features (often unneccessary) that require too much processing for a microcontroller, and so only the more basic C is used for it.

I started out with BASIC when I was a kid (80's) and started using PBASIC in the 90's. I didnt get to learn C++ until college (2000). The basics of C will be easy to learn if you know BASIC - printf, functions, variables . . . but you might need a book to go beyond that. I took a lot of programming in college, really helped me.
Title: Re: PIC language
Post by: polar bear6 on July 16, 2006, 07:04:53 PM
is syntax like grammer, like you know the commands but you don't know how to put them together because the syntax is hard.
and how long does it take to learn to program? it doesn't take like 6 months right? I'm not the sharpest knife in the drawer but I'm not stupid, i get like C/B in math. its like 4/5 on a scale of 1-6.

I was a kid (80's)

cool, did you have an afro?
Title: Re: PIC language
Post by: Admin on July 16, 2006, 07:21:54 PM
I seriously doubt you will have any problem with it. Just 'borrow' the sample code they have posted online and reverse engineer it. I bet it wouldnt take more than an hour for you to get your Boe Bot running its first program.

and syntax is the grammar of the programming language. the concept is the same, but the command line is different.

for example, one language might do
220 printf('Hello, world!');
where another would do something like
cout << 'what up, dog?';

both commands print something to your screen, only the syntax is different.

haha no, the afro is a 70's thing. I was born in '81, so thankfully i missed the 70's . . . radical, dude!  :P
Title: Re: PIC language
Post by: polar bear6 on July 17, 2006, 07:01:50 PM
i got my boe bot today, and its really cool, i think i will play with it for some weeks now, and maybe buy some upgrade kits later, or maybe make some.
http://www.parallax.com/images/prod_jpg/28013.jpg
that one costs 100 bucks here in norway! it has to be cheaper to make one myself, any other ideas for upgrades i can make myself?
Title: Re: PIC language
Post by: Admin on July 18, 2006, 07:31:23 AM
buy a $15 sharp IR and mount it on a $9 servo that rotates it. mount the servo on your current boe bot with some velcro or double sided sticky tape. you get an instant scanning sensor.
Title: Re: PIC language
Post by: bietz on July 28, 2006, 07:01:14 PM
I think I'm gonna buy boe bot soon :)
Is it possible to program it in C++? Or at least C? Because I don't really like programming without C++ usually ( :o) )

BTW is Boe Bot good if I want to learn electronics?
Title: Re: PIC language
Post by: Nyx on July 29, 2006, 01:24:11 PM
I think I'm gonna buy boe bot soon :)
Is it possible to program it in C++? Or at least C? Because I don't really like programming without C++ usually ( :o) )

BTW is Boe Bot good if I want to learn electronics?

If there is a C++ compiler for it, then it should be. Otherwise, there should be a C compiler, and you may be able to find tools to translate C++ into C... And finally, you can always do object-oriented programming in C (http://www.w3.org/Library/User/Style/Cpp.html).

Guess why I'm making my robot from a PC ;) That way I don't have to deal with 3rd party tools, rough performance restrictions and limited programming languages!
Title: Re: PIC language
Post by: techy_pankaj on March 08, 2007, 07:43:47 AM
wat is a boe bot??...and i am for time being not making a robot with a microcontroller in it...
i am making a simple robot with differential drive phenomena in it in which i will control the speed of DC motors using potentiometers or other actuators....

and i guess i will have to learn at least one language for programming...so i was thinking of doing a course or going myself through a book to learn programming...which language shud i learn so tht i am able to programme quite advanced robots??....
and can u give me the name of some code designer, compiler and programmer software..i know one PIC BASIC...but i guess tht is for PIC microcontollers only....
Title: Re: PIC language
Post by: Eco19R on March 09, 2007, 04:57:52 PM
If you want a PIC compiler that uses BASIC I would get PIC BASIC PRO, http://www.melabs.com/

Title: Re: PIC language
Post by: JesseWelling on March 09, 2007, 07:15:30 PM
Guess why I'm making my robot from a PC ;) That way I don't have to deal with 3rd party tools, rough performance restrictions and limited programming languages!

One of the reasons I like the gumstix setup.
Title: Re: PIC language
Post by: techy_pankaj on March 12, 2007, 04:59:39 AM
from where i can get a boe bot??
and how much is the approximate cost in US dollars or Indian Rs....????
Title: Re: PIC language
Post by: dunk on March 14, 2007, 05:23:33 AM
Quote
from where i can get a boe bot??
look here:
http://www.google.com/search?sourceid=navclient&ie=UTF-8&rlz=1T4IBMA_en___GB214&q=boe+bot (http://www.google.com/search?sourceid=navclient&ie=UTF-8&rlz=1T4IBMA_en___GB214&q=boe+bot)
1st link for me.

dunk.