(on AVR platform)
1. Company overview
2. Embedded Systems & types
5. Pin diagram & Features of ATmega 16
7. I/O function registers
8. LCD interfacing
10. Robotics (laws)
11. Autonomous robots
12. how robot moves?
The Hewlett-Packard Company or HP is an
American multinational IT company,
headquartered at US, founded by will Hewlett and
Dave Packard in 1947.
HP is the world’s leading PC manufacturing company
It specializes in developing and manufacturing
computing, data storage, and networking hardware,
designing software and delivering services.
In 2012 it was the world's largest PC vendors by unit
Merges with COMPAQ in 2002.
Majority of its products includes PC, laptops, printers,
scanners, digital cameras, servers, PDA.
WHAT ARE EMBEDDED SYSTEMS?
•An Embedded system is a
Software program on a H/W chip
designed for a specific purpose
and can also contain some
mechanical moving parts.
• An embedded system is a
microcontroller based electronic
device used for specific task.
TYPES OF EMBEDDED SYSTEMS
1. Real time embedded system
(a) Soft real time embedded
2. Non real time embedded
• Pen drives
• Hard disk
• Cell phones
• Security system
• Alarm system
• Digital camera
• Environment monitoring systems…
• It is a small computer on a single integrated
circuit containing a processor core, memory,
and programmable input/output peripherals.
• It is designed for embedded systems.
Code Vision AVR (CVAVR)
• CVAVR is an IDE (integrated development
• An IDE is a software having functions like
Preprocessing, Compilation, Assembly, Linking
Object Translation, Text Editor etc.
• It has limitation of code size.
• It works on computers with Windows platform
that is Windows XP & Vista.
I/O functions Registers
Input Output functions are set by Three Registers for each PORT.
•DDRX ‐‐‐‐> Sets whether a port is
Input or Output of PORTX.
• PORTX ‐‐‐> Sets the Output Value
of PORTX. For ex.
PORTA=255 ( all pins work of port A
as output) for LED & LCD.
• PINX ‐‐‐‐‐> Reads
the Value of PORTX
for ex. PINA.0=0 (0th
pin of port A working
as input ) for switches
• We have used 16x2 alphanumeric LCD, have their
own embedded system in them.
• lcd_clear() clears screen
• lcd_gotoxy(x,y) position
• lcd_putchar(char c) display single character.
• lcd_putsf(string) whole string
• lcd_puts(char arr) for array
• itoa(int val, char arr)
• ftoa(float val, char decimal_places, char arr)
SPI (serial peripheral
It is a communication protocol, used
between two or more microcontroller and
devices supporting SPI mode data transfer.
1. MOSI : Master Out
2. MISO : Master In
3. SCK : Serial Clock
4. SS: Slave Select
We can transmit/receive only 1 byte of data.
LAWS OF ROBOTICS
1. A robot must not harm
human being and
2. It must obey the orders
given by human
being, w/o conflicting
3. A robot must protect its
own existence as long
as it doesn’t conflict
Basic elements for building
Robot chassis and actuators: body and wheels
Electronics: includes Sensors, motion control
circuits, power management system etc.
Power Source :Usually batteries or direct
supply through wire.
Intelligence: is achieved by using
HOW ROBOT MOVES? (H/w)
•3 motors for 4 wheels
• 2 motors for 2 wheels and 1
ball bearing caster
•Controlling rpm and direction
of wheels, controls speed
HOW ROBOT MOVES? (S/w)
• At first TIMER has to
initialize. (Atmega has 3
timers 0, 1, 2).
• OCRX= (int. value 0-255);
• forward movement: 1 in
clockwise other in
• Backward: opposite of
• turning left: left wheel
having less value of OCRX.
• Turning right: right wheel
having less value OCRX.
Sensors are like “feel” for
• Electronically :it is a device that
measures a physical quantity and
converts it into a signal which can
be read by an observer or by an
• TEMPERATURE SENSOR: like
measures from 0 to 100 degrees
• Light Dependent Resistor (LDR): a resistor whose
resistance varies with intensity of light.
• IR sensor: IR led + photodiode + LM358.
• From any “non black body” i.e obstacle IR reflects and
falls on photo diode.
• Hence Photo diode become forward bias, and it turn on the
IC LM358 that gives the output.
• electronics + mechanics
+ software = ROBOT
• By using all of the
commands of CVAVR,
programming is done on
• A robot must be used for