Programming Microcontrollers |
Microcontrollers with EPROM memory are suitable for the development of the device as possible rescheduling content EPROM. EPROM programming is done in for that purpose-designed device. They are available as standalone devices with its own processor and interface for entering data into the EPROM, or devices that typically connect to the parallel (CENTRONICS) port of the computer, which they then used as the interface.
In the second case are much cheaper but need adequate software for entering code in EPROM. Software for this purpose must:
Different types have different voltages EPROM programming and should accurately identify and verify that software for data entry just sets this value during programming, and if you need to make a correction. Sophisticated software tools for recording data in EPROM will translate in 'C' or 'Visual Basic' or another programming language written program for the microcontroller into a set of instructions (program code) just for the CPU microcontrollers is selected and enter those instructions in EPROM. Expensive software tools to support the work of the different types of CPU and more manufacturers and types of microcontrollers. Of course, an integral part of software is certain ASCII / HEX editor to read the contents of EPROM.
An imaginary small program in the language that we use to say was this:
START REG_1 = MEM_LOK_A REG_2 = MEM_LOK_B REG_3 = REG_1 + REG_2 PORT_A = REG_3 END
The program adds the contents of two memory locations and the sum is sent to port A. Of course, for more complex tasks are programs that solve them. Programming can be done in several languages and most are 'assembler', 'C' and 'BASIC'. Assembler language belongs to the low levels that are programmable slow but at least take place and the best solution in terms of program execution speeds. Programs in C are easier to write, but they are better understood, and up to 7-8 times slower than assembler. BASIC is the easiest to learn and its instructions are nearest human reasoning but it is much slower.
In any case, before you choose one of these languages, it is necessary to thoroughly consider requests for program execution speed, memory size and available time, and based on that, select the programming. Written program is first translated, and then via a serial cable is loaded into the microcontroller. Translation is the process of a true original program executable program that contains instructions that the microcontroller understands and executes. Written program must be placed in memory of the microcontroller. There are more ways, one of them implies the existence of other programs that are loaded into memory, which usually use serial communication microcontroller to access its memory.
So, microcontroller programming is done by entering the EPROM instruction in how to use the microcontroller, and the instruction set that supports the structure of central processing unit (CPU), and in this sense can not speak of a common programming language for programming of microcontrollers because the instruction set generally varies depending on the type and manufacturer that produces a microprocessor. Should be distinguished from programming EPROM of programming of microcontrollers.
When a performance microcontrollers demonstrate stable and widespread is generally still used instead of expensive EPROM memory that allow to use only one-time programming PROM memory which is much cheaper.
In short, the microcontroller is a small stand alone computer and meant for a very diverse programming options and reprogramming of his work. It is customary to include mechanisms for self-control and work safety protection against unauthorized reading code. They do not require special attention with regard to maintenance. As they usually all components within a single integrated circuit and has no particular demands for high speed operation is achieved very high reliability and security.
Development, construction and maintenance requires a lot of human labor. Therefore, trying in every possible way to reduce the work required for the construction, operation and maintenance of the system to be monitored. The basic idea is the use of mass-produced, inexpensive standard components. Thus, the microcontroller built with all the elements in one chip (Single-Chip Microcontroller).
In the design of microcontroller is very important STANDARDIZATION. Standardize everything it can, functions that must be performed, mechanical and electrical elements, casing, size printed circuit boards, connectors, and types of interconnection, supply voltages, signal characteristics, input and output impedance and more. In the following picture shows a typical standardized control unit with microcontroller that controls the process during one temperature monitor.
Example II
The appearance of a typical standardized control unit with microcontroller.
| |
Figure 7.2.3 Typical standardized control unit. |
Units consisting of a series of printed circuit boards (cards) with electronic components. Sensor in monitoring process provides a signal for analogue processing to handle it in a way that its output matches the input A/D converter, and the resulting binary data will be processed by a microcomputer program in his memory. The output from the microcomputer is the result of processing that goes into output electronic device where it will be using of the D/A converters and electronic circuitry to convert the output so that it can manage the executive device that will correct the workflow process as it was decided on the basis of microcomputer data obtained from the sensor.
The number of cards can be less than shown, for example, modern microcontrollers have already incorporated the A/D converter and multiplexer and on his card and can be input, output, and communications ports. Thus, a number of 3 cards in relation to the 7 cards as shown in Figure. On the other hand, if we consider the multiple occurrences of different nature (temperature, pressure, power ..) will need more cards for analog processing because several different sensors have different output signals will have to be treated differently as the data sent to the input multiplexer microcontrollers were usable.
Accordingly, the previous image is just an illustration of how to locate and use a microcontroller to control some process on the basis of instructions entered into memory. In an example, the temperature monitoring of a process although the issue could be anything else. Such units can be placed along the process and without reference to other units independently managed process (Stand Alone). It can be linked to other units so that all together control some complex process.
If it is incorporated with the process itself must be designed so that it can function normally and long in the environment in which it is located, and if that is not possible, be located at a separate location in another room, but then needs to solve the problem of delivery and dispatch of data. So, no typical solutions for all situations and presents the concept of the previous figure is illustrative only.
Observation and direct management of individual processes is the lowest and the first level of supervision and management. If it is in the output of all the individual control units collected in one place and combine it is the second level of management. Then the individual processes are sub-processes of the entire process of supervision and management. But that's a separate issue.
Example III
Example of using a microcontroller for control of robots - toys.
Figure* 7.2.4 Robot - toy / Microcontroller - printed circuit board - block diagram. ( + / - ) |
Neither toys as they once were. It is questionable whether just for a 'small' or 'big' kids. Guided cars, helicopters ... - toys using modern electronics have become very popular. Simpler toys - systems have specialized integrated circuit just as IC control toy car, while more complex using a microcontroller. Microcontrollers are perfect tools for making things move, and controlling other things like home automation, wheels, legs, tracks, terminator robots and more.
At Figure 7.2.4a is represented the DFRobotShop Rover V2 - 'Arduino' Compatible Tracked Robot (Basic Kit) is a versatile mobile robot - tank based on the popular 'Arduino Uno' microcontroller. The Rover uses the popular 'Tamiya' twin motor gearbox and the 'Tamiya' track and wheel set. The DFRobotShop Rover PCB incorporates a standard 'Arduino Uno' microcontroller (surface mount ATMega328), L293B IC as motor driver (connected to pins 5 to 8), voltage regulator and prototyping area while contributing to the mechanical structural of the robot. The onboard voltage regulator allows the entire board to be powered using as little as 3.7 V to -9 V. In Figure 7.2.4b shows the printed circuit board with a microcontroller, the scheme of his pins and block diagram of microcontroller.
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. The microcontroller on the board is programmed using the Arduino programming language (based on Wiring) and the Arduino development environment (based on Processing).
Based on the last examples shown, there is no doubt that the microcontroller is one of the basic components that make electronic circuits of vehicle-robot that moving everywhere and 'investigating' the surface of Mars.
SUMMARY:
From each microcontroller expecting different connection options and different behavior and therefore there is a monopoly of some companies in terms of their implementation in a production system and the of programming of their work. Their design and implementation work will always remain small businesses, but from the people who will deal with it require numerous skills and creativity because of the very different work to be done to put the microcontroller function.
The emergence of a microcontroller system designers liberated from the hard work of building microcomputers, various interfaces and other devices. Therefore it is not surprising his more widely application in measurement, control and management. Today's technology has enabled to act as a very powerful computers. Power is very different, and production are already fairly standardized, largely made as a single chip. How powerful (and expensive) microcontroller used will depend on the task for which it is used in the system for counting packets on an assembly line or in the vehicle control system of robots that paint cars or in the system for monitoring the composition of Coca-Cola or any other, with all possible idea of signaling the wrong during the process and, if necessary, its stopping. Processors which are used are mainly ARM type based on RISC (Reduced Instruction Set Computing) architecture.
Thus, the microcontroller is nearly sinless supervisor of machines in the production process, especially on the conveyor. On a conveyor belt uniform speed promote the products. Depending on the design and program microcontrollers unless he can simply counting the product divert another route defective products, oversee the total number of these programmed by statistical analysis to decide to discontinue production and wake up the person responsible for the supervision of the production process.
Citing of this page: Radic, Drago. " Informatics Alphabet " Split-Croatia. {Date of access}; https://informatics.buzdo.com/file. Copyright © by Drago Radic. All rights reserved. | Disclaimer |