Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

download Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

of 46

Transcript of Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    1/46

    Pengenalan Mikroprosesor

    Firdaus, ST., MT.

    [email protected] Negeri Padang 092012

    mailto:[email protected]:[email protected]
  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    2/46

    Decimal, Hexadecimal & Binary

    Number SystemBinary Hexadecimal Decimal

    1 bit 0 - 1 0 - 1 01

    2 bit 00 - 11 0 - 3 03

    4 bit 0000 - 1111 0F 015

    8 bit 00000000 - 11111111 0FF 0255

    9 bit 000000000 - 111111111 01FF 0511

    10 bit 0000000000 - 1111111111 03FF 01023 (1K)

    11 bit 00000000000 - 11111111111 07FF 02047 (2K)

    12 bit 000000000000111111111111 0FFF 04095 (4K)

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    3/46

    Processor, Computer, Controller?

    Mikroprosesor : Central Processing Unit (CPU)

    yang dikemas dalam satu chip. Ex. Intel 8088

    Mikrokomputer : penggabungan mikroprosesor

    dengan peripheral seperti chip I/O, memori,

    Programmable Interrupt Timer, Programmable

    Interval Counter dan chip pendukung lainnya.

    Mikrokontroler (Single Chip Microcomputer):mikrokomputer yang dikemas dalam satu chip.

    Ex. Intel 8051

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    4/46

    History MikroprosesorIntel 4004

    Microprocessor

    The world first

    microprocessor

    Introduced in 1970

    Number of transistor :2,250

    12 mm2

    Clock: 108 kHz

    4-bit register and 4-bit

    data bus

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    5/46

    History MikroprosesorIntel 8008

    Introduced in 1972

    Clock speed : 800 KHz

    Number of transistor :

    3500

    8-bit register and 8-bit

    data bus

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    6/46

    History MikroprosesorIntel 8080

    Introduced in 1974

    Clock speed : 2 MHz

    Number of transistor :

    4500

    8-bit register and data

    bus

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    7/46

    History MikroprosesorIntel 8085

    Introduced in 1974

    8-bit architecture

    Still used in some

    microcontrollerapplications

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    8/46

    History MikroprosesorIntel 8086

    Introduced in 1979

    Number of transistor :

    29,000

    33 mm2

    Clock: 5 MHz

    16 bit architecture

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    9/46

    History MikroprosesorIntel 8088

    Introduced in 1981

    Clock speed : 4,47 MHz

    Number of transistors :

    29000

    16-bit register and data

    bus

    The worlds first PC ranon an Intel 8088

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    10/46

    History MikroprosesorIntel 286

    Introduced in 1982

    Clock speed: 12 MHz

    Number of transistor :

    134000

    16-bit register and data

    bus

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    11/46

    History MikroprosesorIntel 386

    Introduced in 1985

    Clock speed : 16 MHz

    Number of transistors :

    275000

    32-bit register and data

    bus

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    12/46

    History MikroprosesorIntel 486

    Introduced in 1989

    Clock speed : 25 MHz

    Number of transistor :

    1,200,000

    32-bit register and data

    bus

    1

    st

    pipelinedimplementation of IA32

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    13/46

    History MikroprosesorIntel

    Pentium

    Introduced in 1993

    Clock speed : 66 MHz

    Number of transistor :

    3,300,000

    32-bit register and data

    bus

    1st

    superscalarimplementation of IA32

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    14/46

    History MikroprosesorIntel

    Pentium pro

    Introduced in 1995

    Clock speed: 200 MHz

    Number of transistor :

    5,500,000

    32-bit register and data

    bus

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    15/46

    History MikroprosesorIntel Pentium

    II

    Introduced in 1997

    Clock speed : 300 MHz

    Number of transistor :

    7,500,000

    32-bit register and data

    bus

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    16/46

    History MikroprosesorIntel Pentium

    III

    Introduced in 1999

    Clock speed : 500 MHz

    Number of transistor :

    9,500,000

    32-bit register and data

    bus

    http://www.cpu-world.com/CPUs/Pentium-III/L_Intel-600EB-256-133-1.65V%20(FC-PGA).jpg
  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    17/46

    History MikroprosesorIntel Pentium

    IV

    Introduced in 2000

    Clock speed: 1 GHz

    Number of transistor :

    15,500,000

    64-bit register and data

    bus

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    18/46

    History MikroprosesorIntel Pentium

    D

    Introduced in 2005

    Clock speed : 3.6 GHz

    Number of transistor :

    47,500,000

    32-bit register and data

    bus

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    19/46

    History MikroprosesorIntel Core 2 /

    Quad

    Introduced in

    2006/2007

    Clock speed: 3.6 GHz

    Number of transistor :214,500,000

    32-bit register and data

    bus

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    20/46

    Microprocessor Logic

    A microprocessor executes a collection of machine instructions that

    tell the processor what to do. Based on the instructions, a

    microprocessor does three basic things:

    Using its ALU (Arithmetic/Logic Unit), a microprocessor can perform

    mathematical operations like addition, subtraction, multiplication

    and division. Modern microprocessors contain complete floating

    point processors that can perform extremely sophisticated

    operations on large floating point numbers.

    A microprocessor can move data from one memorylocation toanother.

    A microprocessor can make decisions and jump to a new set of

    instructions based on those decisions.

    http://www.howstuffworks.com/computer-memory.htmhttp://www.howstuffworks.com/computer-memory.htm
  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    21/46

    This microprocessor has

    An address bus(that may be 8,16 or 32 bits wide) that sendsan address to memory

    A data bus (that may be 8, 16or 32 bits wide) that can senddata to memory or receive datafrom memory

    An RD (read) and WR (write)line to tell the memorywhether it wants to set or getthe addressed location

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    22/46

    This microprocessor has

    A clock line that letsa clock pulsesequence theprocessor

    A reset line thatresets the program

    counter to zero (orwhatever) andrestarts execution

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    23/46

    This microprocessor has

    Registers A, B and C aresimply latches made out offlip-flops.

    The address latch is just like

    registers A, B and C. The program counter is a

    latch with the extra abilityto increment by 1, and alsoreset to zero.

    The ALU could be as simpleas an 8-bit adder, or it mightbe able to add, subtract,multiply and divide 8-bitvalues.

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    24/46

    This microprocessor has

    The test register is a speciallatch that can hold values fromcomparisons performed in theALU.

    An ALU can normally comparetwo numbers and determine if

    they are equal, if one isgreater than the other, etc.

    The test register can alsonormally hold a carry bit fromthe last stage of the adder.

    It stores these values in flip-

    flops and then the instructiondecoder can use the values tomake decisions.

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    25/46

    This microprocessor has

    There are six boxes marked "3-State" in the diagram. Theseare tri-state buffers.

    A tri-state buffer can pass a 1,a 0 or it can essentially

    disconnect its output. A tri-state buffer allows

    multiple outputs to connect toa wire, but only one of themto actually drive a 1 or a 0onto the line.

    The instruction register andinstruction decoder areresponsible for controlling allof the other components.

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    26/46

    Control lines from the instruction

    decoder Tell the A register to latch the value currently on the data bus

    Tell the B register to latch the value currently on the data bus

    Tell the C register to latch the value currently output by the ALU

    Tell the program counter register to latch the value currently on the databus

    Tell the address register to latch the value currently on the data bus

    Tell the instruction register to latch the value currently on the data bus

    Tell the program counter to increment

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    27/46

    Control lines from the instruction

    decoder Tell the program counter to reset to zero

    Activate any of the six tri-state buffers (six separate lines)

    Tell the ALU what operation to perform

    Tell the test register to latch the ALU's test bits

    Activate the RD line

    Activate the WR line

    Coming into the instruction decoder are the bits from the test register andthe clock line, as well as the bits from the instruction register.

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    28/46

    MICROCOMPUTER BASIC

    ARCHITECTURE

    Microprocessor Memory Input/Output

    ADDRESS BUS

    DATA BUS

    CONTROL BUS

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    29/46

    VON NEUMANN MICROCOMPUTER

    ARCHITECTURE

    Microprocessor Input/Output

    ADDRESS BUS

    DATA BUS

    CONTROL BUS

    Instruction/Pr

    ogram

    Memory

    (ROM)

    Data Memory

    (RAM)

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    30/46

    HARVARD MICROCOMPUTER

    ARCHITECTURE

    Microprocessor Input/Output

    ADDRESS BUS

    DATA BUS

    CONTROL BUS

    Instruction/Pr

    ogram

    Memory

    (ROM)

    Data Memory

    (RAM)

    CTRLBUS

    ADDRESSBUS

    DATA

    BUS

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    31/46

    Microcomputer Unit Explanation

    Microprocessor/MPU/CPU : commonly controls theoperation of all the microcomputers units such memoryand I/O through the wire bus.

    Memory : (1)ROM/Read Only Memory/non-volatilememory stores the binary data of instructions/programssuch BIOS/OS. (2)RAM/Random Access Memory/volatilememory stores temporary data such books database.

    I/O : allows the computer to take in data from the outsideworld or send data to the outside world. Peripherals suchas keyboards, video display terminals, printers, andmodems are connected to the I/O section.

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    32/46

    BUS EXPLANATION

    BUS : a set of wires, that interconnects all the

    components (subsystems) of a computer. A

    wire accommodates one bit.

    Address Bus : CPU reads/writes data from/to

    the memory by addressing a specific location;

    outputs the location of the data on the

    address bus; memory uses the address toaccess the proper data.

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    33/46

    BUS EXPLANATION

    Data Bus : When the CPU reads data from memory, itfirst outputs the address on the address bus, then thememory outputs the data onto the data bus; the CPUreads the data from data bus. When writing data ontothe memory, the CPU outputs first the address on theaddress bus, then outputs the data onto the outputbus; memory then reads and stores the data at theproper location.

    Control Bus : The CPU sends out signals on the control

    bus to enable the outputs of addressed memorydevices or port devices. Typical control bus signals areMemory Read, Memory Write, I/O Read, and l/O Write.

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    34/46

    Kapasitas Memori

    Address Data

    11 1010

    10 0001

    01 0100

    00 0001

    Address Data

    11 10101010

    10 11110000

    01 00010010

    00 10100011

    Lebar Bus Address = 2 bit

    Lebar Bus Data = 4 bit

    maka,

    Kapasitas memori = 4 Nibble

    Lebar Bus Address = 2 bit

    Lebar Bus Data = 8 bit

    maka,

    Kapasitas memori = 4 Byte

    Note:

    4 bit = nibble

    8 bit = byte

    16 bit = word

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    35/46

    Example of Microprocessor Chip

    Address bus : 16 bit wide,A0A15.

    Data bus : 8 bit wide, D0D7.

    Control bus : 2 bit, lowactive WR & RD signalswith dot sign.

    Hence, P able to

    accommodate 65535(64K) addresses and ableto send a byte data

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    36/46

    Example of RAM chips

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    37/46

    Example of ROM chips

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    38/46

    MEMORY MAPPING

    Latar belakang : semua pin data chip RAM, ROM dan I/O terhubung paraleldalam satu bus data, begitu juga dengan pin address-nya yang terkoneksiparalel dalam satu bus address. Dalam kondisi seperti ini khusus lalu lintasdata akan terjadi saling bertabrakan jika data tersebut tidak diatur manayang terlebih dahulu berhak melewati bus.

    Tujuan : menghindari collision data yang melalui bus agar mikroprosesor

    mengetahui data tersebut berasal dari atau menuju ke chip RAM, ROMatau I/O

    Setiap chip peripheral yang terhubung ke mikroprosesor memiliki pin CS(Chip Select) yang berfungsi mengaktifkan chip tersebut. Jika CS aktif lowmaka logika low pada pin tersebut akan mengaktifkan chip itu sehinggadapat diakses oleh mikroprosesor.

    Address decoder adalah chip atau rangkaian yang akan menentukan CSchip mana yang akan aktif sesuai dengan memory map/address masing-masing.

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    39/46

    PROSEDUR MEMORY MAPPING

    Lihat data berapa kapasitas maksimal address mikroprosesor,apakah 64 KB atau 1 MB dll.

    Lihat data berapa kapasitas maksimal address chip peripheral (RAM,ROM, I/O) yang digunakan, apakah 16 KB atau 32 KB dll.

    Bagilah kapasitas address mikroprosesor sebesar kapasitas

    maksimal chip peripheral yang terkecil. Tentukan posisi chip peripheral sesuai urutan yang diinginkan.

    Buatlah truth table untuk address (input) dan chip select (output).

    Tentukan kelompok bit address yang membedakan lokasi chipperipheral.

    Buatlah address decoder-nya

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    40/46

    1stCase

    64 KB addresses Microprocessor uses a 32 KB

    ROM and a 32 KB RAM. Map the location of

    those chips with ROM in the first place.

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    41/46

    1stCase Solutions

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    42/46

    Case Example with these chips

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    43/46

    1stCase

    Urutan pemetaan memori : (1)ROM (2)RAM

    Desain rangkaian address decoder -nya(???)

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    44/46

    Solutions

    Bus Address mikroprosesor : 4 bit = 16 address. Bus data mikroprosesor : 8 bit.

    Jadi kemampuan mikroprosesor mengakomodasi data adalah 16byte.

    Bus address RAM : 2 bit = 4 address

    Bus data RAM : 8 bit. Jadi RAM dapat menyimpan data sebanyak 4 byte.

    Bus address ROM : 3 bit = 8 address

    Bus data ROM : 8 bit.

    Jadi ROM dapat menyimpan data sebanyak 8 byte.

    Jumlah total chip penyimpan maksimum ROM dan RAM adalah 8+4= 12 byte dan masih berada di bawah kemampuan mikroprosesorsebanyak 16 byte.

    Terdapat 4 byte kosong.

    Input output

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    45/46

    noInput output

    lokasiA3 A2 A1 A0 CS ROM CS RAM

    0 0 0 0 0 0 1

    ROM

    1 0 0 0 1 0 1

    2 0 0 1 0 0 1

    3 0 0 1 1 0 1

    4 0 1 0 0 0 1

    5 0 1 0 1 0 1

    6 0 1 1 0 0 17 0 1 1 1 0 1

    8 1 0 0 0 1 0RAM

    9 1 0 0 1 1 0

    10 1 0 1 0 1 0

    11 1 0 1 1 1 0

    12 1 1 0 0 1 1

    13 1 1 0 1 1 1

    14 1 1 1 0 1 1

    15 1 1 1 1 1 1

  • 8/12/2019 Mikroprosesor & Interface - Pengenalan Sistem Mikroprosesor.pptx

    46/46

    References (files)

    CT213_ComputerOrganization Programming and Customizing The AVR Microcontroller

    Intel Microprocessor History

    Microprocessor

    Microprocessor Systems Atmel AVR Microcontroller Primer-Programming and

    Interfacing

    Pemrograman Mikrokontroler AVR

    Microcontroller

    330_01

    Lecture_1_2