Sie sind auf Seite 1von 62

Android Based Robot Control Using Embedded

Technology
1. Introduction of the project

2. Block Diagram and Description

3. Circuit Diagram and Description


4. Introduction of Software

5. Introduction of Embedded System

6. Introduction of Microcontroller

7. Flowchart and Code

8. Results of Project

9. Applications

10. Advantages

11. Conclusion

12. Bibliography
1. Introduction of the project

Android Based Robot Control is latest technologies have been operating


effectively in defences, factories , industries , earth quack areas, bomb detection
areas, construction building, for commercial & govt sectors…etc . These robots
have successfully used strategies of deliberately structuring the environment and
adapting the process to the automation. The objective of this project is to develop
Android based to control & monitoring of robots from control room can sit any
where in world for using wireless communication of 2G, 3G or 4G with
frequencies ranging from 900MHZ to 960MHZ in 2G or 3G for just sending SMS
to the robot via serial communication device we can control the robot just by
sending the commands.

Remote controlled robots are increasingly becoming the popular mode of


container transport, construction buildings, navy, defences, and factories. These
unmanned vehicles are used to transfer containers between two or more
destination. The efficiency of a container terminal is directly related to the amount
of the time each vessel spends in the port. Advanced technologies, and in particular
remote controlled vehicle systems, have been recently proposed as possible
candidates for improving the terminal’s efficiency not only due to their abilities of
significantly improving the performance but also to the repetitive nature of
operations in container terminals.

Aim: The design & Implementation of Remote Controlled or Android Mobile


Controlled Robot Using Embedded Technology
2. Block Diagram and Description
BLOCK DAIGRAM:

ANDROID

MOBILE

LCD DISPLAY 16X2

Blue Tooth

Device
NTROLLER
MICROCO

Serial
DRIVER Motor
Communication
AVR

Device 1 1

DRIVER Motor
2
2

12V DC Power Supply


Rechargeable battery
Android or Remote controlled Robot consists of AVR Microcontroller, Sensors,
Drivers, Motors , LCD display 16x2, Serial Communication device, GSM modem
Android Mobile and 12v dc Power supply with rechargeable battery. Android
Mobile or Remote control is used to control the robot in different direction for
sending commands via Serial communication device. Command signals are given
to AVR Microcontroller. AVR Microcontroller is master of the project and it is
programmed to drive the robot according to commands. AVR Microcontroller
drives the Motors through the driver circuit board. The LCD display is used to
display the robot working conditions.

HARDWARE REQUIREMENTS:

SI.NO HARDWARE QUANTITY


1 AVR MICROCONTROLLER 1
2 DRIVER 2
3 MOTOR 2
4 Serial Communication device 1
5 BlueTooth 1

7 Android Mobile 1
8 LCD Display 16x2 1

9 Rechargeable Battery 12v dc 1

10 Robotic plate 1

11 Robotic wheel 4
SOFTWARE REQUIREMENTS:

SI.NO SOFTWARE
1 AURDINO SOFTWARE
2 EMBEDDED C

AVR Microcontroller:

AVR Microcontroller is heart of the project. Embedded C language is used to do the


programming. The AVR is a modified Harvard architecture 8-bit RISC single chip
microcontroller which was developed by Atmel in 1996. The AVR was one of the first
microcontroller families to use on-chip flash memory for program storage, as opposed to
one-time programmable ROM, EPROM, or EEPROM used by other microcontrollers at
the time.

Serial Communication Device: In computing, a serial port is a serial


communication physical interface through which information transfers in or out
one bit at a time (in contrast to a parallel port).[1] Throughout most of the history
of personal computers, data was transferred through serial ports to devices such as
modems, terminals and various peripherals.

While such interfaces as Ethernet, FireWire, and USB all send data as a serial
stream, the term "serial port" usually identifies hardware more or less compliant to
the RS-232 standard, intended to interface with a modem or with a similar
communication device.

Modern computers without serial ports may require serial-to-USB converters to


allow compatibility with RS 232 serial devices. Serial ports are still used in
applications such as industrial automation systems, scientific instruments, point of
sale systems and some industrial and consumer products. Server computers may
use a serial port as a control console for diagnostics. Network equipment (such as
routers and switches) often use serial console for configuration. Serial ports are
still used in these areas as they are simple, cheap and their console functions are
highly standardized and widespread. A serial port requires very little supporting
software from the host system.

Bluetooth Device: Bluetooth is a wireless technology standard for exchanging


data over short distances (using short-wavelength UHF radio waves in the ISM
band from 2.4 to 2.485 GHz) from fixed and mobile devices, and building personal
area networks (PANs). Invented by telecom vendor Ericsson in 1994, it was
originally conceived as a wireless alternative to RS-232 data cables. It can connect
several devices, overcoming problems of synchronization.

Bluetooth is managed by the Bluetooth Special Interest Group (SIG), which has
more than 25,000 member companies in the areas of telecommunication,
computing, networking, and consumer electronics. The IEEE standardized
Bluetooth as IEEE 802.15.1, but no longer maintains the standard. The Bluetooth
SIG oversees development of the specification, manages the qualification program,
and protects the trademarks. A manufacturer must make a device meet Bluetooth
SIG standards to market it as a Bluetooth device. A network of patents apply to the
technology, which are licensed to individual qualifying devices.

Android:

Android is popular with technology companies which require a ready-made, low-cost and
customizable operating system for high-tech devices. Android's open nature has encouraged a
large community of developers and enthusiasts to use the open-source code as a foundation for
community-driven projects, which add new features for advanced users or bring Android to
devices which were officially released running other operating systems.

Motor driver Circuit:

Motor switching and driver circuits are used to drive the motor. Switching circuit is used
provides efficient switching and relay driver board is used to drive the motor. 12v relay is
used. A relay is an electrically operated switch. Many relays use an electromagnet to
mechanically operate a switch, but other operating principles are also used, such as
solid-state relays. Relays are used where it is necessary to control a circuit by a low-
power signal (with complete electrical isolation between control and controlled circuits),
or where several circuits must be controlled by one signal. The first relays were used in
long distance telegraph circuits as amplifiers: they repeated the signal coming in from
one circuit and re-transmitted it on another circuit. Relays were used extensively in
telephone exchanges and early computers to perform logical operations.

Buzzer circuit:
A buzzer or beeper is a signaling device, usually electronic, typically used in
automobiles, household appliances such as a microwave oven, or game shows. It most
commonly consists of a number of switches or sensors connected to a control unit that
determines if and which button was pushed or a preset time has lapsed, and usually
illuminates a light on the appropriate button or control panel, and sounds a warning in
the form of a continuous or intermittent buzzing or beeping sound. Initially this device
was based on an electromechanical system which was identical to an electric bell
without the metal gong (which makes the ringing noise).
Power Supply:

