Presentation is loading. Please wait.

Presentation is loading. Please wait.

Sistem Mikroprosesor 1. Blok Diagram Minimum System(CPU,ROM,RAM)

Similar presentations


Presentation on theme: "Sistem Mikroprosesor 1. Blok Diagram Minimum System(CPU,ROM,RAM)"— Presentation transcript:

1 Sistem Mikroprosesor 1. Blok Diagram Minimum System(CPU,ROM,RAM)
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Sistem Mikroprosesor 1. Blok Diagram Minimum System(CPU,ROM,RAM) 2. Sistem Bus(Address Bus, Control Bus, Data Bus) 3. Cara Kerja Minimum System

2 Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ putut
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Sistem Mikroprosesor Definition: A complete electronic system built around the microprocessor to support the microprocessor operation. Terdiri dari : CPU Memory I/O (disk drives, keyboard, mouse) system bus supporting circuitry CPU as the “brain” – controls actions of all components. 2

3 Microprocessor System - PC
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Microprocessor System - PC ROM Floppy RAM CPU CD-ROM Supporting Circuitry The PC microprocessor system contains the CPU, memory, drives, display and input/output devices to support the CPU operation. Keyboard Mouse HDD 3

4 Microprocessor System - Calculator
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Microprocessor System - Calculator Memory CPU Power Supply LCD Display The calculator microprocessor system contains the CPU, display and input/output devices to support the calculator operation. Even though the system is much simpler than PC, it is still defined as a microprocessor system since it still contains devices that assist the microprocessor in performing its tasks. Keypad 4

5 System Bus A µP-based system consists of many components:
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ System Bus A µP-based system consists of many components: CPU. Memory. I/O: disk drives, keyboard, mouse. System Bus. Supporting circuitry. All components communicate using System Bus. 5

6 System Bus Communication “highway” for all components. Contains:
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ System Bus Communication “highway” for all components. Contains: Data lines. Address lines. Control lines: regulate information transfer, interrupts, error signals. 6

7 Block Diagram Parallel I/O Serial I/O Interrupt Circuit System Bus
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Block Diagram Parallel I/O Serial I/O Interrupt Circuit System Bus All components in the microprocessor system communicate using the system bus. The CPU controls the interaction between components using the system bus. Timing CPU Memory 7

8 Minimum System/Mikrokomputer
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Minimum System/Mikrokomputer 1. CPU 2. Memory Unit 3. I/O Unit

9 Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ putut
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___

10 Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ putut
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Address Bus The size of the address bus determines the total number of memory addresses available in which programs can be executed by the microprocessor For example, a microprocessor with 32 address pins can generate 2^32 = 4,294,964,296 bytes [4 gigabytes(GB)] of different possible addresses (combinations of 1 ’ s and 0’s) on the address bus. The microprocessor includes addresses from 0 to 4,294,964,295 ( HEX through FFFFFFFFHEX).

11 The CPU “Master” of all components. Job: Get instructions from memory.
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ The CPU CPU “Master” of all components. Job: Get instructions from memory. Execute instructions. Perform calculations (may use math co-processor). Control bus operations. 11

12 The CPU CPU consists of: ALU (Arithmetic/Logic Unit) CU (Control Unit)
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ The CPU CPU consists of: ALU (Arithmetic/Logic Unit) Performs arithmetic/ logic computations. CU (Control Unit) Responsible to retrieve instructions, analyze, then execute. Registers Fast internal storage. Used to temporarily store addresses, data, processor status. 12

13 Memory Stores instructions and data for CPU.
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Memory Memory Stores instructions and data for CPU. Each memory location given unique address. CPU refers to address to access. Types: Read-Only Memory (ROM). Random-Access Memory (RAM). Non-Volatile Memory (NVM). 13

14 RAM, ROM and NVM ROM Stores start-up instructions and critical
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ RAM, ROM and NVM ROM Stores start-up instructions and critical system data and variables. Memory NVM RAM Stores general data and applications 14

15 Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ putut
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ ROM Read-Only Memory: Data can be read, but cannot be written (read-only). Contents stay without power (non-volatile). Usually contains basic start-up instructions, data. Contents hard-wired during manufacturing. Newer versions can be reprogrammed: PROM: Fuse & anti-fuse. EPROM: UV light. EEPROM: Electrical current. 15

16 ROM Examples EEPROM Programmer EPROM Quartz Window
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ ROM Examples EEPROM Programmer EPROM Quartz Window 16

17 NVM Non-Volatile Memory Contents can be read and written.
Contents stay without power (non-volatile). Advantages: Keeps memory even with no power. Data is protected against blackouts. Rewriteable. Disadvantages: Slower than RAM. 17

18 RAM Random Access Memory. Contents can be read and written.
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ RAM Random Access Memory. Contents can be read and written. Loses data without electrical power (volatile). Advantages: Programs can be loaded and reloaded. Larger capacity. Disadvantages: Requires power, refresh cycles. 18

19 RAM vs. ROM RAM is still empty because the computer
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ RAM vs. ROM RAM is still empty because the computer has just been started. Computer is turned on CPU looks for instructions from memory CPU loads instructions from ROM. 19

