mrdauz@yahoo.com Politeknik Negeri Padang 092012 Decimal, Hexadecimal & Binary Number System Binary Hexadecimal Decimal 1 bit 0 - 1 0 - 1 0 1 2 bit 00 - 11 0 - 3 0 3 4 bit 0000 - 1111 0 F 0 15 8 bit 00000000 - 11111111 0 FF 0 255 9 bit 000000000 - 111111111 0 1FF 0 511 10 bit 0000000000 - 1111111111 0 3FF 0 1023 (1K) 11 bit 00000000000 - 11111111111 0 7FF 0 2047 (2K) 12 bit 000000000000 111111111111 0 FFF 0 4095 (4K) 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 History Mikroprosesor Intel 4004 Microprocessor The world first microprocessor Introduced in 1970 Number of transistor : 2,250 12 mm 2 Clock: 108 kHz 4-bit register and 4-bit data bus History Mikroprosesor Intel 8008 Introduced in 1972 Clock speed : 800 KHz Number of transistor : 3500 8-bit register and 8-bit data bus History Mikroprosesor Intel 8080 Introduced in 1974 Clock speed : 2 MHz Number of transistor : 4500 8-bit register and data bus History Mikroprosesor Intel 8085 Introduced in 1974 8-bit architecture Still used in some microcontroller applications History Mikroprosesor Intel 8086 Introduced in 1979 Number of transistor : 29,000 33 mm 2 Clock: 5 MHz 16 bit architecture
History Mikroprosesor Intel 8088 Introduced in 1981 Clock speed : 4,47 MHz Number of transistors : 29000 16-bit register and data bus The worlds first PC ran on an Intel 8088 History Mikroprosesor Intel 286 Introduced in 1982 Clock speed: 12 MHz Number of transistor : 134000 16-bit register and data bus History Mikroprosesor Intel 386 Introduced in 1985 Clock speed : 16 MHz Number of transistors : 275000 32-bit register and data bus History Mikroprosesor Intel 486 Introduced in 1989 Clock speed : 25 MHz Number of transistor : 1,200,000 32-bit register and data bus 1 st pipelined implementation of IA32 History Mikroprosesor Intel Pentium Introduced in 1993 Clock speed : 66 MHz Number of transistor : 3,300,000 32-bit register and data bus 1 st superscalar implementation of IA32 History Mikroprosesor Intel Pentium pro Introduced in 1995 Clock speed: 200 MHz Number of transistor : 5,500,000 32-bit register and data bus History Mikroprosesor Intel Pentium II Introduced in 1997 Clock speed : 300 MHz Number of transistor : 7,500,000 32-bit register and data bus History Mikroprosesor Intel Pentium III Introduced in 1999 Clock speed : 500 MHz Number of transistor : 9,500,000 32-bit register and data bus History Mikroprosesor Intel Pentium IV Introduced in 2000 Clock speed: 1 GHz Number of transistor : 15,500,000 64-bit register and data bus History Mikroprosesor Intel Pentium D Introduced in 2005 Clock speed : 3.6 GHz Number of transistor : 47,500,000 32-bit register and data bus History Mikroprosesor Intel Core 2 / Quad Introduced in 2006/2007 Clock speed: 3.6 GHz Number of transistor : 214,500,000 32-bit register and data bus 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 memory location to another. A microprocessor can make decisions and jump to a new set of instructions based on those decisions. This microprocessor has An address bus (that may be 8, 16 or 32 bits wide) that sends an address to memory
A data bus (that may be 8, 16 or 32 bits wide) that can send data to memory or receive data from memory
An RD (read) and WR (write) line to tell the memory whether it wants to set or get the addressed location
This microprocessor has A clock line that lets a clock pulse sequence the processor
A reset line that resets the program counter to zero (or whatever) and restarts execution
This microprocessor has Registers A, B and C are simply latches made out of flip-flops. The address latch is just like registers A, B and C. The program counter is a latch with the extra ability to increment by 1, and also reset to zero. The ALU could be as simple as an 8-bit adder, or it might be able to add, subtract, multiply and divide 8-bit values. This microprocessor has The test register is a special latch that can hold values from comparisons performed in the ALU. An ALU can normally compare two numbers and determine if they are equal, if one is greater than the other, etc. The test register can also normally hold a carry bit from the last stage of the adder. It stores these values in flip- flops and then the instruction decoder can use the values to make decisions. This microprocessor has There are six boxes marked "3- State" in the diagram. These are 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 to a wire, but only one of them to actually drive a 1 or a 0 onto the line. The instruction register and instruction decoder are responsible for controlling all of the other components.
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 data bus
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
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 and the clock line, as well as the bits from the instruction register.
MICROCOMPUTER BASIC ARCHITECTURE Microprocessor Memory Input/Output ADDRESS BUS DATA BUS CONTROL BUS VON NEUMANN MICROCOMPUTER ARCHITECTURE
Microprocessor Input/Output ADDRESS BUS DATA BUS CONTROL BUS Instruction/Pr ogram Memory (ROM) Data Memory (RAM) HARVARD MICROCOMPUTER ARCHITECTURE
Microprocessor Input/Output ADDRESS BUS DATA BUS CONTROL BUS Instruction/Pr ogram Memory (ROM) Data Memory (RAM) C T R L B U S A D D R E S S B U S D A T A
B U S
Microcomputer Unit Explanation Microprocessor/MPU/CPU : commonly controls the operation of all the microcomputers units such memory and I/O through the wire bus. Memory : (1)ROM/Read Only Memory/non-volatile memory stores the binary data of instructions/programs such BIOS/OS. (2)RAM/Random Access Memory/volatile memory stores temporary data such books database. I/O : allows the computer to take in data from the outside world or send data to the outside world. Peripherals such as keyboards, video display terminals, printers, and modems are connected to the I/O section.
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 to access the proper data.
BUS EXPLANATION Data Bus : When the CPU reads data from memory, it first outputs the address on the address bus, then the memory outputs the data onto the data bus; the CPU reads the data from data bus. When writing data onto the memory, the CPU outputs first the address on the address bus, then outputs the data onto the output bus; memory then reads and stores the data at the proper location. Control Bus : The CPU sends out signals on the control bus to enable the outputs of addressed memory devices or port devices. Typical control bus signals are Memory Read, Memory Write, I/O Read, and l/O Write.
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 Example of Microprocessor Chip Address bus : 16 bit wide, A0 A15. Data bus : 8 bit wide, D0 D7. Control bus : 2 bit, low active WR & RD signals with dot sign. Hence, P able to accommodate 65535 (64K) addresses and able to send a byte data Example of RAM chips Example of ROM chips MEMORY MAPPING Latar belakang : semua pin data chip RAM, ROM dan I/O terhubung paralel dalam satu bus data, begitu juga dengan pin address-nya yang terkoneksi paralel dalam satu bus address. Dalam kondisi seperti ini khusus lalu lintas data akan terjadi saling bertabrakan jika data tersebut tidak diatur mana yang terlebih dahulu berhak melewati bus. Tujuan : menghindari collision data yang melalui bus agar mikroprosesor mengetahui data tersebut berasal dari atau menuju ke chip RAM, ROM atau I/O Setiap chip peripheral yang terhubung ke mikroprosesor memiliki pin CS (Chip Select) yang berfungsi mengaktifkan chip tersebut. Jika CS aktif low maka logika low pada pin tersebut akan mengaktifkan chip itu sehingga dapat diakses oleh mikroprosesor. Address decoder adalah chip atau rangkaian yang akan menentukan CS chip mana yang akan aktif sesuai dengan memory map/address masing- masing. 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 chip peripheral. Buatlah address decoder-nya 1 st Case 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. 1 st Case Solutions
Case Example with these chips 1 st Case Urutan pemetaan memori : (1)ROM (2)RAM Desain rangkaian address decoder -nya(???) Solutions Bus Address mikroprosesor : 4 bit = 16 address. Bus data mikroprosesor : 8 bit. Jadi kemampuan mikroprosesor mengakomodasi data adalah 16 byte. 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 mikroprosesor sebanyak 16 byte. Terdapat 4 byte kosong. no Input output lokasi A3 A2 A1 A0 CS ROM CS RAM 0 0 0 0 0 0 1 R O M