3. • “ An embedded system can be defined as those control
systems which are designed either by microprocessor or
microcontroller for a specific tasks. ”
• “ An embedded system is some combination of computer
hardware & software, either fixed in capability or
programmable, that is specifically designed for a particular
kind of application device. "
EMBEDDED SYSTEM
4. Embedded System In Daily Life
Moving message display
DVD player Traffic Light
Digital clock
Game
7. Microprocessor & Microcontroller
Microprocessor:
A silicon chip that contains a CPU. In the world of personal computers, the
terms microprocessor and CPU are used interchangeably. At the heart of all
personal computers and most of all automatic systems.
Microcontroller :
A microcontroller (sometimes abbreviated µC, uC or MCU) is a small
computer on a single integrated circuit containing a processor core, memory,
and programmable input/output peripherals.
11. It was developed by Atmel Corporation
‘8’ in Atmega8 means this microcontroller has 8Kb of flash
memory
ALL AVR MC Is 8 bit microcontroller.
It was developed in the year 1996 by Atmel Corporation.
12. What is RISC?
RISC stands for “Reduced Instruction Set Computer”
It is a very fast architecture which executes one instruction per clock
cycle.
RISC contains very small instruction set.
Programming is easy, but code length increases.
.
13. Some xtra FEATURES
• Up to 16 MIPS Throughput at 16 MHz
• 32 x 8 General Purpose Working Registers
• Six ADC channels in PDIP package
• Internal Calibrated Oscillator of 2,4,8 MHz.
14. MEMORY SEGMENTS
• 8K Bytes of Flash program memory
• 512 Bytes EEPROM (Electrically Erasable
Programmable Read Only Memory)
• 1K Byte Internal RAM (Random Access Memory)
17. PORT
PORT is use for input and out put communication.
PORT are 8 bit wide.
PORT are bidirectional data bus.
Every PORT has three registers associated with it each one with 8 bit.
18. PB7 PB6 PB5 PB4 PB3 PB2 PB1 PB0
PORT IS 8 BIT REGISTERS.
PORT IS COMBINATION OF 8 FLIP FLOP
PORTB
PORTC
-------- PC6 PC5 PC4 PC3 PC2 PC1 PC0
PD7 PD6 PD5 PD4 PD3 PD2 PD1 PD0
PORTD
19. PORT Associated Registers
DDRx – Data Direction Register
PORTx – Pin Output Register
PINx – Pin Input Register
where x = GPIO port name ( B, C or D)
20. DDRx register
DDRx (Data Direction Register) configures data direction of port pins. Means its
setting determines whether port pins will be used for input or output. Writing 0
to a bit in DDRx makes corresponding port pin as input, while writing 1 to a bit in
DDRx makes corresponding port pin as output.
0 0 0 0 0 0 0 0DDRB=
PORTB is become input. DDRB=0b00000000
1 1 1 1 1 1 1 1DDRB=
PORTB is become OUTPUT DDRB=0b11111111
21. PORTx register
PORT give output voltage to external hardware.
PORT is similar as printf .
PORTB=0b00000000
0 0 0 0 0 0 0 0
PORTB provide low (0) voltage to blub.
22. PORTx register
PORT give output voltage to external hardware.
PORT is similar as printf .
PORTB=0b11111111
1 1 1 1 1 1 1 1
PORTB provide high (5) voltage to blub.
23. PORTx register
PORT give output voltage to external hardware.
PORT is similar as printf .
PORTB=0b11000011
1 1 0 0 0 0 1 1
PORTB provide high (5) voltage to blub.
24. INTERFACING LED WITH ATMEGAX
LED stands for "Light Emmiting Diode", It has 2 PINs one for +ve Source and the other one for Ground
Basically 5mm LEDs work at 20mA and 3V
current. Now the question comes, How to get the
same Value of source from the MCU. Well,
actually Micro Controller can provide constant 5V
with 20mA Current through its PORTs(A to D)
Lets calculate the Resistance Value, Our Requirements : 20mA , 3V
We Have : 20mA, 5V.So, we need to Decrese the Voltage by 2V.
The Current Flowing in the Cct is 20mA.
V = I X R .
V = 2V.
I = 20mA.
R= ?
2= 0.020 X R
=> R = 2 / 0.020
= 100 Ohm.