20 RAM vs. ROM RAM loads more advanced functions, such as the OS.
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ RAM vs. ROM RAM loads more advanced functions, such as the OS. ROM only has basic functions to start the computer. 20

21 Timing Circuit Synchronizes all components in the system.
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Timing Circuit Timing Synchronizes all components in the system. All components refer to the clock timing for operations. Generates square waves at constant intervals. Crystal oscillator + timing circuitry. Higher clock speed allow computers to function faster. 21

22 Crystal Oscillator Symbol Equivalent Circuit Sample
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Crystal Oscillator Symbol Equivalent Circuit Sample 22

23 Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ putut
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Clock Signal T 23

24 I/O Input/Output. Connects µP with external devices:
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ I/O Input/Output. Connects µP with external devices: Add functionality to µP. Interfaces with µP using ports. Examples: Keyboard. Mouse. Display monitor. 24

25 How do ports connect to system bus?
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ How do ports connect to system bus? Built into board Using card slots. 25

26 Serial I/O Sends/receives data sequentially across 2 channels.
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Serial I/O Serial I/O Sends/receives data sequentially across 2 channels. One for receive, one for transmit. Connects using serial ports. Advantages: Less crosstalk. Disadvantages: Slow. Needs special circuit to convert back to parallel (UART – Universal Asynchronous Receiver/Transmitter). 26

27 Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ putut
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Serial Port 27

28 Parallel I/O Sends/receives data across multiple lines at one time.
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Parallel I/O Parallel I/O Sends/receives data across multiple lines at one time. Connects using parallel ports. Advantages: Faster than serial. Simpler circuits – doesn’t need UART. Disadvantages: Crosstalk. 28

29 Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ putut
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Parallel Port 29

30 Parallel vs. Serial I/O Receive Transmit Serial Port Receive/Transmit
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Parallel vs. Serial I/O Receive Transmit Serial Port Receive/Transmit Receive/Transmit Receive/Transmit . Parallel Port 30

31 UART UART 1 From Device To System Bus 1001 1 UART 1 To Device 1001
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ UART UART 1 From Device To System Bus 1001 1 UART 1 To Device 1001 From System Bus 1 31

32 Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ putut
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Interrupt Circuit Interrupt Circuit Allows other components to “interrupt” normal CPU operation: Prioritize CPU tasks. Error detection mechanism. Accept inputs from devices – keystroke, mouse press. Depends on task importance: Important tasks given higher interrupts. Less important tasks queued. CPU keeps track of current interrupt level. 32

33 How Interrupts Work CPU Device CPU is performing 2. Device has more
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ How Interrupts Work CPU Device CPU is performing tasks normally. 2. Device has more important task that requires immediate attention. 3. Device requests interrupt from CPU. 4. CPU saves its current task so that it can return to it when the interrupt completes. 5. CPU services the interrupt. 6. CPU reloads saved task, and resumes normally. 33

34 Watchdog Monitor Watchdog monitor: May work in two ways:
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Watchdog Monitor Watchdog monitor: Special circuit - monitors the system for errors. Informs the CPU. CPU takes appropriate actions – re-execute instruction, reset system, halt processor. May work in two ways: Constantly monitor the system, and sends signal if error detected. Continuously sending signal to CPU after certain interval: If CPU receives signal, continues processing. If CPU doesn’t receive signal, something’s wrong. 34

35 How Watchdogs Work CPU Watchdog CPU is performing tasks normally.
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ How Watchdogs Work CPU Watchdog CPU is performing tasks normally. 1. Watchdog monitors bus for errors. 3. CPU saves its current task so that it can return to it when error is resolved. 2. If error detected, inform CPU. 4. CPU fixes the error. 5. CPU reloads saved task, and resumes normally. 5. If error is too serious, CPU may reset/halt system. 35

36 The 68000 is provided with two Vcc (+5 V) and two ground pins
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ The is provided with two Vcc (+5 V) and two ground pins Do-D15 are the 16 data bus pins. A1-A23 are the 23 address lines. A0 is obtained by encoding the … UDS (upper data strobe) LDS (lower data strobe) Source Chapter 7

37 Arsitektur Mikrokomputer
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Arsitektur Mikrokomputer

38 Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ putut
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ CPU Execution Cycle 38

39 Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ putut
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ CPU Execution Cycle CPU executes instructions in endless fetch, decode, execute cycles. It only knows how to do three things: Fetch instructions from somewhere. Analyze instruction, get more data if necessary. Execute instruction. Keeps track of instruction using Program Counter (PC): Tells CPU location of next instruction. 39

40 Fetch, Decode, Execute Reset Fetch Decode Execute
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Fetch, Decode, Execute Reset Fetch Decode Execute 40

41 Fetch – Step 1 CPU Memory CPU gets instruction address from PC $1000
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Fetch – Step 1 CPU Memory Control $1000 Instruction #1 $1001 Instruction #1 $1002 Instruction #2 Instruction Register $1003 Instruction #2 $1004 Empty Data Registers $1005 Empty CPU gets instruction address from PC $1006 Empty $1007 Data #1 $1008 Data #2 $1009 Data #3 Program Counter $1000 41

