Let's Make Robots!

What's the difference between the BS programming language and PIC's Language?

I've been programming a BASIC Stamp II, and so-far-so-good. However, one of the main things that has bothered me about it is its cost. I couldn't afford to build all my robots with a BS II. 

 

I was wondering, as this is one of my biggest concerns, what's the difference between the BASIC Stamp programming Language and the PIC language? This may seem like a dumb question, but keep in mind that I'm pretty new to all this.

 Seeing that there's a PIC chip inside the BS II, I'm hoping that there's no difference.

 The only BS programing is the editor for the BS II. Can I switch to PIC easily without learning another language? 

And please, just answer the question without a barrage of insults towards the BS Family. I know where many of you stand in this. 

 

Thank you for your help. One day I might be good at this kind of thing. :)

 

Isn't there 1 free editor that you can use for all PICs? I got the "Serial PIC Programmer". How does the programming in this editor differ from that of the BS editor?

 Krumlink mentioned PICBASIC. Is that compatible with the axe023, PICAXE 28-X1, and pretty much all the "standard" PICS?

 Can I convert Frits's beginners tutorial code into Swordfish Basic? 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Lol! so true...
Of course, how many bots would you intend to have on the go at a time? I'm hard pressed to keep one development project alive. I'd say if you had one or two BS's and you plugged them into whichever your hot projects were that would probably be OKay!!

Another microcontroller to consider would be the AVRs, which have quite a few users supporting them in various forums, such as http://avrfreaks.net

There is a free Basic compiler in BASCOM that has been said to be a good next step from Basic Stamp, having some similarities but with extensions in functionality.

And AVRs actually have been optimized for C from the very beginning, if you'd like to try an advanced programming language at some point.

The native PIC language is RISC assembler. Almost all PIC data sheets contain the full instruction set. Microchip publish a full Intergrated Develpment Environment (IDE) for it and it's COMPLETELY FREE! You can step through your code on-screen without promming it into the PIC and there are only 31 (depending on the PIC) instructions to learn. Given that PICs are also COMPLETELY FREE (engineering samples) your only expenditure would be a programmer. You can build one (eg JDM) for about $10 and the software to drive it is also COMPLETELY FREE.

So, there you go. No fancy boards, no fancy bootloaders, the whole thing's free (except the programmer). All you have to do is learn 31 little instructions.

I MUST MUST MUST Finish this.

Actually, apart from the language, the fundamental difference between a PIC and most other pic-based solutions is the bootloader. (Can anyone clarify if BS has a bootloader?) The raw PIC is programmed by a pair of special programming pins. In the case of "other" PIC-based controllers, these pins are used in the factory to program a small piece of code called a bootloader. Thereafter, teh user doesn't have to use the programming pins because your program is pushed into the PIC's serial port (a different pair of pins) THROUGH the running bootloader program (hence, it's also sometimes called "through programming").

Basic Stamps use an interpreted Basic, with serial loaded "tokens" (from your program) into them which is interpretted by the resident firmware, a type of bootloader, from best I can tell or have read.
You can go through a lot of headaches that way. You can use C (A very powerful programming language), a 18F series chip which is optomized for C, and a PICkit 2 programmer. JDM's just plain don't work and are an ancient peice of equipment. You can purchase the PICkit2 from microchip and it comes with a free 16F690 (Dont quote me on the chip).

Much of this is correct, but it is what gave me the low level understanding which is absent from high level entry points. I stnad by my assertion from my earliest days that had I spent the money on a programmer, then subsequently learned what a programmer does, I would have felt like it had been a shocking waste of money. A programmer is such a fundamental component of a PIC project that if you can't build and understand one, well... low level PIC isn't for you.

My JDM never gave me single hint of trouble. I abandoned it after 6 affectionate years for two reasons: the tolerance of the /MCLR input changed on some very modern PICs and the Vpp was no longer suitable and secondly, it's becoming increasingly difficult to buy a PC with a standard RS-232 port. I now have a PICkit2 and it did come with a free 12F629 on a very nice development PCB. BUT, it cost me $50.

The C compiler isn't cheap, either and if you're going to program low level code in C (a language which I would venture most C programmers don't actually know as their experience tends to be that of stringing lots of library functions together) then you may as well do it in RISC and be super-efficient.

The other advantage of the PICkit is that you prom the PIC directly from the Microchip development environment: you don't need to load your compiled code into an external prommer program.

And that is why MPLAB prevails. It is all in one. If you looked around a bit you would find the free C compiler, which is limited to a certain degree but that doesnt matter.

You then can use MPLAB IDE which you can use for assembly language or C. Below is a screen shot of MPLAB. There are tools of all sorts to use with it. http://lne.byexamples.com/wp-content/uploads/2008/02/mplab.png

It is all relative to what you want to use. The bag o shi oh sorry BS2 is common to use BASIC programming language, while PICS can use PICBASIC, assembler, C and many others. If you are using the BS2 I would use BASIC as it is optomized to use it.