A power supply is an electronic device that supplies electric energy to an electrical load.
The primary function of a power supply is to convert one form of electrical energy to
another and, as a result, power supplies are sometimes referred to as electric power
converters. Some power supplies are discrete, stand-alone devices, whereas others are
built into larger devices along with their loads. Examples of the latter include power
supplies found in desktop computers and consumer electronics devices. In this project 5
v and 12v power supplies are used.

History of AVR

AVR was developed in the year 1996 by Atmel Corporation. The architecture of AVR was
developed by Alf-Egil Bogen and Vegard Wollan. AVR derives its name from its
developers and stands for Alf-Egil Bogen Vegard Wollan RISC microcontroller, also
known as Advanced Virtual RISC. The AT90S8515 was the first microcontroller which was
based on AVR architecture however the first microcontroller to hit the commercial
market was AT90S1200 in the year 1997.

AVR microcontrollers are available in three categories:

1. TinyAVR – Less memory, small size, suitable only for simpler applications

2. MegaAVR – These are the most popular ones having good amount of memory
(upto 256 KB), higher number of inbuilt peripherals and suitable for moderate to
complex applications.
3. XmegaAVR – Used commercially for complex applications, which require large
program memory and high speed.

The following table compares the above mentioned AVR series of microcontrollers:

Series Name Pins Flash Memory Special Feature

TinyAVR 6-32 0.5-8 KB Small in size

MegaAVR 28-100 4-256KB Extended peripherals

XmegaAVR 44-100 16-384KB DMA , Event System


included

What’s special about AVR?

They are fast: AVR microcontroller executes most of the instructions in single execution
cycle. AVRs are about 4 times faster than PICs, they consume less power and can be
operated in different power saving modes. Let’s do the comparison between the three
most commonly used families of microcontrollers.

8051 PIC AVR

SPEED Slow Moderate Fast

MEMORY Small Large Large c

ARCHITECTURE CISC RISC RISC

ADC Not Present Inbuilt Inbuilt


Timers Inbuilt Inbuilt Inbuilt

PWM Channels Not Present Inbuilt Inbuilt

AVR is an 8-bit microcontroller belonging to the family of Reduced Instruction Set


Computer (RISC). In RISC architecture the instruction set of the computer are not only
fewer in number but also simpler and faster in operation. The other type of
categorization is CISC (Complex Instruction Set Computers).

3. Circuit Diagram and Description


NOTE: ATTACH OVERALL CKT DESIGN OF UR PROJECT SOFT COPY HERE

LCD Display

LCD
A liquid crystal display (commonly abbreviated LCD) is a thin, flat display
device made up of any number of colour or monochrome pixels arrayed in front of
a light source or reflector. It is often utilized in battery-powered electronic devices
because it uses very small amounts of electric power.

Overview

Each pixel of an LCD typically consists of a layer of molecules aligned


between two transparent electrodes, and two polarizing filters, the axes of
transmission of which are (in most of the cases) perpendicular to each other. With
no liquid crystal between the polarizing filters, light passing through the first filter
would be blocked by the second (crossed) polarizer.

The surfaces of the electrodes that are in contact with the liquid crystal
material are treated so as to align the liquid crystal molecules in a particular
direction. This treatment typically consists of a thin polymer layer that is
unidirectionally rubbed using, for example, a cloth. The direction of the liquid
crystal alignment is then defined by the direction of rubbing.

Before applying an electric field, the orientation of the liquid crystal


molecules is determined by the alignment at the surfaces. In a twisted nematic
device (still the most common liquid crystal device), the surface alignment
directions at the two electrodes are perpendicular to each other, and so the
molecules arrange themselves in a helical structure, or twist. Because the liquid
crystal material is birefringent, light passing through one polarizing filter is rotated
by the liquid crystal helix as it passes through the liquid crystal layer, allowing it to
pass through the second polarized filter. Half of the incident light is absorbed by
the first polarizing filter, but otherwise the entire assembly is transparent.

When a voltage is applied across the electrodes, a torque acts to align the
liquid crystal molecules parallel to the electric field, distorting the helical structure
(this is resisted by elastic forces since the molecules are constrained at the
surfaces). This reduces the rotation of the polarization of the incident light, and the
device appears gray. If the applied voltage is large enough, the liquid crystal
molecules in the center of the layer are almost completely untwisted and the
polarization of the incident light is not rotated as it passes through the liquid crystal
layer. This light will then be mainly polarized perpendicular to the second filter,
and thus be blocked and the pixel will appear black. By controlling the voltage
applied across the liquid crystal layer in each pixel, light can be allowed to pass
through in varying amounts thus constituting different levels of gray.

The optical effect of a twisted nematic device in the voltage-on state is far
less dependent on variations in the device thickness than that in the voltage-off
state. Because of this, these devices are usually operated between crossed
polarizer’s such that they appear bright with no voltage (the eye is much more
sensitive to variations in the dark state than the bright state). These devices can
also be operated between parallel polarizer’s, in which case the bright and dark
states are reversed. The voltage-off dark state in this configuration appears blotchy,
however, because of small thickness variations across the device.

Both the liquid crystal material and the alignment layer material contain
ionic compounds. If an electric field of one particular polarity is applied for a long
period of time, this ionic material is attracted to the surfaces and degrades the
device performance. This is avoided either by applying an alternating current or by
reversing the polarity of the electric field as the device is addressed (the response
of the liquid crystal layer is identical, regardless of the polarity of the applied
field).

When a large number of pixels is required in a display, it is not feasible to


drive each directly since then each pixel would require independent electrodes.
Instead, the display is multiplexed. In a multiplexed display, electrodes on one side
of the display are grouped and wired together (typically in columns), and each
group gets its own voltage source. On the other side, the electrodes are also
grouped (typically in rows), with each group getting a voltage sink. The groups are
designed so each pixel has a unique, unshared combination of source and sink. The
electronics or the software driving the electronics then turns on sinks in sequence,
and drives sources for the pixels of each sink.

Pin details
 In LCD Display pins 1and 16 are Ground. Pins 2 and 15 are Vcc.
 Pins no 3 is used for to adjust voltage contract of LCD display by adding one
Variable resistor.
 Pins 4 is use to Reset the LCD.
 Pin 5 is used to Read/Write operations.
 Pins6 is used to enable the LCD.
 For data communication purpose we used 8 pins . They are 7, 8, 9,10,
11,12,13,14 pins.

LCD display is used for display purpose. It displays the information given by the
sensors to microcontroller.

CIRCUIT DIAGRAM OF MOTOR SWITCHING CIRCUIT

High Current and HIGH Voltage Switching Circuit


The ULN2003 is a monolithic high voltage and high current Darlington transistor

arrays. It consists of seven NPN darlington pairs that features high-voltage outputs

with common-cathode clamp diode for switching inductive loads. The collector-

current rating of a single darlington pair is 500mA. The darlington pairs may be

parrlleled for higher current capability. Applications include relay drivers, hammer

drivers, lampdrivers, display drivers(LED gas discharge),line drivers, and logic

