Documentos de Académico
Documentos de Profesional
Documentos de Cultura
CPU on chip
Multipurpose, Programmable integrated device that has computing and decision making capability similar to that of CPU.
Intel 8008
8-bit micrprocessor Introduced on April 1, 1972 Clock rate 500 kHz (80081: 800 kHz) Bus Width 8 bits. Enhancement load PMOS logic Addressable memory 16 KB
Intel 8080 Introduced April 1, 1974 Clock rate 2 MHz Bus Width 8 bits data, 16 bits address Enhancement load NMOS logic Assembly language downwards compatible with 8008. Addressable memory 64 KB
Intel 8085
8-bit microprocessor Introduced March 1976 Clock rate 2 MHz Bus Width 8 bits data, 16 bits address Depletion load NMOS logic High level of integration, operating for the first time on a single 5 volt power supply, from 12 volts previously. Also featured serial I/O,3 maskable interrupts,1 Non-maskable interrupt,1 externally expandable interrupt [8259], status, DMA.
Intel 8086
Introduced in June 8, 1978 Clock rates:
4.77 MHz with 0.33 MIPS[3] 8 MHz with 0.66 MIPS 10 MHz with 0.75 MIPS
The memory is divided into odd and even banks. It accesses both the banks simultaneously in order to read 16 bit of data in one clock cycle. Bus Width 16 bits data, 20 bits address Addressable memory 1 megabyte
8085 INTRODUCTION
The features of INTEL 8085 are : It is an 8 bit processor. It is a single chip N-MOS device with 40 pins. It has multiplexed address and data bus.(AD0-AD7).
Interconnections between these units: Address Bus Data Bus Control Bus
address bus: the device and the location within the device that is being accessed data bus: the data value being communicated control bus: describes the action on the address and data buses
16 address lines are capable of addressing a total of 216 = 65,536 (64k) memory locations.
Address locations: 0000 (hex) FFFF (hex)
10
Control Bus
Consists of various lines carrying the control signals such as read / write enable, flag bits.
11
Accumulator
12
Conditional operations (IF / THEN) are executed based on the condition of these flag bits.
Contains the memory address (16 bits) of the instruction that will be executed in the next step.
13
Memory model
This microprocessor can access 64K ( = 65536 ) bytes of memory Each byte has 8 bits, therefore it can access 64K 8 bits of memory
64K of memory is the maximum limit, sometimes a system based on this CPU can have less memory
Use memory to map I/O Same instructions to use for accessing I/O devices and memory
16
Flag register
S Z X AC X P X CY
S: Z: Ac: CY: P:
Sign flag Zero flag Auxiliary carry flag Carry flag Parity flag
The sign flag, S, indicates the sign of a value calculated by an arithmetic or logical instruction. The zero flag, Z, is set to 1 if an arithmetic or logical operation produces a result of 0; otherwise set to 0. The parity flag, P, is set to 1 if the result of an arithmetic or logical operation has an even number of 1s; otherwise it is set to 0. The carry flag, CY, is set when an arithmetic operation generates a carry out. The auxiliary carry flag, AC, very similar to CY, but it denotes a carry from the lower half of the result to the upper half.
Programming Model
20
Microprocessor Architecture
The microprocessor can be programmed to perform functions on given data by writing specific instructions into its memory.
The microprocessor reads one instruction at a time, matches it with its instruction set, and performs the data manipulation specified. The result is either stored back into memory or displayed on an output device.
21
1. 2. 3. 4. 5.
The P operates with reference to clock signal. The rise and fall of the pulse of the clock gives one clock cycle. Each clock cycle is called a T state and a collection of several T states gives a machine cycle. Important machine cycles are : Op-code fetch. Memory read. Memory write. I/Op-read. I/O write.
Instruction set
No of bits in a given machine is fixed and combination of these bits is called instruction. p 8085 has 74 different instructions in its instruction set, that determines what functions the microprocessor can perform. Categories of instruction set are:
Data transfer(copy) operation Arithmetic operation Logical operation Branching operation Machine control operation
28
29
30
Examples: MOV MOV MVI B,A C,D D,47 47 4A 16 47 From ACC to REG Between two REGs Direct-write into REG D
36
38
39
Arithmetic Operations
40
Arithmetic Operations
41
Arithmetic Operations
42
Arithmetic Operations
43
44
Logic Operations
45
Logic Operations
46
Logic Operations
47
Branching Operations
Note:
This is an unconditional jump operation. It will always force the program counter to a fixed memory address continuous loop !
48
Branching Operations
Conditional jump operations are very useful for decision making during the execution of the program.
49
Branching Operations
Conditional Call Instructions. CC (Call if Carry flag is set) CNC (Call if Carry flag is reset) CZ (Call if zero flag set) CNZ (Call if zero flag is reset) CPE (Call if parity flag is set) CPO (Call if parity odd or P flag is reset ) CP (Call if sign flag reset ) CM (Call if sign flag is set or minus)
Example
Write a 8085 machine code program: Read two different memory locations Add the contents
Stop
53
Example
2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 LDA 2050 3A 50 20 47 3A 51 20 80 D2 YY XX 3E FF D3 02 76
Load contents of memory location 2050 into accumulator
MOV LDA
B,A 2051
Save the first number in B Load contents of memory location 2051 into accumulator
ADD JNC
B XXYY
MVI
A,FF
Direct write FF into accumulator Display accumulator contents at output port 02 Stop
OUT
HLT
02
54
Updated Code
2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 LDA 2050 3A 50 20 47 3A 51 20 80 D2 13 20 3E FF D3 02 76
Load contents of Memory location 2050 in to accumulator
MOV LDA
B,A 2051
Save the first number in B Load contents of Memory location 2051 in to accumulator
ADD JNC
B 2013
MVI
A,FF
Direct write FF int o accumulator Display accumulator contents at output port 02 Stop
OUT
HLT
02
55
Interrupt
The microprocessors operations are interrupted and the microprocessor executes what is called a service routine. This routine handles the interrupt, (perform the necessary operations). Then the microprocessor returns to its previous operations and continues.
56
Hold
The 8085 has a pin called HOLD. This pin is used by external devices to gain control of the busses. When the HOLD signal is activated by an external device, the 8085 stops executing instructions and stops using the busses. This would allow external devices to control the information on the busses. Example DMA.
57