Professional Documents
Culture Documents
INTRODUCTION:
Hello guys hope you understood the really ‘down to earth things in
electronics’. Now, its time for us to step forward and explore the never ending
world of Micro-Controllers. What? Can’t believe in you; well start believing
because what you believe is that what you become!
“WHERE TO START”:
“Right here and right now” I would say. In order to understand the complete
working you can follow the step by step procedure given in this magazine. Initially
to begin with I thought of introducing you to a micro-controller family called
ATMEL 89C51\52. They are very easily available in the market. There are very
minor differences between 89C51 and 89C52. We will use 89C51 because they
have enough memory of 4KB (what thought they would have 40GB memory?) to
test the initial programs. 4KB is just enough to control too many devices.
THE PROGRAM:
The major difference between your computer and micro-controllers are that
your computer uses previous versions of these micro-controllers called micro-
processors or just processors. These processors are very high speed and high
address latching capabilities. So what processor you have? Obviously Pentium 4 or
something greater (if you trust INTEL so much). But our micro-controllers are bit
predefined i.e. you can’t add external memory just like that (4K + some memory).
You need to dedicate some ports (pin connections) and other aspects such as speed,
execution velocity etc. (more on this later).
Before developing a program, you need to know where this program is going
to run i.e. the hardware. So the characteristics of the micro-controller are to be
studied. That can be done from its architecture. The architecture of the ATMEL
89C51 is available for free downloads in our blog spot. Study the architecture
carefully because your program will use the architecture to accomplish its mission.
Once the architecture is studied the memory details have to be furnished.
This cannot be observed from the architecture. So I will help you through the
memory side. The reason for teaching you the hardware first is that to improve
better understanding. But once you ‘grow up’ you shall start with software on the
first case.
THE ARCHITECTURE:
The architecture and necessary details may be studied in the given download
file. Any questions and doubts are most encouraged. We shall do our testing and
programming step by step and unit by unit. Each unit of the micro- controllers will
be dealt in separate editions and challenges will also be given. So take a shortcut
and visit the data sheets that will provide you details on pin configurations etc.
don’t boggle your minds with the chapters of lock bits, IC programming etc. that
shall be dealt separately on the next issue.
THE SOFTWARE:
In order to test our codes we need an interface called integrated development
environment (IDE). I have chosen a very basic IDE called PINNACLE. This will
be the IDE I shall be using. If readers find any other IDE better than this try us to
give the link. The screen shots of this software shall be used to explain the working
of micro- controllers. A free download of this software is also available in our blog
spot.
This is a sample screen shot of the IDE. The ports, registers, timers, flag status are
clearly shown. A sample program (only the starting) is visible in the screen shot.
This is my program to count up to desired count from 0-99 and displaying it with a
7 segment display (this program will be taught to you very soon).
The programming method is of two varieties. One is that we can write
codes in assembly languages and second we can use embedded C. The assembly
language varies for various micro- controllers. The syntax is varied but the
operation may be the same. But in embedded C the source code is written in C (not
regular C) and compiled using cross compilers for various micro- controllers. The
C technique is very easy but we shall adapt the assembly language technique to
start with.