Specifications

Chapter 1 - Introduction to Microprocessors
The program adds the contents of two memory locations, and views their sum on port A. The
first line of the program stands for moving the contents of memory location "A" into one of the
registers of central processing unit. As we need the other data as well, we will also move it into
the other register of the central processing unit. The next instruction instructs the central
processing unit to add the contents of those two registers and send a result to port A, so that
sum of that addition would be visible to the outside world. For a more complex problem,
program that works on its solution will be bigger.
Programming can be done in several languages such as Assembler, C and Basic which are most
commonly used languages. Assembler belongs to lower level languages that are programmed
slowly, but take up the least amount of space in memory and gives the best results where the
speed of program execution is concerned. As it is the most commonly used language in
programming microcontrollers it will be discussed in a later chapter. Programs in C language
are easier to be written, easier to be understood, but are slower in executing from assembler
programs. Basic is the easiest one to learn, and its instructions are nearest a man's way of
reasoning, but like C programming language it is also slower than assembler. In any case,
before you make up your mind about one of these languages you need to consider carefully the
demands for execution speed, for the size of memory and for the amount of time available for
its assembly.
After the program is written, we would install the microcontroller into a device and run it. In
order to do this we need to add a few more external components necessary for its work. First
we must give life to a microcontroller by connecting it to a power supply (power needed for
operation of all electronic instruments) and oscillator whose role is similar to the role that heart
plays in a human body. Based on its clocks microcontroller executes instructions of a program.
As it receives supply microcontroller will perform a small check up on itself, look up the
beginning of the program and start executing it. How the device will work depends on many
parameters, the most important of which is the skillfulness of the developer of hardware, and
on programmer's expertise in getting the maximum out of the device with his program.
Previous page Table of contents Chapter overview Next page
© Copyright 1999. mikroElektronika. All Rights Reserved. For any comments contact webmaster.
http://www.mikroelektronika.co.yu/english/product/books/PICbook/1_Poglavlje.htm (9 of 9) [4/2/2003 16:17:33]