| Author |
Message |
mdalim
Joined: 05 Apr 2002 Posts: 17
|
28 Jun 2002 6:28 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
|
|
| Back to top |
|
 |
oddball423
Joined: 28 Jun 2002 Posts: 1
|
28 Jun 2002 11:40 |
|
|
|
|
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
|
|
| Back to top |
|
 |
mdalim
Joined: 05 Apr 2002 Posts: 17
|
28 Jun 2002 12:10 |
|
|
|
|
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
|
|
| Back to top |
|
 |
GrandAlf
Joined: 09 Mar 2002 Posts: 298 Helped: 15
|
29 Jun 2002 14:43 |
|
|
|
|
| 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.
|
|
| Back to top |
|
 |
7rots51
Joined: 17 May 2002 Posts: 1348 Helped: 14
|
29 Jun 2002 18:18 |
|
|
|
|
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.
|
|
| Back to top |
|
 |
btbass
Joined: 20 Jul 2001 Posts: 953 Helped: 79 Location: Oberon
|
12 Jul 2002 15:15 |
|
|
|
|
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!
|
|
| Back to top |
|
 |
105389
Joined: 08 Nov 2001 Posts: 26
|
12 Jul 2002 23:48 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
|
|
| Back to top |
|
 |
rchadwick
Joined: 22 Feb 2002 Posts: 25
|
23 Sep 2002 21:46 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.
|
|
| Back to top |
|
 |
rpflybywire
Joined: 19 Jul 2002 Posts: 2 Location: SAN JOSE
|
25 Sep 2002 2:11 |
|
|
|
|
| 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.
|
|
| Back to top |
|
 |
Kobe2
Joined: 16 Oct 2001 Posts: 16
|
29 Sep 2002 1:46 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
|
|
| Back to top |
|
 |
105389
Joined: 08 Nov 2001 Posts: 26
|
30 Sep 2002 1:12 |
|
|
|
|
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
|
|
| Back to top |
|
 |
zarthrag
Joined: 01 Oct 2002 Posts: 13 Location: My big nice dorm room
|
02 Oct 2002 2:44 |
|
|
|
|
| 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.
|
|
| Back to top |
|
 |
mohsen_deeb
Joined: 02 Oct 2002 Posts: 5 Location: cairo
|
02 Oct 2002 9:16 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 [url] www.microchip.com[/url])
|
|
| Back to top |
|
 |