42 Fetch – Step 2 CPU Memory $1000
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Fetch – Step 2 CPU Memory Address Bus Control $1000 $1000 Instruction #1 $1001 Instruction #1 $1002 Instruction #2 Instruction Register $1003 Instruction #2 $1004 Empty Data Registers $1005 Empty CPU outputs instruction address through Address Bus $1006 Empty $1007 Data #1 $1008 Data #2 $1009 Data #3 Program Counter $1000 42

43 Fetch – Step 3 CPU Memory Instruction #1
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Fetch – Step 3 CPU Memory Data Bus Control Instruction #1 $1000 Instruction #1 $1001 Instruction #1 $1002 Instruction #2 Instruction Register $1003 Instruction #2 $1004 Empty Data Registers $1005 Empty Memory gets the instruction and sends in to CPU using Data Bus. $1006 Empty $1007 Data #1 $1008 Data #2 $1009 Data #3 Program Counter $1000 43

44 Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ putut
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Fetch – Step 4 CPU Memory Control $1000 Instruction #1 $1001 Instruction #1 $1002 Instruction #2 Instruction Register $1003 Instruction #2 Instruction #1 $1004 Empty Data Registers $1005 Empty CPU stores instruction in Instruction Register $1006 Empty $1007 Data #1 $1008 Data #2 $1009 Data #3 Program Counter $1000 44

45 Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ putut
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Fetch – Step 5 CPU Memory Control $1000 Instruction #1 $1001 Instruction #1 $1002 Instruction #2 Instruction Register $1003 Instruction #2 Instruction #1 $1004 Empty Data Registers $1005 Empty After instruction has been loaded, CPU updates Program Counter. $1006 Empty $1007 Data #1 $1008 Data #2 $1009 Data #3 Program Counter $1002 45

46 Decode – Step 1 CPU Memory
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Decode – Step 1 CPU Memory Control $1000 Instruction #1 $1001 Instruction #1 $1002 Instruction #2 Instruction Register $1003 Instruction #2 Instruction #1 $1004 Empty Data Registers $1005 Empty CPU analyzes instructions before executing it. $1006 Empty $1007 Data #1 $1008 Data #2 $1009 Data #3 Program Counter $1002 Type of instruction. Does the instruction require any data to perform calculations? Where are the data located? 46

47 Execute – Step 1 CPU Memory $1007
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Execute – Step 1 CPU Memory Address Bus Control $1007 $1000 Instruction #1 $1001 Instruction #1 $1002 Instruction #2 Instruction Register $1003 Instruction #2 Instruction #1 $1004 Empty Data Registers $1005 Empty If instruction requires data from memory, data address is placed on address bus. $1006 Empty $1007 Data #1 $1008 Data #2 $1009 Data #3 Program Counter $1002 47

48 Execute – Step 2 CPU Memory Data #1
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Execute – Step 2 CPU Memory Data Bus Control Data #1 $1000 Instruction #1 $1001 Instruction #1 $1002 Instruction #2 Instruction Register $1003 Instruction #2 Instruction #1 $1004 Empty Data Registers $1005 Empty Memory gets the instruction and sends in to CPU using Data Bus. $1006 Empty $1007 Data #1 $1008 Data #2 $1009 Data #3 Program Counter $1002 48

49 Execute – Step 3 CPU Memory
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Execute – Step 3 CPU Memory Control $1000 Instruction #1 $1001 Instruction #1 $1002 Instruction #2 Instruction Register $1003 Instruction #2 Instruction #1 $1004 Empty Data Registers $1005 Empty Data #1 CPU puts data inside internal data registers and execute instructions. $1006 Empty $1007 Data #1 $1008 Data #2 $1009 Data #3 Program Counter $1002 49

50 Execute – Step 4 CPU Memory $1005 Result #1
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Execute – Step 4 CPU Memory Address Bus Control $1005 $1000 Instruction #1 $1001 Instruction #1 $1002 Instruction #2 Instruction Register $1003 Instruction #2 Instruction #1 $1004 Empty Data Bus Result #1 Data Registers $1005 Empty Data #1 $1006 Empty Result #1 $1007 Data #1 $1008 Data #2 If instruction wants to write data to memory, CPU puts its data and address on the bus. $1009 Data #3 Program Counter $1002 50

51 Execute – Step 5 CPU Memory
Slide 2 Mikroprosesor Sub. Sistem Mikroprosesor, Sistem Bus___ Execute – Step 5 CPU Memory Control $1000 Instruction #1 $1001 Instruction #1 $1002 Instruction #2 Instruction Register $1003 Instruction #2 Instruction #1 $1004 Empty Data Registers $1005 Result #1 Data #1 $1006 Empty Result #1 $1007 Data #1 Memory receives instructions and puts data in the location. $1008 Data #2 $1009 Data #3 Program Counter $1002 51


Download ppt "Sistem Mikroprosesor 1. Blok Diagram Minimum System(CPU,ROM,RAM)"

Similar presentations


Ads by Google