buffers. The ULN2003 has a 2.7kΩ series base resistor for each darlington pair for

operation directly with TTL or 5V CMOS devices.

LOGIC DIAGRAM OF ULN2003


SCHEMATIC(EACH DARLINGTON PAIR)

Project Switching Circuit Diagram


FEATURES

 500mA rated collector current(Single output)


 High-voltage outputs: 50V
 Inputs compatibale with various types of logic.
 Relay driver application
Motor Relay circuit board 1:

Motor Relay circuit board 2


 Circuit diagram of Relay Circuit is shown in the figure.
 Relay is nothing but it is a electromagnetic switch.
 It receives the signal from Switching Circuit. Relay Convert one
energy level to another energy level.
 Whenever current flow across the relay, motor will be run.
 In this project we use two driver circuit boards.

BASIC MOTOR CONTROL AND RELAY LOGIC

Many machine functions involve turning motors on and off and/or reversing their direction.

While there are many electronic motor controllers of all types on the market, if all one needs is to

power a motor or other load on and off, an electromechanical relay is often all that is needed.

In order to understand and use relays in our designs, we must first understand the basics of

switch logic. We all know that a switch is a device that opens and closes a circuit. "Off" is open,

and "On" is closed. We also might be aware that in logic terminology, a closed switch represents

a logic "1", and an open switch represents logic "0".

Switches are designated by the amount of poles and throws they have. The throws are the fixed

contacts, while the poles are the contacts that move when the switch is activated or "thrown".

Depending on how the switch is built it can have throws that are normally closed, meaning that

they are in contact with the pole, closing the circuit; normally open, meaning the opposite, that

the contacts are normally not in contact, or open; or the switch can have just about any number

and configuration of poles and throws.


The typical nomenclature for switches abbreviates a "P" for poles and a "T" for throws, with the

number of each also being abbreviated by a single letter. A common limit switch configuration,

for example, would be "SPDT" for Single Pole, Double Throw.

Also note that switches can be either "Momentary" or "Continuous" contact. A doorbell

pushbutton switch is an example of a momentary contact switch. When the switch is not

being pressed a spring returns the contacts to the "open" position. Therefore such a switch

would be considered an SPST normally open pushbutton switch. The limit switch

diagrammed here would also be a momentary switch. However, since it has two throws, the

switch itself would not have a normally open or closed designation. Instead, the throws are

identified by whether they are normally open or closed by the common notations of "n.o"

and "n.c.", with the corresponding poles referred to as "common" and having the notation

"com".
For switches with more than two poles or throws, the number is given as a numeral such as

"4PDT" for a Four Pole, Double Throw Switch. In the diagram, the dashed line indicates that

all poles of the switch operate together.

Relays

Relays are nothing more than electrically operated switches. Relays use an electromagnetic coil

to pull the poles of the switch into position. Most relays return to the normally closed position by

a spring when the coil is deenergized, so relay contacts are usually identified in the same way as

those of a momentary contact switch.


Note that in the diagram the coil polarity is indicated. Relays will generally operate just as well

regardless of coil polarity, however it does come into play for one important reason. Since a relay

is an electromagnetic device, the coil generates what is known as flyback when it deenergizes.

This is a phenomenon common to all inductive devices (which an electromagnet is). When the

coil is deenergized the magnetic field surounding it collapses. This collapsing field cuts through

the coil windings and induces a current in the opposite direction from that which charged the

coil. This reverse current travels back through the wiring to the current source. If that source

happens to be a logic gate, a microcontroller output, or some other sensitive device it can damage

the device or otherwise cause it to malfunction.

For this reason it is common practice to place an ordinary diode across the coil terminals. Any

normal diode will work. The diode allows current to charge the coil, yet it will block any reverse

current. I have found that the easiest way to determine the proper polarity of the diode is to

simply clip it onto the coil terminals and energize the relay. If it energizes, then the diode is

aligned properly. If it does not, simply flip the diode around.

Circuit Diagram of Robotic Motor Drive Board


BUZZER CIRCUIT:
A buzzer or beeper is a signalling device, usually electronic, typically used
in automobiles, household appliances such as a microwave oven, or game shows.
It most commonly consists of a number of switches or sensors connected to a
control unit that determines if and which button was pushed or a preset time has
lapsed, and usually illuminates a light on the appropriate button or control panel,
and sounds a warning in the form of a continuous or intermittent buzzing or
beeping sound. Initially this device was based on an electromechanical system
which was identical to an electric bell without the metal gong (which makes the
ringing noise).

Often these units were anchored to a wall or ceiling and used the ceiling or
wall as a sounding board. Another implementation with some AC-connected
devices was to implement a circuit to make the AC current into a noise loud
enough to drive a loudspeaker and hook this circuit up to a cheap 8-ohm speaker.
Nowadays, it is more popular to use a ceramic-based piezoelectric sounder like a
Sonalert which makes a high-pitched tone. Usually these were hooked up to
"driver" circuits which varied the pitch of the sound or pulsed the sound on and
off.

POWER SUPPLY :

Power supply unit consists of Step down transformer, Rectifier, Regulator unit,

filters.

TRANSFORMER RECTIFIER FILTER REGULATOR

AC Voltage DC Voltage

Typical Block of Power Supply

CIRCUIT DIAGRAM OF POWER SUPPLY


Circuit Diagram of Power Supply

STEP DOWN TRANSFORMER:

The Step down Transformer is used to step down the main supply voltage from
230V AC to lower value. This 230 AC voltage cannot be used directly, thus it is
stepped down. The step down voltage is consists of 12V.The Transformer consists
of primary and secondary coils. To reduce or step down the voltage, the
transformer is designed to contain less number of turns in its secondary core. The
output from the secondary coil is also AC waveform. Thus the conversion from AC
to DC is essential. This conversion is achieved by using the Rectifier Circuit/Unit.

RECTIFIER:
The Rectifier circuit is used to convert the AC voltage into its
corresponding DC voltage. Rectifier having three types,

 Half wave rectifier.


 Full wave rectifier.
 Bridge rectifier.
The most important and simple device used in Rectifier circuit is the diode.
This project used to bridge rectifier. A bridge rectifier makes use of four diodes in
a bridge arrangement to achieve full-wave rectification. This is a widely used
configuration, both with individual diodes wired as shown and with single
component bridges where the diode bridge is wired internally.

Bridge Rectifier

