Ingeniero Electronico

Páginas: 118 (29303 palabras) Publicado: 24 de noviembre de 2012
BASIC for PIC microcontrollers

The complete BASIC programming language manual for PIC microcontrollers!

Nebojsa Matic
Author

January / 2003
1

CHAPTER I

THE FUNDAMENTS OF PIC BASIC

CHAPTER II
CHAPTER III
CHAPTER IV
CHAPTER V
CHAPTER VI
CHAPTER VII
APPENDIX A
APPENDIX B

BASIC ELEMENTS OF PIC BASIC LANGUAGE
OPERATORS
INSTRUCTIONS
SAMPLE PROGRAMS FOR SUBSYSTEMSWITHIN THE MICROS
SAMPLES WITH PIC16F84 MICROCONTROLLER
SAMPLES WITH PIC16F877 MICROCONTROLLER
MPLAB
MicroCode studio

In this book you can find:











Practical connection samples for:
Temperature sensors, AD and DA converters LCD and LED displays, relays. Every
example is commented in details with detailed connection scheme
Program writing
Learn how to write yourown program, correct mistakes and use it to start a microcontroller.
Instruction Set
Every instruction is explained in detail with the example how to use it.
MicroCode studio
How to install it, how to use it
MPLAB program package
How to install it, how to start the first program, how to connect BASIC and MPLAB etc

Preface
In order to simplify things and crash some prejudices, I willallow myself to give you some advice
before reading this book. You should start reading it from the chapter that interests you the most,
in order you find suitable. As the time goes by, read the parts you may need at that exact
moment.If something starts functioning without you knowing exactly how, it shouldn't bother you
too much. Anyway, it is better that your program works than that itdoesn't.Always stick to the
practical side of life. It is much better for the program to be finished on time, to be reliable and, of
course, to be 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 your microcontroller is composed of escapes your knowledge. You are not supposed to
know the whole history ofelectronics in order to assure the income for you or your family.Do not
expect that you will find everything you need in one single book. The information are dispersed
literally everywhere around you, so it is necessary to collect them diligently and sort them out
carefully. If you do so, success is inevitable.With all my hopes of having done something worthy
investing your time in.
Yours NebojsaMatic

2

Chapter 1
THE FUNDAMENTS OF PIC BASIC
Introduction
1.1 BASIC for PIC microcontrollers
1.2 PIC microcontrollers
1.3 First program written in PIC BASIC
1.4 Writing and compilation of a BASIC program
1.5 Loading a program into the microcontroller memory
1.6 Running your program
1.7 Problem with starting your program (what if it doesn't work)

Introduction
Simplicity and ease,which the higher programming languages bring for program writing as well as broader application
of the microcontrollers, was enough to incite some companies as Microengeneering to embark on the development of
BASIC programming language. What did we thereby get? Before all, the time of writing was shortened by
employment of prepared functions that BASIC brings in (whose programming in assemblerwould have taken the
biggest portion of time). In this way, the programmer can concentrate on solving the essential task without losing his
time on writing the code for LCD display. To avoid any confusion in the further text, it is necessary to clarify three
terms one encounters very often.
Programming language is understood as a set of commands and rules according to which we write theprogram and
therefore we distinguish various programming languages such as BASIC, C, PASCAL etc. On the BASIC
programming language the existing literature is pretty extensive so that most of the attention in this book will be
dedicated to the part concretely dealing with the programming of microcontrollers.
Program consists of sequence of commands of language that our microcontroller executes one...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Ingeniero en Electronica
  • Ingeniero Electronico
  • Ingeniero Electronico
  • Ingeniero Electronico
  • ingeniero electronico
  • Ingeniero en electronica
  • ingeniero electronico
  • Ingeniero Electrónico

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS