SlideShare a Scribd company logo
Embedded System
IS COMBINATION OF HARDWARE AND SOFTWARE
• “ 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
Embedded System In Daily Life
Moving message display
DVD player Traffic Light
Digital clock
Game
APPLICATION
.
INPUT OUTPUT
RAM ROM
MICROCONTROLLER
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.
Basic Block Diagram of Microcontroller
AVR
A: Advance
V: Virtual
R:Risc
AVR
ATMEGA 8
MICRO-CONTROLLER
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.
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.
.
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.
MEMORY SEGMENTS
• 8K Bytes of Flash program memory
• 512 Bytes EEPROM (Electrically Erasable
Programmable Read Only Memory)
• 1K Byte Internal RAM (Random Access Memory)
Atmega8
PORTB-8ch
PORTC-7ch
PORTD-8ch
total port pin:23
1.VCC
2.GND
3.GND
4.AVCC
5.AREF
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.
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
PORT Associated Registers
DDRx – Data Direction Register
PORTx – Pin Output Register
PINx – Pin Input Register
where x = GPIO port name ( B, C or D)
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
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.
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.
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.
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.
LED BLINKING
STEP1:
Make Portb as output
DDRB=0b11111111
STEP2:
Provide +5v to LED.
PORTB=0b11111111
LED BLINKING
shifting
PORTB=0b00000001
PORTB=0b00000010
PORTB=0b00000100
PORTB=0b00001000
PORTB=0b00010000
PORTB=00100000
STEP1: WRITING CODE.
STEP2: COMPILE CODE.
STEP3: FLASH HEX FILE INTO AVR MICROCONTROLLER
COMPUTER
.hex file
Thanks........

More Related Content

What's hot

AVR Microcontroller
AVR MicrocontrollerAVR Microcontroller
AVR MicrocontrollerÖzcan Acar
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil KawareProf. Swapnil V. Kaware
 
Microprocessor & Micro-controller
Microprocessor & Micro-controllerMicroprocessor & Micro-controller
Microprocessor & Micro-controller
Om Bheda
 
Architecture of 16C6X
Architecture of 16C6XArchitecture of 16C6X
Architecture of 16C6X
v Kalairajan
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
DominicHendry
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
hello_priti
 
Basics of ATmega32
Basics of ATmega32Basics of ATmega32
Basics of ATmega32
Nima Ghaedsharafi
 
Interfacing stepper motor
Interfacing stepper motorInterfacing stepper motor
Interfacing stepper motorPRADEEP
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Ganesh Ram
 
ARM stacks, subroutines, Cortex M3, LPC 214X
ARM  stacks, subroutines, Cortex M3, LPC 214XARM  stacks, subroutines, Cortex M3, LPC 214X
ARM stacks, subroutines, Cortex M3, LPC 214X
Karthik Vivek
 
Pic18f458
Pic18f458Pic18f458
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
Rahul Kumar
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085
Nitin Ahire
 
Introduction to Microcontroller
Introduction to MicrocontrollerIntroduction to Microcontroller
Introduction to Microcontroller
Nikhil Sharma
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
Dr M Muruganandam Masilamani
 
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
RamaPrabha24
 
8255 Programmable parallel I/O
8255 Programmable parallel I/O 8255 Programmable parallel I/O
8255 Programmable parallel I/O
Muhammed Afsal Villan
 

What's hot (20)

AVR Microcontroller
AVR MicrocontrollerAVR Microcontroller
AVR Microcontroller
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
Microprocessor & Micro-controller
Microprocessor & Micro-controllerMicroprocessor & Micro-controller
Microprocessor & Micro-controller
 
Architecture of 16C6X
Architecture of 16C6XArchitecture of 16C6X
Architecture of 16C6X
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
 
Basics of ATmega32
Basics of ATmega32Basics of ATmega32
Basics of ATmega32
 
Interfacing stepper motor
Interfacing stepper motorInterfacing stepper motor
Interfacing stepper motor
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))
 
ARM stacks, subroutines, Cortex M3, LPC 214X
ARM  stacks, subroutines, Cortex M3, LPC 214XARM  stacks, subroutines, Cortex M3, LPC 214X
ARM stacks, subroutines, Cortex M3, LPC 214X
 
Pic18f458
Pic18f458Pic18f458
Pic18f458
 
8051 Microcontroller ppt
8051 Microcontroller ppt8051 Microcontroller ppt
8051 Microcontroller ppt
 
Interfacing of io device to 8085
Interfacing of io device to 8085Interfacing of io device to 8085
Interfacing of io device to 8085
 
Introduction to Microcontroller
Introduction to MicrocontrollerIntroduction to Microcontroller
Introduction to Microcontroller
 
Avr and arm
Avr and armAvr and arm
Avr and arm
 