The simple function of the diode is to conduct when forward biased and not to
conduct in reverse bias. The Forward Bias is achieved by connecting the diode’s
positive with positive of the battery and negative with battery’s negative. The
efficient circuit used is the Full wave Bridge rectifier circuit. The output voltage of
the rectifier is in rippled form, the ripples from the obtained DC voltage are
removed using other circuits available. The circuit used for removing the ripples is
called Filter circuit.
The simple capacitor filter is the most basic type of power supply filter. The
application of the simple capacitor filter is very limited. It is sometimes used on
extremely high-voltage, low-current power supplies for cathode-ray and similar
electron tubes, which require very little load current from the supply. The capacitor
filter is also used where the power-supply ripple frequency is not critical; this
frequency can be relatively high. The capacitor (C1) shown in figure above is a
simple filter connected across the output of the rectifier in parallel with theload.
Capacitors are used as filter. The ripples from the DC voltage are removed and
pure DC voltage is obtained. And also these capacitors are used to reduce the
harmonics of the input voltage. The primary action performed by capacitor is
charging and discharging. It charges in positive half cycle of the AC voltage and it
will discharge in negative half cycle. Here we used 1000µF capacitor. So it allows
only AC voltage and does not allow the DC voltage. This filter is fixed before the
regulator. Thus the output is free from ripples.

REGULATOR
Regulator regulates the output voltage to be always constant. Regulators is
of two types.
 Positive regulator (78XX)
 Negative regulator (79XX)
The output voltage is maintained irrespective of the fluctuations in the input
AC voltage. As and then the AC voltage changes, the DC voltage also changes.
Thus to avoid this Regulators are used. Also when the internal resistance of the
power supply is greater than 30 ohms, the output gets affected. Thus this can be
successfully reduced here. The regulators are mainly classified for low voltage and
for high voltage. Here we used 7805 positive regulator. It reduces the 12V dc
voltage to 5V dc.

The Filter circuit is often fixed after the Regulator circuit. Capacitor is
most often used as filter. The principle of the capacitor is to charge and discharge.
It charges during the positive half cycle of the AC voltage and discharges during
the negative half cycle. So it allows only AC voltage and does not allow the DC
voltage. This filter is fixed after the Regulator circuit to filter any of the possibly
found ripples in the output received finally. Here we used 0.1µF capacitor. The
output at this stage is 5V and is given to the Microcontroller.

4. Introduction of Software

What is Arduino?

Arduino is a tool for making computers that can sense and control more of the physical world than your

desktop computer. It's an open-source physical computing platform based on a simple microcontroller

board, and a development environment for writing software for the board.

Arduino can be used to develop interactive objects, taking inputs from a variety of switches or sensors,

and controlling a variety of lights, motors, and other physical outputs. Arduino projects can be stand-

alone, or they can be communicate with software running on your computer (e.g. Flash, Processing,
MaxMSP.) The boards can be assembled by hand or purchased preassembled; the open-source IDE can

be downloaded for free.

The Arduino programming language is an implementation of Wiring, a similar physical computing

platform, which is based on the Processing multimedia programming environment.

Why Arduino?

There are many other microcontrollers and microcontroller platforms available for physical computing.

Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard, and many others offer similar

functionality. All of these tools take the messy details of microcontroller programming and wrap it up in

an easy-to-use package. Arduino also simplifies the process of working with microcontrollers, but it

offers some advantage for teachers, students, and interested amateurs over other systems:

 Inexpensive - Arduino boards are relatively inexpensive compared to other microcontroller

platforms. The least expensive version of the Arduino module can be assembled by hand, and

even the pre-assembled Arduino modules cost less than $50

 Cross-platform - The Arduino software runs on Windows, Macintosh OSX, and Linux operating

systems. Most microcontroller systems are limited to Windows.

 Simple, clear programming environment - The Arduino programming environment is easy-to-use

for beginners, yet flexible enough for advanced users to take advantage of as well. For teachers,

it's conveniently based on the Processing programming environment, so students learning to

program in that environment will be familiar with the look and feel of Arduino

 Open source and extensible software- The Arduino software is published as open source tools,

available for extension by experienced programmers. The language can be expanded through C+
+ libraries, and people wanting to understand the technical details can make the leap from

Arduino to the AVR C programming language on which it's based. SImilarly, you can add AVR-C

code directly into your Arduino programs if you want to.

 Open source and extensible hardware - The Arduino is based on Atmel's ATMEGA8 and
ATMEGA168 microcontrollers. The plans for the modules are published under a Creative
Commons license, so experienced circuit designers can make their own version of the module,
extending it and improving it. Even relatively inexperienced users can build the breadboard
version of the module in order to understand how it works and save money.

5. Introduction of Embedded System

Classification of Embedded Systems

Embedded systems are often required to provide Real-Time response. A


Real-Time system is defined as a system whose correctness depends on the
timeliness of its response. Examples of such systems are flight control systems of
an aircraft, sensor systems in nuclear reactors and power plants.

For these systems, delay in response is a fatal error. A more relaxed version
of Real-Time Systems is the one where timely response with small delays is
acceptable. Example of such a system would be the Scheduling Display System on
the railway platforms. In technical terminology, Real-Time Systems can be
classified as:

· Hard Real-Time Systems - systems with severe constraints on the


timeliness of the response.

S· Soft Real-Time Systems - systems which tolerate small variations in


response times.

· Hybrid Real-Time Systems - systems which exhibit both hard and soft
constraints on its performance.

Application of Embedded Systems


Embedded systems are playing important roles in our lives every day, even
though they might not necessarily be visible. Some of the embedded systems we
use every day control the menu system on television, the timer in a microwave
oven, a cell phone, an MP3 player or any other device with some amount of
intelligence built-in.

In fact, recent poll data shows that embedded computer systems currently
outnumber humans in the USA. Embedded systems is a rapidly growing industry
where growth opportunities are numerous.
Programming Languages in Embedded Systems
It is nice to have functional example code in some real language. Also, it is
useful to point out some features of popular programming languages that are
especially important for embedded systems.

·ANSI C programming language: Many microprocessors and microcontrollers


can be programmed in C, and a number of C cross-compilers exist for that
purpose. C is perhaps the most frequently used language for new embedded
system development. The "const" and the "volatile" keywords, rarely used in
desktop application programming, become very important in embedded systems.

·Assembly language: There are many different microcontroller families, each


with their own assembly language with its own unique quirks. This book will cover
some basics of assembly language common to most microcontrollers. Unlike
desktop application programming, embedded system programs generally must set
up an "interrupt vector table".

What is a Microprocessor?
· A Microprocessor is an integrated circuit capable of performing arithmetic
and logical operations, such as add, subtract, compare, logical AND & OR
functions.

· When combined with other integrated circuits such as memory, timer, and
peripheral interface chips, the microprocessor becomes a computer.

· The Microprocessor performs the arithmetic and logical operations using


sequence of instructions.
Applications of Microprocessor

Developed during the 1970s, the microprocessor became most visible as


the central processor of the personal computer. Microprocessors also play
supporting roles within larger computers as smart controllers for graphics displays,
storage devices, and high-speed printers. However, the vast majority of
microprocessors are used to control everything from consumer appliances to
smart weapons. The microprocessor has made possible the inexpensive hand-held
electronic calculator, the digital wristwatch, and the electronic game.

Microprocessors are used to control consumer electronic devices, such as


the programmable microwave oven and videocassette recorder; to regulate
gasoline consumption and antilock brakes in automobiles; to monitor alarm
systems; and to operate automatic tracking and targeting systems in aircraft,
tanks, and missiles and to control radar arrays that track and identify aircraft,
among other defense applications.

What is a Microcontroller?

A microcontroller is a computer-on-a-chip, or a single-chip computer. Micro


suggests that the device is small, and controller tells that the device might be used
to control objects, processes, or events. Another term to describe a
microcontroller is embedded controller, because the microcontroller and its
support circuits are often built into, or embedded in, the devices they control.

Any device that measures, stores, controls, calculates, or displays


information is a candidate for putting a microcontroller inside. Basically a
microcontroller is a computing device, and is a single integrated circuit (“silicon
chip” or IC) used to form part of a product that incorporates some software
program control. As a microcontroller is basically part of a computing system it
can be used in applications requiring control, operator and user display
generation, simple sequencing and many other mundane tasks.

Microcontrollers are found in many common application areas, including


domestic appliances such as microwaves, televisions and television remote control
units, stereo units, and increasingly in automobiles for engine control, passenger
heater unit control, display instrumentation and many other tasks. The
widespread availability of microcontrollers is a testament to their flexibility and
low unit cost.

A typical micro controller design incorporates all of the features in a


microprocessor CPU: ALU, PC, SP and registers. It also has added features needed
to make a complete computer: ROM, RAM, Parallel I/O, Timers and etc.

To make a complete computer, a microprocessor requires memory for


storing data and programs, and input/output (I/O) interfaces for connecting
external devices like keyboards and displays. In contrast, a microcontroller is a
single-chip computer because it contains memory and I/O interfaces in addition to
the CPU.

Because the amount of memory and interfaces that can fit on a single chip
is limited, microcontrollers tend to be used in smaller systems that require little
more than the microcontroller and a few support components. Examples of
popular microcontrollers are Intel’s 8052 (including the 8052), Motorola’s 68HC11,
and Zilog’s Z80.
Applications of Microcontroller

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, microcontrollers present 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. And these are just a few examples.

A microcontroller is similar to the microprocessor inside a personal


computer. Examples of microprocessors include Intel’s 8086, Motorola’s 68000,
and Zilog’s Z80. Both microprocessors and microcontrollers contain a central
processing unit, or CPU. The CPU executes instructions that perform the basic
logic, math, and data-moving functions of a computer.

Comparing Microprocessors and Micro controllers

Microprocessor contains no RAM, no ROM, and no I/O ports on the chip


itself. A micro controller has a CPU, in addition to a fixed amount of RAM, ROM,
I/O ports, and timers are all embedded together on one chip.
The microprocessor is concern with rapid movement of code and data from
external addresses to the chip; the micro controller is concerned with rapid
movement of bits within the chip.

6. Introduction of Microcontroller

ATMEGA8L
The AVR is a modified Harvard architecture 8-bit RISC single chip microcontroller which was
developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-chip flash
memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by
other microcontrollers at the time.

Device architecture

Flash, EEPROM, and SRAM are all integrated onto a single chip, removing
the need for external memory in most applications. Some devices have a parallel
external bus option to allow adding additional data memory or memory-mapped
devices. Almost all devices (except the smallest TinyAVR chips) have serial
interfaces, which can be used to connect larger serial EEPROMs or flash chips.

Program memory

Program instructions are stored in non-volatile flash memory. Although the MCUs
are 8-bit, each instruction takes one or two 16-bit words.

The size of the program memory is usually indicated in the naming of the device
itself (e.g., the ATmega64x line has 64 kB of flash while the ATmega32x line has
32 kB).

There is no provision for off-chip program memory; all code executed by the AVR
core must reside in the on-chip flash. However, this limitation does not apply to
the AT94 FPSLIC AVR/FPGA chips.

Internal data memory

The data address space consists of the register file, I/O registers, and SRAM.
The AVRs have 32 single-byte registers and are classified as 8-bit RISC devices.

In most variants of the AVR architecture, the working registers are mapped in as
the first 32 memory addresses (0000 16–001F16) followed by the 64 I/O registers
(002016–005F16).

Actual SRAM starts after these register sections (address 0060 16). (Note that the
I/O register space may be larger on some more extensive devices, in which case
the memory mapped I/O registers will occupy a portion of the SRAM address
space.)

Even though there are separate addressing schemes and optimized opcodes for
register file and I/O register access, all can still be addressed and manipulated as if
they were in SRAM.

In the XMEGA variant, the working register file is not mapped into the data
address space; as such, it is not possible to treat any of the XMEGA's working
registers as though they were SRAM. Instead, the I/O registers are mapped into
the data address space starting at the very beginning of the address space.
Additionally, the amount of data address space dedicated to I/O registers has
grown substantially to 4096 bytes (000016–0FFF16). As with previous generations,
however, the fast I/O manipulation instructions can only reach the first 64 I/O
register locations (the first 32 locations for bitwise instructions). Following the I/O
registers, the XMEGA series sets aside a 4096 byte range of the data address space
which can be used optionally for mapping the internal EEPROM to the data
address space (100016–1FFF16). The actual SRAM is located after these ranges,
starting at 200016.
EEPROM

Almost all AVR microcontrollers have internal EEPROM for semi-permanent data
storage. Like flash memory, EEPROM can maintain its contents when electrical
power is removed.

In most variants of the AVR architecture, this internal EEPROM memory is not
mapped into the MCU's addressable memory space. It can only be accessed the
same way an external peripheral device is, using special pointer registers and
read/write instructions which makes EEPROM access much slower than other
internal RAM.

However, some devices in the Secure AVR (AT90SC) family [6] use a special EEPROM
mapping to the data or program memory depending on the configuration. The
XMEGA family also allows the EEPROM to be mapped into the data address space.

Since the number of writes to EEPROM is not unlimited — Atmel specifies 100,000
write cycles in their datasheets — a well designed EEPROM write routine should
compare the contents of an EEPROM address with desired contents and only
perform an actual write if the contents need to be changed.

Program execution

Atmel's AVRs have a two stage, single level pipeline design. This means the next
machine instruction is fetched as the current one is executing. Most instructions
take just one or two clock cycles, making AVRs relatively fast among the eight-bit
microcontrollers.
The AVR processors were designed with the efficient execution of compiled C code
in mind and have several built-in pointers for the task.

Instruction set

Main article: Atmel AVR instruction set

The AVR instruction set is more orthogonal than those of most eight-bit
microcontrollers, in particular the 8051 clones and PIC microcontrollers with
which AVR competes today. However, it is not completely regular:

 Pointer registers X, Y, and Z have addressing capabilities that are different


from each other.
 Register locations R0 to R15 have different addressing capabilities than
register locations R16 to R31.

 I/O ports 0 to 31 have different addressing capabilities than I/O ports 32 to


63.

