Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Which is better for beginners PIC Basic or PIC C?

Status
Not open for further replies.

mdalim

Junior Member level 1
Joined
Apr 5, 2002
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
79
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....

Thanks in advance
 

oddball423

Newbie level 1
Joined
Jun 28, 2002
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
16
I did some research on the subject, there is lots of books/links on PIC Basic even a free compiler http://spot.fho-emden.de/ftp/MICRO/picbas.zip also check http://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 ....

so start with PIC Basic and jump to C when u feel comfortable

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
Joined
Apr 5, 2002
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
79
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 :D
 

GrandAlf

Advanced Member level 2
Joined
Mar 9, 2002
Messages
520
Helped
47
Reputation
92
Reaction score
6
Trophy points
1,298
Location
UK
Activity points
4,730
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

Advanced Member level 4
Joined
May 17, 2002
Messages
1,184
Helped
25
Reputation
50
Reaction score
12
Trophy points
1,318
Activity points
9,651
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

Advanced Member level 5
Joined
Jul 20, 2001
Messages
1,897
Helped
438
Reputation
880
Reaction score
287
Trophy points
1,363
Location
Oberon
Activity points
12,861
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
Joined
Nov 8, 2001
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
123
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
 

rchadwick

Junior Member level 3
Joined
Feb 22, 2002
Messages
25
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
212
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
Joined
Jul 19, 2002
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
SAN JOSE
Activity points
28
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
Joined
Oct 16, 2001
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
48
Re: Pic program C or Basic?

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

105389

Junior Member level 3
Joined
Nov 8, 2001
Messages
25
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
123
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
Joined
Oct 1, 2002
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Tulsa, OK
Activity points
46
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
Joined
Oct 2, 2002
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
cairo
Activity points
38
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.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top