![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | Thread Tools | Display Modes |
| | (permalink) |
| Moderator | Various modern Basic languages have more in common with other languages then the original langauge Basic. For me it stopped being basic when they lost the line numbers. A bit of what Wikipedia calls structured code in the original/early BASIC: Code: 10 INPUT "What is your name: "; U$ 20 PRINT "Hello "; U$ 30 REM 40 INPUT "How many stars do you want: "; N 50 S$ = "" 60 FOR I = 1 TO N 70 S$ = S$ + "*" 80 NEXT I 90 PRINT S$ 100 REM 110 INPUT "Do you want more stars? "; A$ 120 IF LEN(A$) = 0 THEN GOTO 110 130 A$ = LEFT$(A$, 1) 140 IF (A$ = "Y") OR (A$ = "y") THEN GOTO 40 150 PRINT "Goodbye "; 160 FOR I = 1 TO 200 170 PRINT U$; " "; 180 NEXT I 190 PRINT None of this makes the language any less useful. It just bugs me that they keep using that tired old name. Maybe it should be called BABL: Basic with Additions from Better Languages. The name BASIC is used to attract people who think the language will be easier to use because they see the name BASIC and think simple. Thats marketing.
__________________ search engine for electronic partsJunebug USB PIC programmer kit. USB Bit Wacker Last edited by 3v0; 6th May 2007 at 12:59 PM. |
| | |
| | (permalink) |
| Experienced Member | I learned programming in BASIC back in the 70's, and it was the easiest to learn compared to the other languages at the time (COBOL, FORTRAN, PASCAL, or Assembly). when I eventually was forced to move up to a IBM PC, compiled BASIC lost the line numbers, and I pretty much lost interest in programming. I was doing Assembly on a 6502, but the 286 was much different and the compilers used labels instead of memory locations. Last fall I took the plunge into microcontrollers. I knew from the beginning that Assembly would be the best choice of language considering the limited memory. I do look at other languages for examples, but its tough to get the details I'm looking for, usually locked into library files. A HEX file dissasembler would be cool as hell. I've been moving into more complex projects, where timing and feature setup is critical, and a higher level language would handle these much better. The BASIC compiler makes about as much sense to me as C, doubt much that I knew about BASIC will be of much use, its seems completely different. |
| | |
| | (permalink) |
| Experienced Member | wow - that brings back memories |
| | |
| | (permalink) |
| Experienced Member | Every OS I have used with BASIC, the first thing I would do is port a program I wrote a LONG time ago called prebas. I would write my code with no line numbers and used labels, prebas would then convert it and add the numbers. It was a simple program. But I have never like the numbers. Even DEC VAX Basic had them.. But it does bring back memories. |
| | |
| | (permalink) |
| Experienced Member | I can remember writing basic with line no's on my Spectrum then my Enterprise 128, Looking back I can say that it was very poor method, The language is fine but structuring your program was really hard. From what I remember about the late 70's ANSI specified a Basic with out line no's, so line no's is very old hat and cannot be compared with modern variants. I would call my self a competent Pic Basic programmer and pretty capable of writing in Pic Asm. I have seen a few comments against Basic saying ASM is better, this misconception is made by people who have never written in basic or were unfortunate enough to have used a duff version of the pic basic. I know 2 pic compiler writers and I can say that there exception asm programmers, so by using one of there basics you get the best of both worlds. The ease and readability of basic and the excellent code produced. For a Pic beginner there are 3 things they have to contend with 1 Actually learning to program and think with a programmers head 2 Lean a programming language 3 Lean about pic's Now if you have non of those 3 then BASIC is the obvious choice. Its very easy to read It's very forgiving of a bad programming style It takes care of all the pic stuff for you. For example The classic Flashing led device 16f84 dim led as portb loop: toggle led delayms 500 goto loop If you decided to write it in asm you would have to write a delay routine before you could even think about making it flash then find out how to do toggling in asm then include the appropriate Pic file. I would always though recommend that people once they get going at least understand how a pic works under the skin. I like to think I think asm and program basic |
| | |
| | (permalink) |
| Experienced Member | Pic BASICs (or any basic) are good IMHO. But, for the pic, there are limits of the lite free ones (Mikroe.com is the better of lite/free ones). But anyway, some have bloat, some are a poor version of BASIC (like the old line numbered BASIC that did not have if_then else endif). You can get the job done, but structured BASIC is nice. But I can write the code in BASIC or ASM. If it is a simple, small, get it out fast project. For sure look at BASIC (note I said simple). If it is a timing (software timing) critical project you have to research and pick the right way to go. Many people use Pic BASIC pro and ASM. Many use MikroBASIC and ASM.. But I do agree, if you have not learned and used (a good) Pic BASIC you will not like BASIC and it is not really fair to knock what you do not know. |
| | |
| | (permalink) |
| Experienced Member | Anyone who generalizes about one language being better than another is pretty much a moron. They all have their advantages and disadvantages. However I appreciate those Forum members with valid cohesive and coherent reasons for preferring one language over another. For those PIC hobbyists like me with an almost non-existent budget it seems we're pretty much limited to Assembler or C18. I'd love to add a recent BASIC language offering to my 'toolbox' but I simply don't have the funds to purchase a BASIC language. I envy those hobbyists that do have the funds and I would happily steer them toward a BASIC language called Swordfish which at first glance seems to be the nicest BASIC implementation I've come across. Have fun. Mike |
| | |
| | (permalink) | ||
| Moderator | Quote:
Most people who know several languages will agree with your statment Quote:
I too am sensitive to software prices. Esp since software tools seem to become obsolete faster then I can afford to buy them.
__________________ search engine for electronic partsJunebug USB PIC programmer kit. USB Bit Wacker | ||
| | |
| | (permalink) |
| Experienced Member | I wish I could have put it so elegantly. Of course that's what I meant. When you become proficient in several languages you gain valuable knowledge and experience that helps you decide when it's appropriate to use one over another. BTW, my first language was Apple ][ Integer BASIC and Applesoft BASIC (1979). I did however have to write the real-time operating system firmware for the EPG and EPG-II character generators in 1984 (the earliest versions of the current "TV Guide Channel") using 6502 assembly language. In a way I suppose having limited funds forced me to become proficient in Microchip's free assembler and C18 tools and I'm very thankful that both are "main stream" and shouldn't dissappear anytime soon. If Swordfish BASIC could somehow become Microchip BASIC they (Microchip) would have a pretty well rounded toolsuite offering. And if was a 'free' tool, man, that would be sweet. Which brings up a question. Why doesn't Microchip have a BASIC language offering? Do they not consider it a viable language? Or, were they happy with the commercial BASIC offerings? Last edited by Mike, K8LH; 7th May 2007 at 03:08 AM. |
| | |
| | (permalink) | |
| Experienced Member | Quote:
Lefty | |
| | |
| | (permalink) |
| Experienced Member | There's an overwhelming amount of support out there for PIC Basic over C, the same trend runs right across the board from PIC's to PC's. Perhaps they just couldn't deliver a package as refined and reliable as what is commercially available?
__________________ Spency. PIC Micro's - Your mind is the limit PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net |
| | |
| | (permalink) |
| Experienced Member | One recurring theme I have been seeing is the desire to have a free product, and that has to be first class and supported for life, this in reality is nigh on impossible. As I said I know 2 commercial basic compiler writers and I know you very difficult to make a living from it, its always a side line. So to ask them to just give a full product away is not a viable option. To give the support you have to be around for long enough and with out an income you will never be able to. I agree that some people (me I suppose) see Basic vers other languages as a religion and even religions have sub sects. So there is no ambiguity my religion is BASIC worshipping the incarnation know as PROTON with leaning now towards Swordfish. One thing is I know my religion and amongst the sub sects My favourite's are there because technically there the best. I do not write in C (about the only other major serious religion) as I do not under stand it and I see no point learning it. I know there is no advantage (for me) in learning it as I can do just as well in Proton as I could in C. Inevitably religious sects try to convert you to there's which can be a real pain in the ass, so my preaching is for the undecided. My main purpose is though to educate the mass's to learn how to play with pic's and to have fun. The obligatory link to the my cathedral is www.protongeeks.com |
| | |
| | (permalink) |
| Experienced Member | Mike K8LH, Give MikroBASIC a look. It is free to use up to 2K of code. Best for the price on the lite version. Also, a new one is http://www.sourceboost.com/. It is free as beta right now. Will be around $70 when it is complete. Support is pretty good as well. I have it working inside if MPLABS which is what I was after, so I can use all the tools. So BASIC + ASM + MPLABS + ICD2 = |
| | |
| | (permalink) | ||
| Moderator | Quote:
http://www.tiobe.com/tpci.htm has a listing of languages in use. Quote:
Popularity in order of rank
I could care less about popularity. My favorite non micro language is C# which come in at 3.5% which is aa little less then half of VB use and ranks 8th. More often people who program professionals do not have the luxury of choosing the language, Code written in X can not be maintained in Y. If you work in a shop where all the code is written in X you will code in X. At the professional nobody cares what your favorite language/religion is. Everyone plays nice.
__________________ search engine for electronic partsJunebug USB PIC programmer kit. USB Bit Wacker | ||
| | |
| | (permalink) | ||
| Experienced Member | That’s a rather inaccurate tool to base popularity, as it, (quote) Quote:
Quote:
__________________ Spency. PIC Micro's - Your mind is the limit PIC's and interfacing with other devices - a PIC Basic Guide @ digital-diy.net Last edited by gramo; 7th May 2007 at 11:47 AM. | ||
| | |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Latest |
| Dragonfly 16F877A PIC Tutor with LCD & 4x4 keypad. Comments? | William At MyBlueRoom | Micro Controllers | 6 | 27th November 2006 03:13 AM |
| free pic basic complier | dstich | Micro Controllers | 7 | 1st August 2006 07:13 PM |
| Assembly to Basic Coding | AZdave | Micro Controllers | 3 | 23rd January 2005 02:27 PM |
| PIC basic and Basic stamp | Cyborg | Micro Controllers | 5 | 21st April 2004 08:44 AM |
| Can a Basic Stamp support 2 serial ports? | Scruit | Electronic Projects Design/Ideas/Reviews | 13 | 15th August 2003 02:07 PM |