7CLR affects flags, while SER does not, even though they are complementary
instructions. CLR set all bits to zero and SER sets them to one. (Note that CLR is
pseudo-op for EOR R, R; and SER is short for LDI R,$FF. Math operations such as
EOR modify flags while moves/loads/stores/branches such as LDI do not.)

 Accessing read-only data stored in the program memory (flash) requires


special LPM instructions; the flash bus is otherwise reserved for instruction
memory.
Additionally, some chip-specific differences affect code generation. Code pointers
(including return addresses on the stack) are two bytes long on chips with up to
128 kBytes of flash memory, but three bytes long on larger chips; not all chips
have hardware multipliers; chips with over 8 kBytes of flash have branch and call
instructions with longer ranges; and so forth.

The mostly regular instruction set makes programming it using C (or even Ada)
compilers fairly straightforward. GCC has included AVR support for quite some
time, and that support is widely used. In fact, Atmel solicited input from major
developers of compilers for small microcontrollers, to determine the instruction
set features that were most useful in a compiler for high-level languages.

MCU speed

The AVR line can normally support clock speeds from 0 to 20 MHz, with some
devices reaching 32 MHz. Lower powered operation usually requires a reduced
clock speed. All recent (Tiny, Mega, and Xmega, but not 90S) AVRs feature an on-
chip oscillator, removing the need for external clocks or resonator circuitry. Some
AVRs also have a system clock prescaler that can divide down the system clock by
up to 1024. This prescaler can be reconfigured by software during run-time,
allowing the clock speed to be optimized.

Since all operations (excluding literals) on registers R0 - R31 are single cycle, the
AVR can achieve up to 1 MIPS per MHz, i.e. an 8 MHz processor can achieve up to
8 MIPS. Loads and stores to/from memory take two cycles, branching takes two
cycles. Branches in the latest "3-byte PC" parts such as ATmega2560 are one cycle
slower than on previous devices.
Features

Current[when?] AVRs offer a wide range of features:

 Multifunction, bi-directional general-purpose I/O ports with configurable,


built-in pull-up resistors
 Multiple internal oscillators, including RC oscillator without external parts

 Internal, self-programmable instruction flash memory up to 256 kB (384 kB


on XMega)

o In-system programmable using serial/parallel low-voltage proprietary


interfaces or JTAG

o Optional boot code section with independent lock bits for protection

 On-chip debugging (OCD) support through JTAG or debugWIRE on most


devices

o The JTAG signals (TMS, TDI, TDO, and TCK) are multiplexed on GPIOs.
These pins can be configured to function as JTAG or GPIO depending
on the setting of a fuse bit, which can be programmed via ISP or
HVSP. By default, AVRs with JTAG come with the JTAG interface
enabled.

o debugWIRE uses the /RESET pin as a bi-directional communication


channel to access on-chip debug circuitry. It is present on devices
with lower pin counts, as it only requires one pin.

 Internal data EEPROM up to 4 kB


 Internal SRAM up to 16 kB (32 kB on XMega)

 External 64 kB little endian data space on certain models, including the


Mega8515 and Mega162.

o The external data space is overlaid with the internal data space, such
that the full 64 kB address space does not appear on the external
bus. An accesses to e.g. address 0100 16 will access internal RAM, not
the external bus.

o In certain members of the XMega series, the external data space has
been enhanced to support both SRAM and SDRAM. As well, the data
addressing modes have been expanded to allow up to 16 MB of data
memory to be directly addressed.

o AVRs generally do not support executing code from external memory.


Some ASSPs using the AVR core do support external program
memory.

 8-bit and 16-bit timers

o PWM output (some devices have an enhanced PWM peripheral


which includes a dead-time generator)

o Input capture that record a time stamp triggered by a signal edge

 Analog comparator

 10 or 12-bit A/D converters, with multiplex of up to 16 channels

 12-bit D/A converters


 A variety of serial interfaces, including

o I²C compatible Two-Wire Interface (TWI)

o Synchronous/asynchronous serial peripherals (UART/USART) (used


with RS-232, RS-485, and more)

o Serial Peripheral Interface Bus (SPI)

o Universal Serial Interface (USI) for two or three-wire synchronous


data transfer

 Brownout detection

 Watchdog timer (WDT)

 Multiple power-saving sleep modes

 Lighting and motor control (PWM-specific) controller models

 CAN controller support

 USB controller support

o Proper full-speed (12 Mbit/s) hardware & Hub controller with


embedded AVR.

o Also freely available low-speed (1.5 Mbit/s) (HID) bitbanging software


emulations

 Ethernet controller support

 LCD controller support


 Low-voltage devices operating down to 1.8 V (to 0.7 V for parts with built-in
DC–DC upconverter)

 picoPower devices

 DMA controllers and "event system" peripheral communication.

 Fast cryptography support for AES and DES

Programming interfaces

There are many means to load program code into an AVR chip. The methods to
program AVR chips varies from AVR family to family.

ISP

6- and 10-pin ISP header diagrams

The in-system programming (ISP) programming method is functionally performed


through SPI, plus some twiddling of the Reset line. As long as the SPI pins of the
AVR aren't connected to anything disruptive, the AVR chip can stay soldered on a
PCB while reprogramming. All that's needed is a 6-pin connector and
programming adapter. This is the most common way to develop with an AVR.
The Atmel AVR ISP mkII device connects to a computer's USB port and performs
in-system programming using Atmel's software.

AVRDUDE (AVR Downloader/UploaDEr) runs on Linux, FreeBSD, Windows, and


Mac OS X, and supports a variety of in-system programming hardware, including
Atmel AVR ISP mkII, Atmel JTAG ICE, older Atmel serial-port based programmers,
and various third-party and "do-it-yourself" programmers.[7]

PDI

The Program and Debug Interface (PDI) is an Atmel proprietary interface for
external programming and on-chip debugging of XMEGA devices. The PDI
supports high-speed programming of all non-volatile memory (NVM) spaces;
flash, EEPROM, fuses, lock-bits and the User Signature Row. This is done by
accessing the XMEGA NVM controller through the PDI interface, and executing
NVM controller commands. The PDI is a 2-pin interface using the Reset pin for
clock input (PDI_CLK) and a dedicated data pin (PDI_DATA) for input and output. [8]

High voltage serial

High-voltage serial programming (HVSP)[9] is mostly the backup mode on


smaller AVRs. An 8-pin AVR package doesn't leave many unique signal
combinations to place the AVR into a programming mode. A 12 volt signal,
however, is something the AVR should only see during programming and never
during normal operation.

High voltage parallel


High voltage parallel programming (HVPP) is considered the "final resort"
and may be the only way to fix AVR chips with bad fuse settings.

Boot loader:

Most AVR models can reserve a bootloader region, 256 B to 4 KB, where re-
programming code can reside. At reset, the bootloader runs first, and does some
user-programmed determination whether to re-program, or jump to the main
application. The code can re-program through any interface available, it could
read an encrypted binary through an Ethernet adapter like PXE. Atmel has
application notes and code pertaining to many bus interfaces.[10][11][12][13]

