SlideShare a Scribd company logo
Developing an avr microcontroller system
 Introducing Microcontrollers
 About AVR
 AVR Mega8 Architecture
 AVR Programming Interface
 Demo: ‘Hello World’ AVR Design.
 Demo: Hardware Design
 Demo: Programming
Developing an avr microcontroller system
 A microprocessor is a central processing unit
  (CPU) on a single chip.
 When a microprocessor and associated
  support circuitry, peripheral I/O components
  and memory (program as well as data) were
  put together to form a small computer
  specifically for data acquisition and control
  applications, it was called a microcomputer.
 When the components that make a
 microcomputer were put together on a single
 chip of silicon, it was called the
 microcontroller.
A microcontroller
interfaces to
external devices
with a minimum of
external
components
 A recent white paper by Sun Microsystems claims that
  by the end of the decade, an average home will
  contain between 50 to 100 microcontrollers
  controlling digital phones, microwave ovens, VCRs,
  televisions sets and television remotes, dishwashers,
  home security systems, PDAs etc.
 An average car has about 15 processors; the 1999
  Mercedes S-class car has 63 microprocessors, while
  the 1999 BMW has 65 processors!
 Except perhaps the human body, microprocessors and
  microcontrollers have gotten into everything around
  us.
Developing an avr microcontroller system
 RISC architecture with mostly fixed-length
  instruction, load-store memory access and 32
  general-purpose registers.
 A two-stage instruction pipeline that speeds
  up execution
 Majority of instructions take one clock cycle
 Up to 10-MHz clock operation
 Wide variety of on-chip peripherals, including
  digital I/O, ADC, EEPROM, Timer, UART, RTC
  timer, PWM etc
 Internal program and data memory.
 In-System programmable
 Available in 8-pin to 64-pin size to suit wide
  variety of applications
 Up to 12 times performance speedup over
  conventional CISC controllers.
 Wide operating voltage from 2.7V to 6.0V
 Simple architecture offers a small learning
  curve to the uninitiated.
Developing an avr microcontroller system
 8-Kbyte self-
  programming Flash
  Program Memory
 1-Kbyte SRAM
 512 Byte EEPROM
 6 or 8 Channel 10-bit
  A/D-converter.
 Up to 16 MIPS
  throughput at 16 Mhz.
 2.7 - 5.5 Volt operation.
Developing an avr microcontroller system
Developing an avr microcontroller system
Developing an avr microcontroller system
Developing an avr microcontroller system
   The AVR chip has a built in interface, that enables you
    to write and read the content of the program flash and
    the built-in-EEPROM. This interface works serially and
    needs three signal lines:
     SCK: A clock signal that shifts the bits to be written to the
      memory into an internal shift register, and
     that shifts out the bits to be read from another internal
      shift register,
     MOSI: The data signal that sends the bits to be written to
      the AVR,
     MISO: The data signal that receives the bits read from the
      AVR.
   These three signal pins are internally connected to the
    programming machine only if you change the RESET pin
    to zero.
   Otherwise, during normal operation of the AVR, these
    pins are programmable I/O lines like all the others.
   If you like to use these pins for other purposes during
    normal operation, and for in-system-programming, you'll
    have to take care, that these two purposes do not
   conflict.
   Usually you then decouple these by resistors or by use of a
    multiplexer.
   What is necessary in your case, depends from your use of
    the pins in the normal operation mode.
 VTG: Target Voltage
 LED: indicates that the
  programmer is doing
  its job
Developing an avr microcontroller system
Developing an avr microcontroller system
Developing an avr microcontroller system
   The purpose of this
    demo is:
     to design a simple AVR
      system                    Programmer
     Interface it to and LCD
      display
                                  AVR MCU
                                  AVR MCU
     Program it to display
      ‘Hello World’             LCD Display
                                 LCD Display
Developing an avr microcontroller system
Developing an avr microcontroller system
Developing an avr microcontroller system
LCD Interface   AVR Port
RS              PORTC.2
RW              PORTC.3
E               PORTC.4
DATA            PORTD
Developing an avr microcontroller system
 AVR Studio
 GCC
 AVRLibs
 PonyProg
 Include the following files in your project
   lcd.c
   global.h
   timer.h
   lcd.h
 Add a new c source file to your AVR Studio
  project.
 Type in the main function as shown below:
 Main()
{
  lcdInitHW();
  lcdInit();
  lcdGotoXY(0,4);
  lcdPrintData(“Hello Word!”, 11);
}
Developing an avr microcontroller system

More Related Content

What's hot (20)

AVR ATmega32
AVR ATmega32AVR ATmega32
AVR ATmega32
Prashant Tiwari
 
Atmega32
Atmega32Atmega32
Atmega32
Phong Hồ Quang Phong
 
AVR Fundamentals
AVR FundamentalsAVR Fundamentals
AVR Fundamentals
Vinit Vyas
 
Avr introduction
Avr introductionAvr introduction
Avr introduction
Anant Shrivastava
 
Interrupts at AVR
Interrupts at AVRInterrupts at AVR
Interrupts at AVR
Hamdy Fouad
 
Embedded c & working with avr studio
Embedded c & working with avr studioEmbedded c & working with avr studio
Embedded c & working with avr studio
Nitesh Singh
 
ATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part IATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part I
VineethMP2
 
AVR introduction
AVR introduction AVR introduction
AVR introduction
gguptapooja9
 
ATmega32
ATmega32 ATmega32
ATmega32
Sɐɐp ɐɥɯǝp
 
Introduction to Atmel's 8-bit AVR Microcontrollers
Introduction to Atmel's 8-bit AVR Microcontrollers Introduction to Atmel's 8-bit AVR Microcontrollers
Introduction to Atmel's 8-bit AVR Microcontrollers
Premier Farnell
 
A tmega8 basics
A tmega8 basicsA tmega8 basics
A tmega8 basics
Nitesh Singh
 
AVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontrollerAVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontroller
Mohamed Ali
 
Features of ATMEL microcontrollers
Features of ATMEL microcontrollersFeatures of ATMEL microcontrollers
Features of ATMEL microcontrollers
Suraj Shandilya
 
embedded system and AVR
embedded system and AVRembedded system and AVR
embedded system and AVR
Urvashi Khandelwal
 
Ii avr-basics(1)
Ii avr-basics(1)Ii avr-basics(1)
Ii avr-basics(1)
Thakur Satyajeetsinh Dodiya
 
ATMEGA 328
ATMEGA 328ATMEGA 328
ATMEGA 328
ABHISHEK MAURYA
 
Introduction to microcontrollers
Introduction to microcontrollersIntroduction to microcontrollers
Introduction to microcontrollers
Corrado Santoro
 
Interfacing using ِAtmega16/32
Interfacing using ِAtmega16/32 Interfacing using ِAtmega16/32
Interfacing using ِAtmega16/32
محمدعبد الحى
 
PIC_ARM_AVR
PIC_ARM_AVRPIC_ARM_AVR
PIC_ARM_AVR
Mahesh Vadhavaniya profmjv
 
Practical reverse engineering and exploit development for AVR-based Embedded ...
Practical reverse engineering and exploit development for AVR-based Embedded ...Practical reverse engineering and exploit development for AVR-based Embedded ...
Practical reverse engineering and exploit development for AVR-based Embedded ...
Alexander Bolshev
 
AVR Fundamentals
AVR FundamentalsAVR Fundamentals
AVR Fundamentals
Vinit Vyas
 
Interrupts at AVR
Interrupts at AVRInterrupts at AVR
Interrupts at AVR
Hamdy Fouad
 
Embedded c & working with avr studio
Embedded c & working with avr studioEmbedded c & working with avr studio
Embedded c & working with avr studio
Nitesh Singh
 
ATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part IATmega32-AVR microcontrollers-Part I
ATmega32-AVR microcontrollers-Part I
VineethMP2
 
Introduction to Atmel's 8-bit AVR Microcontrollers
Introduction to Atmel's 8-bit AVR Microcontrollers Introduction to Atmel's 8-bit AVR Microcontrollers
Introduction to Atmel's 8-bit AVR Microcontrollers
Premier Farnell
 
AVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontrollerAVR_Course_Day4 introduction to microcontroller
AVR_Course_Day4 introduction to microcontroller
Mohamed Ali
 
Features of ATMEL microcontrollers
Features of ATMEL microcontrollersFeatures of ATMEL microcontrollers
Features of ATMEL microcontrollers
Suraj Shandilya
 
Introduction to microcontrollers
Introduction to microcontrollersIntroduction to microcontrollers
Introduction to microcontrollers
Corrado Santoro
 
Practical reverse engineering and exploit development for AVR-based Embedded ...
Practical reverse engineering and exploit development for AVR-based Embedded ...Practical reverse engineering and exploit development for AVR-based Embedded ...
Practical reverse engineering and exploit development for AVR-based Embedded ...
Alexander Bolshev
 

Viewers also liked (8)

Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Timer & Interrupt Atmega16
Timer & Interrupt Atmega16
Ramadan Ramadan
 
JAVA Media Player
JAVA Media PlayerJAVA Media Player
JAVA Media Player
Nausad Ahamed
 
Avr timers
Avr timersAvr timers
Avr timers
Utsav Jain
 
Mp3 player project presentation
Mp3 player project presentationMp3 player project presentation
Mp3 player project presentation
Antonio Mondragon
 
Android mp3 player
Android mp3 playerAndroid mp3 player
Android mp3 player
Subhrajit Das
 
Android Media player
Android Media playerAndroid Media player
Android Media player
Maharshi Pancholi
 
Designing of media player
Designing of media playerDesigning of media player
Designing of media player
Nur Islam
 
Java Media Player thorugh JMF
Java Media Player thorugh JMFJava Media Player thorugh JMF
Java Media Player thorugh JMF
Prashant Singh
 
Timer & Interrupt Atmega16
Timer & Interrupt Atmega16Timer & Interrupt Atmega16
Timer & Interrupt Atmega16
Ramadan Ramadan
 
Mp3 player project presentation
Mp3 player project presentationMp3 player project presentation
Mp3 player project presentation
Antonio Mondragon
 
Designing of media player
Designing of media playerDesigning of media player
Designing of media player
Nur Islam
 
Java Media Player thorugh JMF
Java Media Player thorugh JMFJava Media Player thorugh JMF
Java Media Player thorugh JMF
Prashant Singh
 

Similar to Developing an avr microcontroller system (20)

Embedded Application : An Autonomous Robot or Line Follower Bot
Embedded Application : An Autonomous Robot or Line Follower BotEmbedded Application : An Autonomous Robot or Line Follower Bot
Embedded Application : An Autonomous Robot or Line Follower Bot
Er. Raju Bhardwaj
 
The document provides an overview of the Arduino platform for beginners.
The document provides an overview of the Arduino platform for beginners.The document provides an overview of the Arduino platform for beginners.
The document provides an overview of the Arduino platform for beginners.
QucngV
 
Intro to micro controller (Atmega16)
Intro to micro controller (Atmega16)Intro to micro controller (Atmega16)
Intro to micro controller (Atmega16)
Ramadan Ramadan
 
Microcontrolador AVR y Sistemas Embebidos completos.pdf
Microcontrolador AVR y Sistemas Embebidos completos.pdfMicrocontrolador AVR y Sistemas Embebidos completos.pdf
Microcontrolador AVR y Sistemas Embebidos completos.pdf
SANTIAGO PABLO ALBERTO
 
Avr microcontrollers training (sahil gupta - 9068557926)
Avr microcontrollers training  (sahil gupta - 9068557926)Avr microcontrollers training  (sahil gupta - 9068557926)
Avr microcontrollers training (sahil gupta - 9068557926)
Sahil Gupta
 
Lecture6
Lecture6Lecture6
Lecture6
Mahmut Yildiz
 
Lecture6.pptx
Lecture6.pptxLecture6.pptx
Lecture6.pptx
KamalZeghdar
 
AVR arduino dasar
AVR arduino dasarAVR arduino dasar
AVR arduino dasar
Oktaf Kharisma
 
Presentation
PresentationPresentation
Presentation
Abhijit Das
 
digital clock atmega16
digital clock atmega16digital clock atmega16
digital clock atmega16
Arcanjo Salazaku
 
intro_mcu.pdf
intro_mcu.pdfintro_mcu.pdf
intro_mcu.pdf
IfedayoOladeji1
 
1-AVR Introduction to Atmega32 good .pdf
1-AVR  Introduction to Atmega32  good .pdf1-AVR  Introduction to Atmega32  good .pdf
1-AVR Introduction to Atmega32 good .pdf
KSRaviKumarMVGREEE
 
arduino-ppt
 arduino-ppt arduino-ppt
arduino-ppt
jhcid
 
ESD Presenation.pptx All about embeded system
ESD Presenation.pptx All about embeded systemESD Presenation.pptx All about embeded system
ESD Presenation.pptx All about embeded system
handpump91
 
Ajal mod 1
Ajal mod 1Ajal mod 1
Ajal mod 1
AJAL A J
 
Introduction to Avr Microcontrollers
Introduction to Avr MicrocontrollersIntroduction to Avr Microcontrollers
Introduction to Avr Microcontrollers
Mohamed Tarek
 
introduction to embedded systems part 2
introduction to embedded systems part 2introduction to embedded systems part 2
introduction to embedded systems part 2
Hatem Abd El-Salam
 
3.TechieNest microcontrollers
3.TechieNest  microcontrollers3.TechieNest  microcontrollers
3.TechieNest microcontrollers
TechieNest Pvt. Ltd .
 
Avr report
Avr reportAvr report
Avr report
NITISH KUMAR
 
1.Introduction to AVR.pdf
1.Introduction to AVR.pdf1.Introduction to AVR.pdf
1.Introduction to AVR.pdf
MostafaKhaled78
 
Embedded Application : An Autonomous Robot or Line Follower Bot
Embedded Application : An Autonomous Robot or Line Follower BotEmbedded Application : An Autonomous Robot or Line Follower Bot
Embedded Application : An Autonomous Robot or Line Follower Bot
Er. Raju Bhardwaj
 
The document provides an overview of the Arduino platform for beginners.
The document provides an overview of the Arduino platform for beginners.The document provides an overview of the Arduino platform for beginners.
The document provides an overview of the Arduino platform for beginners.
QucngV
 
Intro to micro controller (Atmega16)
Intro to micro controller (Atmega16)Intro to micro controller (Atmega16)
Intro to micro controller (Atmega16)
Ramadan Ramadan
 
Microcontrolador AVR y Sistemas Embebidos completos.pdf
Microcontrolador AVR y Sistemas Embebidos completos.pdfMicrocontrolador AVR y Sistemas Embebidos completos.pdf
Microcontrolador AVR y Sistemas Embebidos completos.pdf
SANTIAGO PABLO ALBERTO
 
Avr microcontrollers training (sahil gupta - 9068557926)
Avr microcontrollers training  (sahil gupta - 9068557926)Avr microcontrollers training  (sahil gupta - 9068557926)
Avr microcontrollers training (sahil gupta - 9068557926)
Sahil Gupta
 
1-AVR Introduction to Atmega32 good .pdf
1-AVR  Introduction to Atmega32  good .pdf1-AVR  Introduction to Atmega32  good .pdf
1-AVR Introduction to Atmega32 good .pdf
KSRaviKumarMVGREEE
 
arduino-ppt
 arduino-ppt arduino-ppt
arduino-ppt
jhcid
 
ESD Presenation.pptx All about embeded system
ESD Presenation.pptx All about embeded systemESD Presenation.pptx All about embeded system
ESD Presenation.pptx All about embeded system
handpump91
 
Ajal mod 1
Ajal mod 1Ajal mod 1
Ajal mod 1
AJAL A J
 
Introduction to Avr Microcontrollers
Introduction to Avr MicrocontrollersIntroduction to Avr Microcontrollers
Introduction to Avr Microcontrollers
Mohamed Tarek
 
introduction to embedded systems part 2
introduction to embedded systems part 2introduction to embedded systems part 2
introduction to embedded systems part 2
Hatem Abd El-Salam
 
