Top Banner

of 45

Microcontroller Hardware

Oct 11, 2015

Download

Documents

dineshlathia

micro controller ppt
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • System

    A system is a way working, organizing or doing one or many tasks according to a fixed plan, program, or set of rules. A system is also an arrangement in which all its units assemble and work together according to the plan or program.

  • Embedded SystemA computer is a system that has the following or more components.1. A microprocessor2. A large memory comprising the following two kinds :(a) Primary memory (semiconductor memories RAM, ROM and fast accessible caches)(b) Secondary memory (magnetic memory located in hard disks, diskettes and carriage tapes and optical memory in CD-ROM)3. Input units like keyboard, mouse, digitizer, scanner etc.4. Output units like video monitor, printer etc.5. Networking units like Ethernet card, front-end processor-based drivers. etc.6. I/O units like a modem, fax cum modem, etc.

  • Embedded system means the processor is embedded into that application.An embedded product uses a microprocessor or microcontroller to do one task only.In an embedded system, there is only one application software that is typically burned into ROM/EPROM.Exampleprinter, keyboard, video game player, toys etc.An embedded system is one that has computer hardware with software embedded in it as one of its most important component.

  • The components of an Embedded System hardware

  • Classification of Embedded System

    Small Scale Embedded System

    Medium Scale Embedded Systems

    Sophisticated Embedded System

  • PROCESSOR IN THE SYSTEM

    An embedded system processor chip or core can be one of the following

    .Microprocessor.

    Microcontroller.

    Digital Signal Processor (DSP).

  • Important Microprocessors used in the Embedded Systems

    StreamMicroprocessor FamilySourceCISC or RISC or Both FeaturesStream 1Stream 2Stream 3Stream 468HCxxx80x86i860SPARCPowerPC 601,604MPC 620MotorolaIntelIntelSunIBMMotorolaCISCCISCCISC with RISCRISCRISC

  • Important Microcontrollers used in the Embedded Systems

    Sr.No.Microcontroller FamilySourceCISC or RISC or Both Features1

    2

    3

    4

    568HC11xx, C12xx,HC16xx

    8051, 80251

    80x86

    PIC 16F84 or 16C76, 16F876 and PIC18

    Enhancements of ARM9, ARM7Motorola

    Intel

    Intel

    Microchip

    ARM, Texas, etcCISC

    CISC

    CISC

    CISC

    CISC with RISC Core

  • Important Digital Signal Processor Used in the Embedded Systems

    StreamDSP FamilySourceStream 1Stream 2Stream 3TMS32OCxxSHARC5600xxTexasAnalog DeviceMotorola

  • CPUGeneral-Purpose Micro-processorRAMROMI/O PortTimerSerial COM PortData BusAddress BusGeneral-Purpose Microprocessor SystemMicroprocessors:CPU for ComputersNo RAM, ROM, I/O on CPU chip itselfExampleIntels x86, Motorolas 680x0Many chips on mothers boardGeneral-purpose microprocessor

  • What is Microcontroller?

    A device which integrates a number of components of a microprocessor system onto a single chip. Only clocking and power are need to be supplied.

    Microcontroller combines various peripherals on the same chip. Some of them are:CPUI/OMemory ( PROM / EPROM / EEPROM ) RAMTimerSerial I/OADCInterrupt capabilityBus /external memory interfaces.

  • RAM ROMI/O PortTimerSerial COM PortMicrocontrollerCPUA smaller computerOn-chip RAM, ROM, I/O ports...ExampleMotorolas 6811, Intels 8051, and PIC 16XA single chipMicrocontroller :

  • Block DiagramCPUOn-chip RAMOn-chip ROM for program code4 I/O PortsTimer 0Serial PortOSCInterrupt ControlExternal interruptsTimer 1Timer/CounterBus ControlTxD RxDP0 P1 P2 P3Address/DataCounter Inputs

  • Where Are Microcontrollers Used?Hand held instrument DVD, TV, VCRComputers- PCTest and MeasurementCellphones, communication equipmentAutomobilesHousehold appliancesAstronauts space suitsConsumer items

    And many more.

  • Features of Intels 8051 Family Microcontrollers:-8 bit CPU.It requires single 5V supply.on chip oscillator and clock circuitry.32 bidirectional I/O lines ( Four 8 bits I/O ports).It provides on chip 4 KB of program memory.It provides on chip 128B of Data memory.64 Kbytes address space for external data memory.64 Kbytes address space for program memory.Two multiple mode 16 bit timer / countersFive source interrupt structure.It provides multiple mode high speed programmable Full duplex serial port.

  • Members of Family (Comparison):-

    ROM/ EPROMInternal RAMPortsTimersInterruptsSerial CommExternal Prog. MemoryExternal Data Memory80310 (ROMLESS)128 bytes42,16 BIT5UART64 K64 K80514K ROM (MASKED)128 bytes42,16 BIT5UART60 K64 K87514 KEPROM128 bytes42,16 BIT5UART60 K64 K80320 (ROM LESS)256 bytes43,16 BIT6UART64 K64 K80528K ROM (MASKED)256 bytes43,16 BIT6UART56 K64 K87528 K EPROM256 bytes43,16 BIT6UART56 K64 K

  • Microprocessor CPU is stand-alone, RAM, ROM, I/O, timer are to be interfaceddesigner can decide on the amount of ROM, RAM and I/O ports.expansiveversatility general-purpose

    MicrocontrollerCPU, RAM, ROM, I/O and timer are all on a single chipfix amount of on-chip ROM, RAM, I/O portsfor applications in which cost, power and space are criticalsingle-purposeMicroprocessor vs. Microcontroller

  • Processor Architectures:Harvard Architectureseparate memory blocks , which can be accessed simultaneously:i) Program Memoryii) Data Memory

    2. VON Neumann

  • Block diagram

  • Pins of 8051Vccpin 40Vcc provides supply voltage to the chip. The voltage source is +5V.GNDpin 20groundXTAL1 and XTAL2pins 19,18

  • Pins of 8051

    RSTpin 9resetIt is an input pin and is active highnormally low.The high pulse must be high at least 2 machine cycles.It is a power-on reset.Upon applying a high pulse to RST, the microcontroller will reset and all values in registers will be lost.Reset values of some 8051 registers

  • Figure (b). Power-On RESET Circuit30 pF30 pF8.2 K10 uF+Vcc11.0592 MHzEA/VPPX1X2RST3119189

  • RESET Value of Some 8051 Registers:0000DPTR0007SP0000PSW0000B0000ACC0000PCReset ValueRegisterRAM are all zero.

  • Pins of 8051/EApin 31external accessThere is no on-chip ROM in 8031 and 8032 .The /EA pin is connected to GND to indicate the code is stored externally./PSEN ALE are used for external ROM.For 8051, /EA pin is connected to Vcc./ means active low./PSENpin 29program store enableThis is an output pin and is connected to the OE pin of the ROM.

  • Pins of 8051ALEpin 30address latch enableIt is an output pin and is active high.8051 port 0 provides both address and data.The ALE pin is used for de-multiplexing the address and data by connecting to the G pin of the 74LS373 latch.I/O port pinsThe four ports P0, P1, P2, and P3.Each port uses 8 pins.All I/O pins are bi-directional.

  • Port structure and operation

  • General characteristics of ports

  • Pins of I/O PortThe 8051 has four I/O portsPort 0 pins 32-39P0P0.0P0.7Port 1pins 1-8 P1P1.0P1.7Port 2pins 21-28P2P2.0P2.7Port 3pins 10-17P3P3.0P3.7Each port has 8 pins.Named P0.X X=0,1,...,7, P1.X, P2.X, P3.XExP0.0 is the bit 0LSBof P0 ExP0.7 is the bit 7MSBof P0These 8 bits form a byte.Each port can be used as input or output (bi-direction).

  • P1, P2, and P3 have internal pull-up resisters.P1, P2, and P3 are not open drain.P0 has no internal pull-up resistors and does not connects to Vcc inside the 8051.P0 is open drain.However, for a programmer, it is the same to program P0, P1, P2 and P3.All the ports upon RESET are configured as output.Various SFRs and port latches can program the input/output function.

    Cont..

  • Port 0 with Pull-Up Resistors

  • Port 3 Alternate Functions

  • Memory Map :-

    PROGRAM MEMORY PSEN is connected to external program memory as a RD signal

    mov instructionFor Internal data transfer which refer to 8 bit address of internal memorymovx instructions For External data transfer which refer to 16/8 bit external memory

  • Memory mapping in 8051

    ROM memory map in 8051 family4kDS5000-328k32kfrom Atmel Corporationfrom Dallas Semiconductor

  • RAM memory (Data Memory) space allocation in the 8051

  • Internal Data Memory :

  • The Working Registers:

  • Bit Addressable RAM

  • General Purpose RAM

  • Special Function Register

  • Oscillator and clock Circuit

  • CPU Timing:

  • CPU Timing case:

  • References:

    1. THE 8051 MICROCONTROLLER Architecture Programming & Applications (Second Edition)by Kenneth J. Ayala,Penyam International

    2.The 8085 Microcontroller and Embedded System by Muhammad Ali Mazidi, Pearson Ed

    3. Programming & Customizing the 8085 Microcontoller by Myke Predko, TMH Edition 1999.

    4.Embedded Microprocessor System : Real world Design by Stuart R Ball, 3rd Ed, Newness publication

    5. Data Sheets

    Program is to read data from P0 and then send data to P1