ROM

The AT90SC series of AVRs are available with a factory mask-ROM rather than flash
for program memory.[14] Because of the large up-front cost and minimum order
quantity, a mask-ROM is only cost-effective for high production runs.

aWire

aWire is a new one-wire debug interface available on the new UC3L AVR32
devices.

Debugging interfaces

The AVR offers several options for debugging, mostly involving on-chip debugging
while the chip is in the target system.

debugWIRE
debugWIRETM is Atmel's solution for providing on-chip debug capabilities via a
single microcontroller pin. It is particularly useful for lower pin count parts which
cannot provide the four "spare" pins needed for JTAG. The JTAGICE mkII, mkIII and
the AVR Dragon support debugWIRE. debugWIRE was developed after the original
JTAGICE release, and now clones support it.

JTAG

The Joint Test Action Group (JTAG) feature provides access to on-chip debugging
functionality while the chip is running in the target system. [15] JTAG allows
accessing internal memory and registers, setting breakpoints on code, and single-
stepping execution to observe system behaviour.

Atmel provides a series of JTAG adapters for the AVR:

1. The JTAGICE 3[16] is the latest member of the JTAGICE family (JTAGICE mkIII).
It supports JTAG, aWire, SPI, and PDI interfaces.
2. The JTAGICE mkII[17] replaces the JTAGICE and is similarly priced. The
JTAGICE mkII interfaces to the PC via USB, and supports both JTAG and the
newer debugWIRE interface. Numerous third-party clones of the Atmel
JTAGICE mkII device started shipping after Atmel released the
communication protocol.[18]

3. The AVR Dragon[19] is a low-cost (approximately $50) substitute for the


JTAGICE mkII for certain target parts. The AVR Dragon provides in-system
serial programming, high-voltage serial programming and parallel
programming, as well as JTAG or debugWIRE emulation for parts with 32 KB
of program memory or less. ATMEL changed the debugging feature of AVR
Dragon with the latest firmware of AVR Studio 4 - AVR Studio 5 and now it
supports devices over 32 KB of program memory.

4. The JTAGICE adapter interfaces to the PC via a standard serial port. [citation
needed]
Although the JTAGICE adapter has been declared "end-of-life" by
Atmel, it is still supported in AVR Studio and other tools.

JTAG can also be used to perform a boundary scan test,[20] which tests the
electrical connections between AVRs and other boundary scan capable chips in a
system. Boundary scan is well-suited for a production line, while the hobbyist is
probably better off testing with a multimeter or oscilloscope.

Development tools and evaluation kits

Official Atmel AVR development tools and evaluation kits contain a number of
starter kits and debugging tools with support for most AVR devices:

STK600 starter kit

The STK600 starter kit and development system is an update to the STK500. [21] The
STK600 uses a base board, a signal routing board, and a target board.

The base board is similar to the STK500, in that it provides a power supply, clock,
in-system programming, an RS-232 port and a CAN (Controller Area Network, an
automotive standard) port via DB9 connectors, and stake pins for all of the GPIO
signals from the target device.

The target boards have ZIF sockets for DIP, SOIC, QFN, or QFP packages,
depending on the board.
The signal routing board sits between the base board and the target board, and
routes the signals to the proper pin on the device board. There are many different
signal routing boards that could be used with a single target board, depending on
what device is in the ZIF socket.

The STK600 allows in-system programming from the PC via USB, leaving the RS-
232 port available for the target microcontroller. A 4 pin header on the STK600
labeled 'RS-232 spare' can connect any TTL level USART port on the chip to an
onboard MAX232 chip to translate the signals to RS-232 levels. The RS-232 signals
are connected to the RX, TX, CTS, and RTS pins on the DB-9 connector.

STK500 starter kit

The STK500 starter kit and development system features ISP and high voltage
programming (HVP) for all AVR devices, either directly or through extension
boards. The board is fitted with DIP sockets for all AVRs available in DIP packages.

STK500 Expansion Modules: Several expansion modules are available for the
STK500 board:

 STK501 - Adds support for microcontrollers in 64-pin TQFP packages.


 STK502 - Adds support for LCD AVRs in 64-pin TQFP packages.

 STK503 - Adds support for microcontrollers in 100-pin TQFP packages.

 STK504 - Adds support for LCD AVRs in 100-pin TQFP packages.

 STK505 - Adds support for 14 and 20-pin AVRs.


 STK520 - Adds support for 14 and 20, and 32-pin microcontrollers from the
AT90PWM and ATmega family.

 STK524 - Adds support for the ATmega32M1/C1 32-pin CAN/LIN/Motor


•Control family.

 STK525 - Adds support for the AT90USB microcontrollers in 64-pin TQFP


packages.

 STK526 - Adds support for the AT90USB microcontrollers in 32-pin TQFP


packages

STK200 starter kit

The STK200 starter kit and development system has a DIP socket that can host an
AVR chip in a 40, 20, or 8-pin package. The board has a 4 MHz clock source, 8
light-emitting diodes, 8 input buttons, an RS-232 port, a socket for a 32k SRAM and
numerous general I/O. The chip can be programmed with a dongle connected to the parallel-port.
AVR ISP and AVR ISP mkII

The AVR ISP and AVR ISP mkII are inexpensive tools allowing all AVRs to be
programmed via ICSP.

The AVR ISP connects to a PC via a serial port and draws power from the target
system. The AVR ISP allows using either of the "standard" ICSP pinouts, either the
10-pin or 6-pin connector. The AVR ISP has been discontinued, replaced by the
AVR ISP mkII.

The AVR ISP mkII connects to a PC via USB and draws power from USB. LEDs
visible through the translucent case indicate the state of target power.

JTAGICE mkI

The JTAG In Circuit Emulator (JTAGICE) debugging tool supports on-chip debugging
(OCD) of AVRs with a JTAG interface. The original JTAGICE mkI uses an RS-232
interface to a PC and can only program AVR's with a JTAG interface. The JTAGICE
mkI is no longer in production, however it has been replaced by the JTAGICE mkII.

JTAGICE mkII

The JTAGICE mkII debugging tool supports on-chip debugging (OCD) of AVRs with
SPI, JTAG, PDI, and debugWIRE interfaces. The debugWire interface enables
debugging using only one pin (the Reset pin), allowing debugging of applications
running on low pin-count microcontrollers.
The JTAGICE mkII connects using USB, but there is an alternate connection via a
serial port, which requires using a separate power supply. In addition to JTAG, the
mkII supports ISP programming (using 6-pin or 10-pin adapters). Both the USB and
serial links use a variant of the STK500 protocol.

AT90USBKey

This small board, about half the size of a business card, is priced at slightly more
than an AVR Butterfly. It includes an AT90USB1287 with USB On-The-Go (OTG)
support, 16 MB of DataFlash, LEDs, a small joystick, and a temperature sensor. The
board includes software which lets it act as a USB mass storage device (its
documentation is shipped on the DataFlash), a USB joystick, and more. To support
the USB host capability, it must be operated from a battery, but when running as a
USB peripheral, it only needs the power provided over USB.