1.Introduction to AVR.pdf
1.Introduction to AVR.pdf1.Introduction to AVR.pdf
1.Introduction to AVR.pdf
MostafaKhaled78
 

Developing an avr microcontroller system

  • 2.  Introducing Microcontrollers  About AVR  AVR Mega8 Architecture  AVR Programming Interface  Demo: ‘Hello World’ AVR Design.  Demo: Hardware Design  Demo: Programming
  • 4.  A microprocessor is a central processing unit (CPU) on a single chip.  When a microprocessor and associated support circuitry, peripheral I/O components and memory (program as well as data) were put together to form a small computer specifically for data acquisition and control applications, it was called a microcomputer.
  • 5.  When the components that make a microcomputer were put together on a single chip of silicon, it was called the microcontroller.
  • 6. A microcontroller interfaces to external devices with a minimum of external components
  • 7.  A recent white paper by Sun Microsystems claims that by the end of the decade, an average home will contain between 50 to 100 microcontrollers controlling digital phones, microwave ovens, VCRs, televisions sets and television remotes, dishwashers, home security systems, PDAs etc.  An average car has about 15 processors; the 1999 Mercedes S-class car has 63 microprocessors, while the 1999 BMW has 65 processors!  Except perhaps the human body, microprocessors and microcontrollers have gotten into everything around us.
  • 9.  RISC architecture with mostly fixed-length instruction, load-store memory access and 32 general-purpose registers.  A two-stage instruction pipeline that speeds up execution  Majority of instructions take one clock cycle  Up to 10-MHz clock operation
  • 10.  Wide variety of on-chip peripherals, including digital I/O, ADC, EEPROM, Timer, UART, RTC timer, PWM etc  Internal program and data memory.  In-System programmable  Available in 8-pin to 64-pin size to suit wide variety of applications
  • 11.  Up to 12 times performance speedup over conventional CISC controllers.  Wide operating voltage from 2.7V to 6.0V  Simple architecture offers a small learning curve to the uninitiated.
  • 13.  8-Kbyte self- programming Flash Program Memory  1-Kbyte SRAM  512 Byte EEPROM  6 or 8 Channel 10-bit A/D-converter.  Up to 16 MIPS throughput at 16 Mhz.  2.7 - 5.5 Volt operation.
  • 18. The AVR chip has a built in interface, that enables you to write and read the content of the program flash and the built-in-EEPROM. This interface works serially and needs three signal lines:  SCK: A clock signal that shifts the bits to be written to the memory into an internal shift register, and  that shifts out the bits to be read from another internal shift register,  MOSI: The data signal that sends the bits to be written to the AVR,  MISO: The data signal that receives the bits read from the AVR.
  • 19. These three signal pins are internally connected to the programming machine only if you change the RESET pin to zero.  Otherwise, during normal operation of the AVR, these pins are programmable I/O lines like all the others.  If you like to use these pins for other purposes during normal operation, and for in-system-programming, you'll have to take care, that these two purposes do not  conflict.  Usually you then decouple these by resistors or by use of a multiplexer.  What is necessary in your case, depends from your use of the pins in the normal operation mode.
  • 20.  VTG: Target Voltage  LED: indicates that the programmer is doing its job
  • 24. The purpose of this demo is:  to design a simple AVR system Programmer  Interface it to and LCD display AVR MCU AVR MCU  Program it to display ‘Hello World’ LCD Display LCD Display
  • 28. LCD Interface AVR Port RS PORTC.2 RW PORTC.3 E PORTC.4 DATA PORTD
  • 30.  AVR Studio  GCC  AVRLibs  PonyProg
  • 31.  Include the following files in your project  lcd.c  global.h  timer.h  lcd.h
  • 32.  Add a new c source file to your AVR Studio project.  Type in the main function as shown below:
  • 33.  Main() {  lcdInitHW();  lcdInit();  lcdGotoXY(0,4);  lcdPrintData(“Hello Word!”, 11); }

Editor's Notes

  • #19: SCK (SPI Bus Master clock Input), MISO (SPI Bus Master Input/Slave Output), MOSI (SPI Bus Master Output/Slave Input)