1.1 Why BASIC?Originally devised as an easy-to-use tool, BASIC became widespread on home microcomputers in the 1980s, and remains popular to this day in a handful of heavily evolved dialects.
Iflash 2.8.1 code#
The generated assembly code is further translated into executive HEX code which can be written to microcontroller memory.Programmer is a device which we use to transfer our HEX files from computer to microcontroller memory. The program written in BASIC and saved as file program.pbas is converted by compiler into assembly code (program.asm). The process of translation of BASIC program into executive HEX code is shown in the figure below. Chapter 2 deals with the structure of BASIC program in details.Compiler is a program run on computer and its task is to translate the original BASIC code into language of zeros and ones that can be fed to microcontroller. There is plenty of resources on BASIC programming language out there, so we will focus our attention particularly to programming of microcontrollers.Program consists of a sequence of commands written in programming language that microcontroller executes one after another. There are various programming languages such as BASIC, C, Pascal, etc. This allows programmer to concentrate on solving the important tasks without wasting his time on, say, code for printing on LCD display.To avoid any confusion in the further text, we need to clarify several terms we will be using frequently throughout the book:Programming language is a set of commands and rules according to which we write the program. What did we thereby get? First of all, developing applications is faster and easier with all the predefined routines which BASIC brings in, whose programming in assembly would take the largest amount of time.
Iflash 2.8.1 upgrade#
If you do so, the success is inevitable.With all my hopes of having done something worthy investing your time in.Yours,Nebojsa MaticChapter 1: The BasicsIntroductionWhy BASIC?Choosing the right PIC for the taskA word about code writingWriting and compiling your programLoading program to microcontrollerRunning the programTroubleshootingIntroductionSimplicity and ease which higher programming languages bring in, as well as broad application of microcontrollers today, were reasons to incite some companies to adjust and upgrade BASIC programming language to better suit needs of microcontroller programming. The information are dispersed literally everywhere around us, so it is necessary to collect them diligently and sort them out carefully. Do not expect that you will find everything you need in a single book, though. You are not supposed to know the whole history of electronics in order to assure the income for you or your family. Better to finish the application on time, make it reliable and, of course, get paid for it as well as possible.In other words, it doesn’t matter if the exact manner in which the electrons move within the PN junctions escapes your knowledge. Always stick to the practical side of life. Anyway, it is better that your program works than that it doesn’t. If something starts functioning without you knowing exactly how, it shouldn’t bother you too much. As the time goes by, read the parts you may need at that exact moment. You should start reading it from the chapter that interests you the most, in any order you find suitable. MikroElektronika2008 On-line editionMikroBasicza mikrokontrolereEdin MusicTable of ContentsPrefaceChapter 1: The BasicsChapter 2: Elements of BASIC LanguageChapter 3: OperatorsChapter 4: Control StructuresChapter 5: Built-in and Library RoutinesChapter 6: Examples with PIC Integrated PeripheralsChapter 7: Examples with Displaying DataChapter 8: Examples with Memory and Storage MediaChapter 9: Communications ExamplesAppendix A: mikroBasic IDEPrefaceIn order to simplify things and crash some prejudices, I will allow myself to give you some advice before reading this book.