Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC Basic Or C Compiler

Status
Not open for further replies.

apoorv_garg

New Member
Hi
I'm working on a Micromouse (Maze Solving robot). This is the first time I'm working with PIC Microcontrollers.
I have downloaded C18 compiler alongwith MPLAB IDE.
I have come across many sites providing source codes with Basic Compliler.
I'm familiar with C. Suggest me whether to go for C compiler or PIC Basic.

Thanking you in advance
Apoorv
 
Go for which ever you're familiar with - I take it you do know that the C18 compiler is ONLY for the 18 series PIC's?. However, it is a full version (just with a lower level of optimisation is you don't buy it) - I don't think there are any similar BASIC compilers available free?.
 
If the basic compiler if full featured, and free. And you know C. Sounds like the answer if C..

I think MikroBASIC has a 18F version of basic. One of them does.

But again, if you know C and have a free compiler, nuff said. I would go C.
 
I'd say go with Proton PicBasic.... (Proton Development Suite from Crownhill)

it's so easy to use, and very intuitive.
Support from the actual programmers and user forums is second to none.

I don't buy much software for personal use, but PDS is definately on my recommended list... 10/10
 
I hate BASIC -1 point
I like C +1 point

+1 > -1, so I say go with C. But that's just me.
 
dknguyen said:
I hate BASIC -1 point
I like C +1 point

+1 > -1, so I say go with C. But that's just me.
I hate C -1 point
I like BASIC +1 point

+1 > -1, so I say go with BASIC. But that's just me.

But I think I gave good advice before. Go with C as you know C... Or ASM.
 
it depends on what you are going to do. If it's just fussing around learning micros, basic or C would be ok. If it's anything serious, use C.
 
Basic is only for people that don't want to learn C or assembly.
 
Sceadwian said:
Basic is only for people that don't want to learn C or assembly.

People knock BASIC, yet for almost all purposes it's as good as C, it's generally far faster to develop then C, and much easier to read.

Don't forget, NOTHING actually runs either C or BASIC, essentially they both just create a series of links between pre-written assembly subroutines.
 
apoorv_garg said:
Hi
This is the first time I'm working with PIC Microcontrollers.

From the information above, I would say us a Basic compiler over the C18 unless you find another C compiler. Why? You do not want your first attempts to be high end microcontrollers. And since C18 convers the high end series PICs, this precludes you from using the 16 series PICs. You need a good firm foundation to stand on before trying to build high end stuff.

In the end it all gets boiled down to ASM instructions, so personally why speak Spanish or German to a French guy and have a third party French interpreter in the middle with his pocket book calling your name when you could just speak French and be done with it.
 
Nigel Goodwin said:
People knock BASIC, yet for almost all purposes it's as good as C, it's generally far faster to develop then C, and much easier to read.
Not to mention that most microcontroller dialects of Basic have many hardware oriented functions and statements that allow use of more complex abilites with ease. One line adc, i2c, pwm, etc...
 
Last edited:
Nigel Goodwin said:
People knock BASIC, yet for almost all purposes it's as good as C, it's generally far faster to develop then C, and much easier to read.

Don't forget, NOTHING actually runs either C or BASIC, essentially they both just create a series of links between pre-written assembly subroutines.

sigh. sorry but that is incorrect. C and some BASIC compilers produce machine language directly. There are libraries but you have to explicitly call them. What you are describing is an interpreter. Many BASIC's are interpretive but I've never seen a C compiler like that.

Basic is a poor choice for serious work. It has serious drawbacks - non-standard structures, poor portability and inefficient bit manipulation (though some dialects are better) to name some. Interpretive BASICs have hideous performance.

Phil
 
donniedj said:
From the information above, I would say us a Basic compiler over the C18 unless you find another C compiler. Why? You do not want your first attempts to be high end microcontrollers. And since C18 convers the high end series PICs, this precludes you from using the 16 series PICs. You need a good firm foundation to stand on before trying to build high end stuff.

In the end it all gets boiled down to ASM instructions, so personally why speak Spanish or German to a French guy and have a third party French interpreter in the middle with his pocket book calling your name when you could just speak French and be done with it.

Yes, C18 would be a poor choice for the midrange PICs. So would a compiler for AVR. How about using a C compiler that was actually meant for the PIC16s??? There are quite a few.

But there is no reason to start with the PIC16 series. Using C18, you can build all manner of applications. The same set of issues will present themselves in either product line.

sorry, your French, German and Spanish analogy goes right over my head. If you meant to say you should use assembler because the compiler just gets in the way, then we truly disagree.
 
Sceadwian said:
Basic is only for people that don't want to learn C or assembly.
BASIC is also for people that know assembly but are just doing something silly for the kids, a neighbor, the office, etc. and do not require a lot of time or effort.

I think Nigel said it very clear. BASIC and C drop in assembly chucks of code. At the micro level, one is easier to read and faster to code in (BASIC).

So, if one (BASIC) is easier to read and code in and they do the same thing (drop in ASM chunks)??? DUH!!!

And like Philba said, if you have a real project, assembler is the best. Not lauching any space shuttlers here tonight at my house.. But those two people make the best point IMHO..

EDIT: For the PIC, there are many BASIC compilers that drop bloated chunks in (on the PC the exist too. And C compilers as well).

Again, for the Microchip, Proton is NICE (I think Sceadwian mentioned it in a few post, though he is not too lazy to learn C and ASM). Also, MikcroBASIC is not bad and cheap if less than 200 lines of code. MElabs has PRO version that is good.
 
Last edited:
philba said:
Basic is a poor choice for serious work. It has serious drawbacks - non-standard structures, poor portability and inefficient bit manipulation (though some dialects are better) to name some. Interpretive BASICs have hideous performance.

Phil

Amen. When I used to *try* to use BASIC on my TRS80 M100, I never understood what the hell I was really writing. C's syntax is natural to me now, though I suppose you like what you learned initially.
 
ArtemisGoldfish said:
Amen. When I used to *try* to use BASIC on my TRS80 M100, I never understood what the hell I was really writing. C's syntax is natural to me now, though I suppose you like what you learned initially.

I still have a M100, can you send me the C compiler you used back then? And what year was that? I doubt you used C on it. And again, on the microcontroller BASIC compilers, like said before it drops chucks of ASM/HEX code in.

A couple use tokens (MBASIC), but I named a couple that do not. So not you again have easy to read, fast to write code in and code that is tight as most other compilers.
 
donniedj said:
FROM the INFORMATION ABOVE, I would say us a Basic compiler over the C18 unless you find another C compiler.

People please... Stop the references to serious work arguments when a newborn microcontroller coders step on the scene. Completely nonsensical.
 
OK, let me get your point straight, because he's a newbie, he can't ever expect to do serious software development? right? Am I the only one sees a problem with that line of reasoning?
 
And like Philba said, if you have a real project, assembler is the best. Not lauching any space shuttlers here tonight at my house.. But those two people make the best point IMHO..
Uh, funny, I sure don't recall saying that. In fact, I'm pretty sure I would never say that. I don't even think that.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top