Introduction of the Microcontroller and Embedded Systems, designing of projects and Programming
In this post we discuss about the microcontroller, What is it?
The microcontroller is very much similar to microprocessor having its own RAM and ROM within a single electronics chip called IC (integrated circuit). There are very few external components required to start operation of a simple project like crystal and power supply.
The microcontroller production is in billions every year, it reflects their great use in many project and in many appliances. The controllers are integrated into many appliances like as follows:
- The household appliances which includes microwave, washing machine, coffee machine TV, Radio, anything which is programmable or have some automatic intelligent features.
- The telecommunication sector like mobile phones
- The automotive industry like now modern vehicle have better fuel injection, ABS and other features which involve the use of microcontroller
- The aerospace industry
- The industrial automation, here many machine are now automatically operated by applying suitable programs through microcontrollers.
The microcontroller is in short a
true computer in a single chip. The designing of microcontroller have all the
features of a microprocessor like CPU, ALU, PC, SP and other typical register associated
with microprocessor additionally have its own built-in RAM and ROM. It is very
much similar to the microprocessor to perform general purpose task with very
limited components, someone have to fetch data in it to perform some calculation
of that data and sometimes also control the real world parameters based on that
data. The basis feature of microcontroller is to control the operation of a
machine or system using information feed in a form of a program in it and this
task may continue over the period of years. This complex narration can be
explained in the simple form as under:
Example from real world system
Lets consider a heat control system in which we want to control the temperature of system or machine then what we will do...?
- We will read the temperature from a temperature measuring device or simple sensor which will be something like analog value. This analog value should be digitized using analog to digital converter and then it will be read by our microcontroller.
- The measured temperature should be displayed on suitable device like LED seven segment digits or LCD .
- We wish to feed the required temperature by means of some input devices, for this, keys are used with it.
- The microcontroller will read the running temperature, displays on its suitable output device and will also compares with the set point.
- It will the control heating according to the temperature by turning heater on/off accordingly.
Thus we can say that the
microcontroller is a type of microprocessor furnished in a single integrated
circuit and needing a minimum of support of external components like other
chips. The basic principal of a MCU is self-sufficiency and low cost. It is not
intended to be used as a complex computing device in the conventional sense as
personnel computers are or heavy duty processing units; that is, a
microcontroller is not designed to be a data processing machine, but rather an
intelligent core for a specialized dedicated system as described in above example.
The Microcontrollers are embedded in many controls of real world physical
parameters, monitoring, and processing systems. Some are general-purpose
devices but most microcontrollers are used in specialized systems such as
washing machines, telephones, microwave ovens, automobiles, and weapons of many
kinds.
You can find microcontrollers in
all kinds of things these days. Any device that measures, stores, controls,
calculates, or displays information is a candidate for putting a
microcontroller inside. The largest single use for microcontrollers is in
automobiles—just about every car manufactured today includes at least one
microcontroller for engine control, and often more to control additional
systems in the car. In desktop computers, you can find microcontrollers inside
keyboards, modems, printers, and other peripherals. In test equipment,
microcontrollers make it easy to add features such as the ability to store
measurements, to create and store user routines, and to display messages and
waveforms. Consumer products that use microcontrollers include cameras, video
recorders, compact-disk players, and ovens.
A microcontroller usually includes a central
processor, input and output ports, memory for program and data storage, an
internal clock, and one or more peripheral devices such as timers, counters,
analog-to-digital converters, serial communication facilities, and watchdog
circuits. More than two dozen companies in the world manufacture and market
microcontrollers. They range from 8- to 32-bit devices. Those at the low end
are intended for very simple circuits and provide limited functions and program
space, while those at the high end have many of the features associated with
microprocessors. The most popular ones include several from Intel (such as the
8051), Zilog (derivatives of their famous Z-80 microprocessor), Motorola (such
as the 68HC05), Atmel (the AVR), Parallax (the BASIC Stamp), and Microchip.
The microcontroller has periphery
input output ports, timers, interrupts, watchdog timers, debuggers,
communication protocols etc. The microcontroller have hardware structure too.
All these will be discussed in later posts.
Steps to develop a Microcontroller Project
To develop a Project using
microcontroller following Steps shall be perform
Here we will discuss to put
together a microcontroller in a project and see following several steps:
1.
First of all define the task
2.
Focus , how it is being performed in manual way
3.
Design and build the electronics circuits
4.
Write the control program
5.
Test and debug
Sometimes the steps won’t follow exactly in this order. You may begin writing your program before you build the circuits, or you may build and test some of the circuits before you start programming. But however you go about it, each of the above steps is part of the process. There are some tolls required to program the microcontroller includes compiler, assembler and program burner or called programmer. These will be discussed later in separate post.
FAQ about Embedded Systems and Microcontroller Programming for Beginners:
what are the embedded systems?
The embedded systems are electronics processing cards or
module designed using microcontroller to solve one or more human problem efficiently.
What is the embedded systems engineering?
In the field of embedded system engineering the mechatronics-based
solution are offered to serve the mankind. The manual problem solving is
replaced with automatic microcontroller or microprocessor-based systems.
How and where to start the microcontroller programming?
This is not a difficult task to program a microcontroller.
In the start, most of the people remain upset. But the answer is very simple.
Start with very simple project like try to write a program for microcontroller
in which a LED is attached with a pin or port of MCU and it is required to turn
ON and OFF.
Can you please share with us the simple embedded systems examples?
Yes of course, I can share some these. The very simple
example a I write above is to control a device like LED, bulb, motor etc with
microcontroller to make it function like turn it ON or OFF when a switch is
press or at some frequency means periodic action. Similarly Interfacing LED
seven segment display unit with microcontroller or development of digital clock
using seven segment display or liquid crystal display (LCD). Development of Data
acquisition units or modules like acquiring temperature through analog or
digital temperature sensor. Use of analog to digital converters. Measurement of
current, voltages and frequency of an alternating current source etc.
What are the embedded programming languages?
The list of embedded programming languages is very long
including assembly language, basic, C / C++, etc.. But normally the embedded
system are programed using high level language like C/C++.
What is the methodology of programming a pic microcontroller for beginners?
It is very simple task. You have to learn any of computer
programming language like basic or c. Then you have to chose an appropriate compile
where the program could be converted to hex file. The methodology of
programming a PIC microcontroller is much different from any of other
microcontroller in the world, it included the setting up the software, creating
a new project & a new file for coding, and writting some very simple instruction
in appropriate syntax based on the language and compiler your using for it to
run some very common functions, test the configuration & instruction set
and ensure everything is working fine enough, compile the program, convert it
into HEX file, burn the HEX file into microcontroller, put the microcontroller
in testing board or development board, power up the development board, test the
hardware & software, if there is any modification required then make necessary
changes in program coding and repeat the above steps.
Which are the tools required for the microcontroller programming for beginners?
The following tools set is required for beginners to have
with then to start microcontroller programming: The compile and IDE,
development board, programmer, a few electronics component, a suitable
regulated power supply.
which programming language is used for microcontrollers?
It is assembly language, basic language, c language used for
programming a microcontroller. Any of these can be used.
Which are the software used for microcontroller programming?
The software used for microcontroller programming are
compiler and text editor, usually there are some IDE which have integrated
compiler/ linker and text editor all in one.
How to learn Arduino programming for beginners?
Starting with simple project and then moving/ shifting to words
intermediate level and then high level or complex level projects of Arduino board.
The goal should be in mind of develop or beginner be that he should focus on leanings
of Basic knowledge about principles, techniques in Arduino system for
developing a project based on Arduino. The initial step in starting the programming
of Arduino would be the downloading and installing the Arduino IDE on the
personal computer or laptop. The Arduino IDE is open source and it can run on
Windows, Mac OS X, and Linux platform. The Arduino programming language is a
very simple programming language focusing on hardware of Arduino and it is very
similar to the C language in syntax.
Which is more often programming language used for microcontrollers?
The programmers or personnel working on microcontroller use
a variety of programming languages to program a microcontroller in embedded
systems. The most common used languages for microcontroller include C, C++,
Python, basic, and Java. Therefore, we can say that the programming languages
used for microcontrollers are often assembly, basic, C/C++ etc., but it does
not mean that one have to expert of these all languages at a time. If a
developer knows any of above said programming language, then it is enough, he
can do start microcontroller programming and he can develop projects based on
microcontroller.
Can we do the programming embedded systems in c and c++?
Yes, we can do programming of embedded system in C/ C plus
plus language with suitable complier and linker.
What is embedded system development board?
It is an electronic board having all necessary electronics devices and components mounted on it along with microcontroller or microprocessor to work together for doing various general-purpose lab experiments using microcontrollers or microprocessor. The embedded system development boards are normally the printed circuit boards which includes some hardware components like central processing unit (CPU), memory (optional), input/ output device and their interfaces, data likes & data buses, and provisions of interfaces to external resource for controlling or acquiring data to and from the board. The microcontroller or embedded system development boards are more often customized keeping in view the solution of some specific problem and the need of user. The engineers or hobby person can design a development board by themselves very specific to current assignment. It is considered that the development boards are designed by some experts for beginners to do some experiments for learning the hardware and software of the microcontrollers. The Common development boards are based on microcontroller of 8051family, ARM, FPGA, Atmel AVR, MicroChip PIC Microcontrollers, Arduino and DSP etc.
No comments:
Post a Comment
Please ask if you have any question regarding the programming of MCU, or have any problem in development of your electronics project. microcontroller51.blogspot.com