Embedded systems, 8051 microcontroller

download Embedded systems, 8051 microcontroller

of 25

  • date post

    29-Nov-2014
  • Category

    Education

  • view

    6.036
  • download

    10

Embed Size (px)

description

summer training ppt on 8051, this ppt has been made with the help other ppt related to this topic on http://www.slideshare.net

Transcript of Embedded systems, 8051 microcontroller

  • 1. EMBEDDED SYSTEMSSUBMITTED TO: SUBMITTED BY:MR. ABISHEK SHARMA Arish Kumar Sharma 100640418019 ECE-A
  • 2. What Are Embedded Systems?Special purpose system which are either used as standalone or part of abig systemAn Embedded System is one that has computer hardware with softwareembedded in it as one of its important components.An embedded product uses a microprocessor (or microcontroller) to doone task and one task only.A printer is an example of embedded system since the processor inside itperforms only one task; namely, getting the data and printing it
  • 3. WHERE ARE THEY PRESENT ? Household appliances Integrated systems in aircrafts and missiles Cellular telephones Electric and Electronic Motor controllers Engine controllers in automobiles Calculators Medical equipments Videogames Digital musical instruments
  • 4. The necessary tools for a microprocessor/microcontroller CPU: Central Processing Unit I/O: Input /Output Bus: Address bus & Data bus Memory: RAM & ROM Timer Interrupt
  • 5. Introduction to MicroprocessorsA Microprocessor is a general purpose chip used to create multifunctiondevice No RAM, ROM, I/O ports on CPU chip itselfCPU is stand-alone, Must add RAM, ROM, I/O ports, and timersexternally to make them functionalDesigner can decide on the amount of ROM, RAM and I/O portsExample Intels x86, Motorolas 680x0
  • 6. Introduction to MicrocontrollersA Microcontroller is a computer-on-a-chip optimized to control ElectronicdevicesCPU + I/O + Timer(s) [+ ROM] [+ RAM] All on single chipLimited RAM space, ROM space and I/O pinsLow chip-count to implement a small systemLow-cost at large quantitiesDevelopment tools readily available at reasonable cost
  • 7. Microprocessor System Contrasted With Microcontroller System
  • 8. Microprocessor vs. MicrocontrollerMicrocontroller Microprocessor CPU, RAM, ROM, I/O and CPU is stand-alone, RAM, timer are all on a single chip ROM, I/O, timer are separate Fix amount of on-chip ROM, Designer can decide the amount RAM, I/O ports of ROM, RAM and I/O ports For applications in which cost, power and space are critical Expansive Not Expansive Versatility Single-purpose General-purpose
  • 9. Criteria for Choosing a Microcontroller Following must be kept in mind while choosing a microcontroller Speed Packaging Power consumption The amount of RAM and ROM on chip The number of I/O pins and the timer on chip How easy to upgrade to higher performance or lower power- consumption versions Cost per unit
  • 10. Microcontroller Architectures Memory 0 Address Bus Program CPU Data Bus + Data Von Neumann 2n Architecture Memory Address Bus 0 Program CPU Fetch Bus Harvard Address Bus 0 Architecture Data Bus Data
  • 11. Features Of 8051 The Intel 8051 is used in embedded systems has 8-bit CPU 4k bytes ROM for the program 128 BYTES of RAM for variables 32 I/O lines ( 4 PORTS WITH 8 EACH ) 2 timers 6 interrupt sources Low cost per chip
  • 12. 8051 PIN description P1.0 1 40 Vcc P1.1 2 39 P0.0 (AD0) P1.2 3 P0.1 (AD1) 38 P1.3 4 37 P0.2 (AD2) P1.4 5 36 P0.3 (AD3) P1.5 6 35 P0.4 (AD4) P1.6 7 34 P0.5 (AD5) P1.7 8 8051 33 P0.6 (AD6) RST 9 32 P0.7 (AD7)(RXD) P3.0 10 31 EA/VPP (TXD) P3.1 11 30 ALE/PROG(INT0) P3.2 12 29 PSEN(INT1) P3.3 13 28 P2.7 (A15) (T0) P3.4 14 27 P2.6 (A14) (T1) P3.5 15 26 P2.5 (A13) (WR) P3.6 16 25 P2.4 (A12) (RD) P3.7 17 24 P2.3 (A11) XTAL2 18 23 P2.2 (A10) XTAL1 19 22 P2.1 (A9) GND 20 21 P2.0 (A8)
  • 13. I/0 Ports:-8051 microcontroller has four I/O ports P0, P1, P2andP3 eachuse8 pins makingthem 8 bitports. All the ports can be used as either input or outputPort 0: Port 0 occupies a total of 8 pins (pins 32-39) .It can be used for input oroutput. To use the pins of port 0 as both input and output ports, each pin must beconnected externally to a 10K ohm pull-up resistor.Port 1: Port 1 occupies a total of 8 pins (pins 1-8). It can be used as input oroutput. In contrast to port 0, this port does not need any pull-up resistors since italready has pull-up resistors internally.Port 2 : Port 2 occupies a total of 8 pins (pins 21- 28). It can be used as input oroutput. Just like P1, P2 does not need any pull-up resistors since it already haspull-up resistors internally.Port 3 : Port 3 occupies a total of 8 pins (pins 10 -17). It can be used as input oroutput. P3 does not need any pull-up resistors, the same as P1 and P2 did not.Port 3 has the additional function of providing some extremely important signalssuch as interrupts, etc.
  • 14. IMPORTANT PINS VCC (Pin-40): Vcc provides supply voltage to the chip. The voltage source is +5V. GND (Pin-20): It is ground pin. RST (Pin-9): It is reset pin. Upon applying high pulse to this pin the micro controller will reset and terminate all activities. XTAL1 & XTAL2 (Pin-18,19): These 2 pins provide external clock using a quartz crystal oscillator Crystal inputs for internal oscillator. PSEN (Pin-29): Program Store Enable, the read signal for external program memory.
  • 15. IMPORTANT PINSALE (Pin-30): Address Latch Enable, to latch address outputsat Port0 and Port2, used for both data and address transmission.EA (Pin-31): External Access pin should be connected to Vcc inorder to fetch code from internal program memory and to fetchcode from external program memory EA is connected to Ground.Interrupts (Pin-12,13): An interrupt is an event that disturbs themicrocontroller to inform it that a device needs its service.Timers/Counters (Pin-14,15): They are used for countinginternal or external events.
  • 16. TIMER/COUNTERS IN 8051TI MER 8051 is of two types Timer T0 16-bit Timer T1 16-bitFeatures Both Timer T0 and T1 are 16 bits wide. When used as a timer the register is programmed to count internal clock pulses When used as a counter the register is programmed to count external clock pulses
  • 17. INTERRUPTInterrupt is an event that causes program to change its normal execution and branch up to specific subroutine putting normal program on hold. Whenever any device needs its service, the device notifies the microcontroller by sending it an interrupt signal. Upon receiving an interrupt signal, the microcontroller interrupts whatever it is doing and serves the device.
  • 18. ADDRESSING MODESDifferent addressing modes in 8051 microcontroller areIMMEDIATE ADDRESSINGREGISTER ADDRESSINGDIRECT ADDRESSINGREGISTER INDIRECT ADDRESSING
  • 19.