Re: basic vs c vs assembly
I can't comment about C, never could wrap my head around it.
Started with BASIC back in '78, worked in COBOL since I graduated. Starting with PIC BASIC a few years ago was a breeze.
You'll find just about anything you need for PIC BASIC here and on MeLab forum. I don't know if there's as much material for C.
If you plan on using PIC 32s, then I think you might as well stick with C. As for 10-18F PICs, BASIC or C should be the same.
Robert
Re: basic vs c vs assembly
As for Assembler, both BASIC and C get converted to Assembler and then machine code by the compiler. So Assembler gives you access to functionality not covered by BASIC or C. Do you need that "power"?
There's not a lot of examples on google in Assembler. If I had started programming PICs when I graduated in '83, I would have used Assembler (was 2nd in class).
But today, for "semi-pro hobbyist" use, PIC BASIC has all the features I need. As far as I know, PBP can access all features on a PIC one way or another.
Robert
Re: basic vs c vs assembly
Assuming you are equally new to each of the languages, this is what you would encounter.
Assembly is the lowest level code and is the hardest to master. The time taken to deliver a project maybe the longest if you use assembly language. However, it is akin to driving a Top Notch racing car and you can get the best output if you know how to use it.
Basic is a (HLL)higher level language. It bundles a group of assembly language instructions into a single HLL command. Time taken to deliver a project is many times faster compared with assembly. There may be limitations on the math you could possibly do with basic. You need to check the specific dialect of basic you use to see if it allows you to handle integer, floating point math. Most low cost basics are simply integer basic. No support for floating point math. Many dialects including PicBasicPro have commands to handle various peripherals.
C is a more universal HLL. Similar to basic, it bundles a group of assembly language instructions into a single HLL command. Time to deliver is comparable with what you could achieve with Basic or any HLL. Most C dialects would support floating point math which may be needed for that once-in-a-while project. The biggest advantage you get with C - most code snippets online across microcontrollers would very often be in C. So, you are in a crowd and will get example code easily. You need to choose a dialect that has commands to handle the peripherals you use.
Whichever language you choose, be sure your compiler supports inline assembly so that you can tweak code when you really need to. If you code for a living, any HLL is better than assembler since you can code that much faster. The compiler takes care of the data sizes and most times you do not have to remember if you are adding 2 bytes or a byte and an integer etc.
Re: basic vs c vs assembly
N-bit math thanks to DT:
http://www.picbasic.co.uk/forum/showthread.php?t=12433
(Links in chat for 32 bit multiply & division by DT)
Robert
:)
Re: basic vs c vs assembly
Completely agree. If you've used either before, choose that one as the learning curve won't be so steep. "C" is taught in technical schools these days, so new grads are more comfortable with it. The same used to be true of BASIC. There are no technical advantages either way.