Only the JTAG port uses conventional 2.54 mm pinout. All the other AVR I/O ports
require more compact 1.27 mm headers.

The AVR Dragon can both program and debug since the 32 KB limitation was
removed in AVR Studio 4.18, and the JTAGICE mkII is capable of both
programming and debugging the processor. The processor can also be
programmed through USB from a Windows or Linux host, using the USB "Device
Firmware Update" protocols. Atmel ships proprietary (source code included but
distribution restricted) example programs and a USB protocol stack with the
device.
LUFA[26] is a third-party free software (MIT license) USB protocol stack for the
USBKey and other 8-bit USB AVRs.

Raven wireless kit

The RAVEN kit supports wireless development using Atmel's IEEE 802.15.4
chipsets, for ZigBee and other wireless stacks. It resembles a pair of wireless
more-powerful Butterfly cards, plus a wireless USBKey; and costing about that
much (under $US100). All these boards support JTAG-based development.

The kit includes two AVR Raven boards, each with a 2.4 GHz transceiver
supporting IEEE 802.15.4 (and a freely licensed ZigBee stack). The radios are
driven with ATmega1284p processors, which are supported by a custom
segmented LCD display driven by an ATmega3290p processor. Raven peripherals
resemble the Butterfly: piezo speaker, DataFlash (bigger), external EEPROM,
sensors, 32 kHz crystal for RTC, and so on. These are intended for use in
developing remote sensor nodes, to control relays, or whatever is needed.

The USB stick uses an AT90USB1287 for connections to a USB host and to the
2.4 GHz wireless links. These are intended to monitor and control the remote
nodes, relying on host power rather than local batteries.

Third-party programmers

A wide variety of third-party programming and debugging tools are available for
the AVR. These devices use various interfaces, including RS-232, PC parallel port,
and USB. AVR Freaks has a comprehensive list.
Pin Descriptions

VCC Digital supply voltage.

GND Ground.

Port B (PB7..PB0)

XTAL1/XTAL2/TOSC1/TOSC2
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for
each bit). The

Port B output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port B pins that are externally pulled low will
source current if the pull-up resistors are activated. The Port B pins are tri-stated
when a reset condition becomes active, even if the clock is not running.

Depending on the clock selection fuse settings, PB6 can be used as input to the
inverting Oscillator amplifier and input to the internal clock operating circuit.

Depending on the clock selection fuse settings, PB7 can be used as output from
the inverting Oscillator amplifier.

If the Internal Calibrated RC Oscillator is used as chip clock source, PB7..6 is used
as TOSC2..1 input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is
set.

Port C (PC5..PC0) Port C is an 7-bit bi-directional I/O port with internal pull-up
resistors (selected for each bit). The Port C output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port C pins
that are externally pulled low will source current if the pull-up resistors are
activated. The Port C pins are tri-stated when a reset condition becomes active,

even if the clock is not running.

PC6/RESET If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note
that the electrical characteristics of PC6 differ from those of the other pins of Port
C.
If the RSTDISBL Fuse is unprogrammed, PC6 is used as a Reset input. A low level
on this pin for longer than the minimum pulse length will generate a Reset, even if
the clock is not running.

The minimum pulse length is given in Table 15 on page 38. Shorter pulses are not
guaranteed to generate a Reset.

Port D (PD7..PD0) Port D is an 8-bit bi-directional I/O port with internal pull-up
resistors (selected for each bit). The Port D output buffers have symmetrical drive
characteristics with both high sink and source capability. As inputs, Port D pins
that are externally pulled low will source current if the pull-up resistors are
activated. The Port D pins are tri-stated when a reset condition becomes active,

even if the clock is not running.

RESET Reset input. A low level on this pin for longer than the minimum pulse
length will generate a reset, even if the clock is not running. Shorter pulses are
not guaranteed to generate a reset.

ATmega8(L)

AVCC AVCC is the supply voltage pin for the A/D Converter, Port C (3..0), and ADC
(7..6). It should be externally connected to VCC, even if the ADC is not used. If the
ADC is used, it should be connected to VCC through a low-pass filter. Note that
Port C (5..4) use digital supply voltage, VCC.

AREF AREF is the analog reference pin for the A/D Converter.

ADC7..6 (TQFP and QFN/MLF Package Only)


In the TQFP and QFN/MLF package, ADC7..6 serve as analog inputs to the A/D
converter.

These pins are powered from the analog supply and serve as 10-bit ADC channels.

7. Flowchart

NOTE: ATTACH FLOW CHART SOFT COPY HERE

8. Results of Project
[ATTACH UR PROJECT KIT IMAGES HERE]

9. Applications:

 Can be used in all Manufacturing Industries


 Can be used in all Automation Industries
 Can be used in all self driving vehicle
 Can be used in Navy
 Can be used in defense
 Can be used in Aerospace
 Can be used in all public transportation Vehicles to prevent accident…etc
10.Advantages:
 Avoid accident

 Save property damage

 Save human life

 Good accuracy
 High speed.
 Easy to handle.
 Low cost.
 Secured. …………etc

11. Conclusion

This project is designed by Bluetooth & Android based Robot control. AVR
Microcontroller offer more features. So that it can allow adding more applications
related to Remote Controlled Vehicle. The wireless Bluetooth frequency range is
2.4 GHz to 2.5 GHz & distance is 10-20 feet. In the future the its distance can
increase for using wireless devices like ZigBee, IOT, GSM Modem, WiFi…etc. AVR
Microcontroller is reprogrammable , so we can enhance it more number of
applications in the future.
12. Bibliography

 AVR Microcontroller—Wikipedia (http://en.wikipedia.org/wiki/Atmel_AVR),


ATMEGA8L Data Sheet.

 LCD Display- 16 X2 LCD Data Sheet

 Power Supply, Serial Communication, Indication Unit ….etc – UltiSmart Infotech


Notes (www.eultismart.wix.com/ infotech, www.ultismartinfotech.com )

 BlueTooth-- Data Sheet & UltiSmart Infotech Notes (www.eultismart.wix.com/


infotech, www.ultismartinfotech.com )

 Android Mobile -- Data Sheet & UltiSmart Infotech Notes


(www.eultismart.wix.com/ infotech, www.ultismartinfotech.com )

 Alarm -- UltiSmart Infotech Notes (www.eultismart.wix.com/ infotech,


www.ultismartinfotech.com )

 Motor Driver Circuit -- UltiSmart Infotech Notes (www.eultismart.wix.com/


infotech, www.ultismartinfotech.com )

 Vehicle Mechanical Setup -- UltiSmart Infotech Notes


(www.eultismart.wix.com/ infotech, www.ultismartinfotech.com )

Das könnte Ihnen auch gefallen