Which is better for beginners PIC Basic or PIC C?

Status
Not open for further replies.

mdalim

Junior Member level 1
Pic program C or Basic?

Can anyone shed me some light..should one who is new to embedded programming go with PICbasic or PIC C?..I know little basic, but no knowledge of C.. Is C compiler much much better than basic.?.and is it worth the learning curve one has to take to learn C to do a PIC program.
and most important what are the main advantage of C over basic....

oddball423

Newbie level 1
I did some research on the subject, there is lots of books/links on PIC Basic even a free compiler **broken link removed** also check https://www.dontronics.com/ but finally i will like to go to C since I have more experience using it and also it seems more capable than basic ....

another book with simple examples is PIC Microcontroller Project Book
Author: Iovine, John - and many more ... I just read it and felt quite intereted by the simple projects .. what other way to start

hope it helps,
odg

mdalim

Junior Member level 1
Thanks Odg for yr input.
I am quite comfortable with basic, it is just that I dont want to waste time learning C and finally finding it not very much superior in programming PIC. You did mention that C seems more capable than basic, can you pls elaborate..
Is basic capable enough to do say 90% of equivalent C?..Another question is since you tried both, how do you compare the codes produced by the 2 compilers..how compact is the C code compare to one produce by basic?..

Thanks

GrandAlf

I can recommend Pic Basic Pro as a good starting point. I have no doubt that C can probably produce tighter more efficient code, but of course it does little on its own without pre written libraries, this is fine if you have access to the ones you want, or are able to write them. The main advantage to Basic is that it much easier to learn, and has most of the common interfaces built in. With modern compilers it is capable of very good performance with little effort. No doubt proficient C programmers would disagree. Anyway why not give both a try, there are trial programs available for both languages.

7rots51

I think it is better to start with C and do not waste your time with basic ,C is a structured language and suitable for any microcontroller that you want for future.
After mastreing C you can miggerate to C++ which is object oriented.
I think bsic is for hobbist not for professionals.

btbass

C is the language, the elegant poetic language, you can write programs in C that do what you want programs to do. By not getting in the way, the language encourages you to code. It seems that other PC languages have congenital productivity obstacles, and C has none. C has evolved into a language that greases the way to a working program: It is fast, efficient and predictable. Once you get into C, you can do anything the computer can do, which is perhaps because C was designed by one programmer to be used by other programmers. Other languages have other birthrights.
COBOL was designed so that managers could read code; BASIC was designed for people who are not programmers; FORTRAN is for scientists; ADA comes from a committee-a goverment committee, no less; PILOT is for teachers; PASCAL is for students; FORTH, LISP and PROLOG are specialty languages; C however, is for programmers.
NO CONTEST!
8O

105389

Junior Member level 3
wich is best?

y not try them all and find the one that sutes you the best for speed on small programs try basic or asm but for the more complex bits try C i've never got on with C even on the 68000 but each to there own no one can tell you wich is best for you so try them all and find out and if you like it use it ?

all the best

Junior Member level 3
Basic Vs C

If you know Basic, Use PicBasic Pro. It's excellent. You will get a lot of 'helpful' people tell you basic sucks and C is for 'Real' programmers. Modern Basic is structured. PicBasic allows you access to all the inner workings of the PIC. In addition, it comes with built-in routines that will save you a lot of time. If you truly like to program just for programming's sake, and know C, go ahead. If you'd rather concentrate more on what you want your program to do, and less on how to do it, Get Basic. People's prejudices agains basic seem to fit into one of 2 categories...

1) I remember when Basic was INTERPRETED. C is compiled, and therefore much faster. This is true, but MODERN basic is compiled too. Get a good compiler, program properly, and you'll have an output comparable to C.

2) Some people think harder is better. All these people tend to run Linux as well. No offense to Linux, but if you listen to the Linux geeks, you'd think what I do is absolutely impossible. I run a home/web server on Windows 98SE. It's crashed twice in the past year, and not at all the past 6 months. I don't even bother rebooting every couple of months or so. The key is to get things stable, and leave them alone. My friends with Linux Boxes, installing the latest patches, new hardware, etc... have LESS reliable results.

rpflybywire

Newbie level 2
PicBasic is easier to use than Most of the C bassed compiliers I have seen. I personally prefer the C language, it has a better structure and give you alot more control over what you are doing. That said, I would recommend PicBasic for biginners to learn about programming and the PIC's capabilities. PicBasic has good built in functions that make getting started really quick. If you plan to move on to C, but want to work up to it slowly check out the "Jal" project; http://www.voti.nl/jal/ , it is more of a Pascal based language than C. It's free and gives pretty good results.

Kobe2

Junior Member level 1
Re: Pic program C or Basic?

picbasic pro of microingeneering lab & asembler are best combination for quick and powerfull works - its tested in commercial products
its not very poetic way but very usefull and quick

105389

Junior Member level 3
hi this is like asking how long is a peice fo string? I use a mix for ASM & picbasic in the same programe I did do C in the past but never got on with it so its a matter of try it and see give em all a go and find the one you like or mix them as you like this works ok for me! but you will get code out of picbasic faster as you do not need to do any setting up of the cpu just tell the program wich cpu you are using and it sets it up for you but as with all of these type of programs there is a space cost for the code the best for small code is still asm hope this is of help!

keep on picing

zarthrag

Newbie level 6
I personally love C, but then again I never wrote many basic programs. If you are up to learning a language for the PIC, try HiTech C or one of the many others-it's easier than ASM and more powerful than basic. Also, C/ASM will let you easily utilize the features of the PIC. While Basic is simple, an "identical" C program will likely be smaller/faster. Besides, ANSI C is a valuable skill.

mohsen_deeb

Newbie level 4
Re: Pic program C or Basic?

Actually I didn't work with basic, but I think c is much more easier, powerful and interactive, Plus you will can easily find many plateform utilising using c in a very easy way like Keil (for all microcontrollers not only pic) and MP-Lap ( which you can download freely from www.microchip.com)

Status
Not open for further replies.