the friendly Professor
Unfortunately, there are many prejudices against BASIC.
Here are some.
BASIC is defined being slow. This remark arise in the time when BASIC was stored on the computer as source text. An interpreter has to read BASIC statement by statement. Every statement must be translated in executable pieces normally subroutines of the runtime library. The first step to increase speed were tokens. The precompiler translated the BASIC keywords in so called tokens. A small (?!) operation system interpreted these tokens and called the corresponding subroutines. A faster recognition of the keywords and memory saving are the goals. Many BASIC programmable devices are working still this way. That means a simple BASIC statement needs about 50 µs for execution, but only with a 30 MHz x-tal.
In contrast to such devices, iL-BAS16 is a real compiler not a precompiler. The whole source code is translated to machine language which is directly executable by the microcontroller. This increases speed tremendos. For example: The BASIC statement LET COUNT = 0 needs just 1 µs on an microcontroller with 4 MHz clock. The speed gain 1500! Obviously there a also more complex statements which needs a lot of more time but this is the same on token interpreter.
2. Expenditure of development
At least, BASIC programs are easy to handle because BASIC statements are more abstract than machine codes. And this abstarction is good for human brains. You can write the solution of your problem (= program) on a higher level than the machine can do. This adaption is made by the high language compiler like C or Turbo Pascal. The compiler cut a complex BASIC statement into small slices of machine codes or calls to subroutines. A programmer who writes assembler programs must do both, solve the problem and the job of a compiler.
Abstract languages simplify and speed up programming tremendos.
BASIC is not an old, slow language. Also the reproach BASIC programs are not comprehensible isn't true. You can write unreadable programs in any language. Only your skill , experiance and discipline prevent bad programs. Good programs are sctructured, well annotated and carefully tested.
Because of EMC and power consumption the clock of the microcontroller should be low as possible. Therefore, best use of the microcontrollers resources should be self-evident. iL-TROLL and its tools are these which fit all best.
4. Post Scriptum
In conclusion we said how important low xtal frequencies are to get best emc results. Neverthenless the new iL-TROLL-B2 and soon iL-TROLL-B3 are driven by 20 MHz instead of 4 MHz. Emc measuring have shown best results for pic microcontroller even for such high frequencies. A careful design and lcb layout is fundamentally.
|Since 1982 we are developping hard- and software in accordance your wishes|
|PIC is a
Trademark of Microchip, Arizona
iL-TROLL is a Trademark of Ing.Büro Lehmann, Hausach