Introduction to stm32-part2
Introduction to stm32-part2Introduction to stm32-part2
Introduction to stm32-part2
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
 
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
8085 MICROPROCESSOR ARCHITECTURE AND ITS OPERATIONS
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
8255 Programmable parallel I/O
8255 Programmable parallel I/O 8255 Programmable parallel I/O
8255 Programmable parallel I/O
 

Similar to Avr microcontroller

Microcontroller
MicrocontrollerMicrocontroller
MicrocontrollerSpitiq
 
Overview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerOverview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontroller
Rup Chowdhury
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basics
sagar Ramdev
 
Atmega16
Atmega16Atmega16
Atmega16
Thrived Kumar
 
Introduction2_PIC.ppt
Introduction2_PIC.pptIntroduction2_PIC.ppt
Introduction2_PIC.ppt
AakashRawat35
 
unit-2.pptx
unit-2.pptxunit-2.pptx
unit-2.pptx
KanchanThory
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
Sadiq Rahim
 
digital clock atmega16
digital clock atmega16digital clock atmega16
digital clock atmega16
Arcanjo Salazaku
 
Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)
Vishalya Dulam
 
5. Features of the LPC214X Family.pptx
5. Features of the LPC214X Family.pptx5. Features of the LPC214X Family.pptx
5. Features of the LPC214X Family.pptx
SivakumarG52
 
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080Vivek Venugopal
 
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advancedMicrocontroller from basic_to_advanced
Microcontroller from basic_to_advanced
Imran Sheikh
 
embedded system and microcontroller
 embedded system and microcontroller embedded system and microcontroller
embedded system and microcontroller
SHILPA Sillobhargav
 
Avr report
Avr reportAvr report
Avr report
NITISH KUMAR
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
Sayan Chakraborty
 
Chp4 introduction to the pic microcontroller copy
Chp4 introduction to the pic microcontroller   copyChp4 introduction to the pic microcontroller   copy
Chp4 introduction to the pic microcontroller copymkazree
 
Embedded system design using arduino
Embedded system design using arduinoEmbedded system design using arduino
Embedded system design using arduino
Santosh Verma
 

Similar to Avr microcontroller (20)

Microcontroller
MicrocontrollerMicrocontroller
Microcontroller
 
Overview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontrollerOverview of Microcontroller and ATMega32 microcontroller
Overview of Microcontroller and ATMega32 microcontroller
 
microcontroller basics
microcontroller basicsmicrocontroller basics
microcontroller basics
 
Atmega16
Atmega16Atmega16
Atmega16
 
Introduction2_PIC.ppt
Introduction2_PIC.pptIntroduction2_PIC.ppt
Introduction2_PIC.ppt
 
unit-2.pptx
unit-2.pptxunit-2.pptx
unit-2.pptx
 
Microcontroller 8051
Microcontroller 8051Microcontroller 8051
Microcontroller 8051
 
digital clock atmega16
digital clock atmega16digital clock atmega16
digital clock atmega16
 
Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)Pc based wire less data aquisition system using rf(1)
Pc based wire less data aquisition system using rf(1)
 
Microcontroller 8051 gs
Microcontroller 8051 gsMicrocontroller 8051 gs
Microcontroller 8051 gs
 
5. Features of the LPC214X Family.pptx
5. Features of the LPC214X Family.pptx5. Features of the LPC214X Family.pptx
5. Features of the LPC214X Family.pptx
 
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
AN INTEGRATED FOUR-PORT DC-DC CONVERTER-CEI0080
 
Microcontroller from basic_to_advanced
Microcontroller from basic_to_advancedMicrocontroller from basic_to_advanced
Microcontroller from basic_to_advanced
 
embedded system and microcontroller
 embedded system and microcontroller embedded system and microcontroller
embedded system and microcontroller
 
Avr report
Avr reportAvr report
Avr report
 
8051 Presentation
8051 Presentation8051 Presentation
8051 Presentation
 
Chp4 introduction to the pic microcontroller copy
Chp4 introduction to the pic microcontroller   copyChp4 introduction to the pic microcontroller   copy
Chp4 introduction to the pic microcontroller copy
 
Embedded system design using arduino
Embedded system design using arduinoEmbedded system design using arduino
Embedded system design using arduino
 
Assignment
AssignmentAssignment
Assignment
 
8051 full ppt
8051 full ppt8051 full ppt
8051 full ppt
 

Recently uploaded

LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
PrashantGoswami42
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 

Recently uploaded (20)

LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 

Avr microcontroller

  • 1.
  • 2. Embedded System IS COMBINATION OF HARDWARE AND SOFTWARE
  • 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.
  • 8. Basic Block Diagram of Microcontroller
  • 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)
  • 15.
  • 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.
  • 25. LED BLINKING STEP1: Make Portb as output DDRB=0b11111111 STEP2: Provide +5v to LED. PORTB=0b11111111
  • 28. STEP1: WRITING CODE. STEP2: COMPILE CODE. STEP3: FLASH HEX FILE INTO AVR MICROCONTROLLER COMPUTER .hex file