The people were happy because they did not know that it was all around them and could be utilized. That was good. Then Faraday came and a stone has started to roll slowly The first machines using a new sort of energy appeared soon. A long time has passed since then and just when the people finally got used to them and stopped paying attention to what a new generation of specialists were doing, someone came to an idea that electrons could be a very convenient toy being closed in a glass pipe. It was just a good idea at first, but there was no return.
|Published (Last):||9 August 2009|
|PDF File Size:||9.45 Mb|
|ePub File Size:||19.80 Mb|
|Price:||Free* [*Free Regsitration Required]|
The people were happy because they did not know that it was all around them and could be utilized. That was good. Then Faraday came and a stone has started to roll slowly The first machines using a new sort of energy appeared soon. A long time has passed since then and just when the people finally got used to them and stopped paying attention to what a new generation of specialists were doing, someone came to an idea that electrons could be a very convenient toy being closed in a glass pipe.
It was just a good idea at first, but there was no return. Electonics was born and the stone kept on rolling down the hill faster and faster A new science - new specialists. Blue coats were replaced with white ones and people who knew something about electronics appeared on the stage. While the rest of humanity were passively watching in disbelief what was going on, the plotters split in two groups software-oriented and hardware-oriented. Somewhat younger than their teachers, very enthusiastic and full of ideas, both of them kept on working but separate ways.
While the first group was developing constantly and gradually, the hardware-oriented people, driven by success, threw caution to the wind and invented transistors. Up till that moment, the things could be more or less kept under control, but a broad publicity was not aware of what was going on, which soon led to a fatal mistake! Being naive in belief that cheap tricks could slow down technology development and development of the world and retrieve the good all days, mass market opened its doors for the products of Electronics Industry, thus closing a magic circle.
A rapid drop in prices made these components available for a great variety of people. The stone was falling freely The first integrated circuits and processors appeared soon, which caused computers and other products of electronics to drop down in price even more.
They could be bought everywhere. Another circle was closed! Ordinary people got hold of computers and computer era has begun While this drama was going on, hobbyists and professionals, also split in two groups and protected by anonymity, were working hard on their projects.
Then, someone suddenly put a question: Why should not we make a universal component? A cheap, universal integrated circuit that could be programmed and used in any field of electronics, device or wherever needed? Technology has been developed enough as well as the market. Why not? Like all good things, this powerful component is basically very simple.
It is made by mixing tested and high- quality "ingredients" components as per following receipt: 1. The simplest computer processor is used as the "brain" of the future system.
All that is placed in some of the standard packages. A simple software able to control it all and which everyone can easily learn about has been developed.
On the basis of these rules, numerous types of microcontrollers were designed and they quickly became man's invisible companion. Their incredible simplicity and flexibility conquered us a long time ago and if you try to invent something about them, you should know that you are probably late, someone before you has either done it or at least has tried to do it. Very low prices enable them to be embedded in such devices in which, until recent time it was not worthwhile to embed anything. Thanks to that, the world is overwhelmed today with cheap automatic devices and various smart appliences.
Prior knowledge is hardly needed for programming. It is sufficient to have a PC software in use is not demanding at all and is easy to learn and a simple device called the programmer used for loading raedy-to-use programs into the microcontroller. So, if you are infected with a virus called electronics, there is nothing left for you to do but to learn how to use and control its power. How does the microcontroller operate? Even though there is a large number of different types of microcontrollers and even more programs created for their use only, all of them have many things in common.
Thus, if you learn to handle one of them you will be able to handle them all. A typical scenario on the basis of which it all functions is as follows: 1. Power supply is turned off and everything is stillthe program is loaded into the microcontroller, nothing indicates what is about to come 2. Power supply is turned on and everything starts to happen at high speed!
The control logic unit keeps everything under control. It disables all other circuits except quartz crystal to operate. While the preparations are in progress, the first milliseconds go by.
Power supply voltage reaches its maximum and oscillator frequency becomes stable. SFRs are being filled with bits reflecting the state of all circuits within the microcontroller. All pins are configured as inputs. The overall electronis starts operation in rhythm with pulse sequence. From now on the time is measured in micro and nanoseconds. Program Counter is set to zero.
Instruction from that address is sent to instruction decoder which recognizes it, after which it is executed with immediate effect.
The value of the Program Counter is incremented by 1 and the whole process is repeated As you can see, all the operations within the microcontroller are performed at high speed and quite simply, but the microcontroller itself would not be so useful if there are not special circuits which make it complete.
In continuation, we are going to call your attention to them. The size of the program that can be written depends on the size of this memory.
ROM can be built in the microcontroller or added as an external chip, which depends on the type of the microcontroller. Both options have some disadvantages. If ROM is added as an external chip, the microcontroller is cheaper and the program can be considerably longer. The internal ROM is usually smaller and more expensive, but leaves more pins available for connecting to peripheral environment.
The content of this memory is cleared once the power supply is off. For example, if the program performes an addition, it is necessary to have a register standing for what in everyday life is called the sum.
For that purpose, one of the registers in RAM is called the "sum" and used for storing results of addition. Its contents may be changed during program execution similar to RAM , but remains permanently saved even after the loss of power similar to ROM.
It is often used to store values, created and used during operation such as calibration values, codes, values to count up to etc. A disadvantage of this memory is that the process of programming is relatively slow. It is measured in miliseconds. Their purpose is predefined by the manufacturer and cannot be changed therefore.
In other words, each bit of this register controls the function of one single pin. Program Counter Program Counter is an engine running the program and points to the memory address containing the next instruction to execute. After each instruction execution, the value of the counter is incremented by 1.
For this reason, the program executes only one instruction at a time just as it is written. Howeverthe value of the program counter can be changed at any moment, which causes a jump to a new memory location. This is how subroutines and branch instructions are executed. It consists of several smaller subunits, of which the most important are: A draft, Author: Milan Verle. Instruction decoder is a part of the electronics which recognizes program instructions and runs other circuits on the basis of that.
The abilities of this circuit are expressed in the "instruction set" which is different for each microcontroller family. It is a kind of working desk used for storing all data upon which some operations should be executed addition, shift etc. It also stores the results ready for use in further processing. One of the SFRs, called the Status Register, is closely related to the accumulator, showing at any given time the "status" of a number stored in the accumulator the number is greater or less than zero etc.
A bit is just a word invented to confuse novices at electronics. Joking aside, this word in practice indicates whether the voltage is present on a conductor or not. If it is present, the approprite pin is set to logic one 1 , i. Otherwise, if the voltage is 0 V, the appropriate pin is cleared 0 , i. It is more complicated in theory where a bit is referred to as a binary digit, but even in this case, its value can be either 0 or 1.
Each microcontroller has one or more registers called a port connected to the microcontroller pins. Because it is possible to change a pin function according to the user's needs. These registers are the only registers in the microcontroller the state of which can be checked by voltmeter!
Even pulses generated by the oscillator enable harmonic and synchronous operation of all circuits within the microcontroller. It is usually configured as to use quartz-crystal or ceramics resonator for frequency stabilization. It can also operate without elements for frequency stabilization like RC oscillator. It is important to say that program instructions are not executed at the rate imposed by the oscillator itself, but several times slower.
It happens because each instruction is executed in several steps. For some microcontrollers, the same number of cycles is needed to execute any instruction, while it's different for other microcontrollers.
Accordingly, if the system uses quartz crystal with a frequency of 20MHz, the execution time of an instruction is not expected 50nS, but , or even nS, depending on the type of the microcontroller! Most programs use these miniature electronic "stopwatches" in their operation. These are commonly 8- or bit SFRs the contents of which is automatically incremented by each coming pulse. Once the register is completely loaded, an interrupt is generated!
PIC Microcontrollers - Programming in C
Architecture and Programming of Microcontrollers. Electronics built in one single chip capable of controlling a small submarine, a crane or an elevator. PIC microcontrollers, for beginners too. PIC Microcontrollers. Numerous illustrations and practical examples along with detailed description of the PIC16F will make you enjoy your work with the PIC microcontrollers. Sign in Join. Sign in.
Architecture and Programming of 8051 Microcontrollers
Architecture and Programming of Microcontrollers by Milan Verle. Publisher : mikroElektronika Number of pages : Description : Learn in a quick and easy way to program microcontroller using many practical examples we have provided for you. Despite its relative old age, is still the most commonly used microcontroller at present. The book contains details of its architecture and many practical examples, both simple and complex, useful program routines, instructions on handling the programmer for Atmel 51 series, and the guide on using the development systems for Atmel microcontrollers. Home page url. Download or read it online for free here: Read online online html.