go_away

Author Topic: PIC language  (Read 7448 times)

0 Members and 1 Guest are viewing this topic.

Offline polar bear6Topic starter

  • Full Member
  • ***
  • Posts: 98
  • Helpful? 0
PIC language
« 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?



Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: PIC language
« Reply #1 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)

Offline polar bear6Topic starter

  • Full Member
  • ***
  • Posts: 98
  • Helpful? 0
Re: PIC language
« Reply #2 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

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: PIC language
« Reply #3 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.

Offline polar bear6Topic starter

  • Full Member
  • ***
  • Posts: 98
  • Helpful? 0
Re: PIC language
« Reply #4 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++?


Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: PIC language
« Reply #5 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.

Offline polar bear6Topic starter

  • Full Member
  • ***
  • Posts: 98
  • Helpful? 0
Re: PIC language
« Reply #6 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?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: PIC language
« Reply #7 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

Offline polar bear6Topic starter

  • Full Member
  • ***
  • Posts: 98
  • Helpful? 0
Re: PIC language
« Reply #8 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?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,658
  • Helpful? 169
    • Society of Robots
Re: PIC language
« Reply #9 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.

Offline bietz

  • Full Member
  • ***
  • Posts: 48
  • Helpful? 0
Re: PIC language
« Reply #10 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?

Offline Nyx

  • Robot Overlord
  • ****
  • Posts: 204
  • Helpful? 0
Re: PIC language
« Reply #11 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!

Offline techy_pankaj

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: PIC language
« Reply #12 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....

Offline Eco19R

  • Full Member
  • ***
  • Posts: 104
  • Helpful? 0
Re: PIC language
« Reply #13 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/


Offline JesseWelling

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 707
  • Helpful? 0
  • Only You Can Build A Robot!
Re: PIC language
« Reply #14 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.

Offline techy_pankaj

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: PIC language
« Reply #15 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....????

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: PIC language
« Reply #16 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
1st link for me.

dunk.

 


Get Your Ad Here

data_list