Presentation on theme: "Parul Polytechnic Institute"— Presentation transcript:
1Parul Polytechnic Institute Subject Code :Name Of Subject : Microprocessor and assembly language programmingName of Unit : Introduction to microprocessorTopic : MICROPROCESSOR AND INTERFACINGName of Faculty : H.M.Avaiya & N.D.DhameliyaName of Students: (i) BARIYA KARANKUMAR J(072)(ii) MODI JHINAL T(074)1
2MICROPROCESSOR AND INTERFACING AUTHORS :RAMESH.S.GAONKARBADRI RAMDOUGLAS.V.HALLLIU AND GIBSON
3Syllabus of Microprocessor Introduction to microprocessorArchitecture and block diagram of microprocessor8085 microprocesso8237 DMA Controller8255 Programmable peripheral interface device8254 programmable interval timer8259 programmable inttrupt controller8086 microprocessor
4What is Microprocessor? A silicon chip that contains a CPU. In the world of personal computers, the terms microprocessor and CPU are used interchangeably. At the heart of all personal computers and most workstations sits a microprocessor. Microprocessors also control the logic of almost all digital devices, from clock radios to fuel-injection systems for automobiles
5Microprocessor def.. Con.. Microprocessor is a programmable deviceIt can be instructed to perform given tasks with in its capability.The programmer selects instruction from the list and determines the sequence of execution for a given task.It takes input from the input device and process the input as it behaves like a CPU and gives the output.
6Microprocessor def.. Con.. Microprocessor is a clock driven semiconductor device consisting of electronic logic circuits manufactured by using a LSI or VLSI technique.Microprocessor can be divided into three segments1)ALU2)Register array3)Control unit
7Block diagram of microprocessor AsCPUOUTPUTINPUTMEMORY
8Characterstics which differentiate microprocessors Instruction set: The set of instructions that the microprocessor can execute.bandwidth : The number of bits processed in a single instruction.clock speed : Given in megahertz (MHz), the clock speed determines how many instructions per second the processor can execute.
9Structure of microprocessor Chip containing no. of elements for the processing purposes.
10History of microprocessor Intel's 4004 is considered the first microprocesor .The 4004 was later followed in 1972 by the 8008, the world's first 8-bit microprocessor.
11History of microprocessor…… then is the 8080 microprocessor evolved in 1974.Then comes 8085 that is the 8 bit microprocessor
12Continued…Often the processor is required to manage various different tasks that have to be scheduled somehow and must also deal with outside interrupt sources such as an alarm when something goes wrong.Real-time systems are those in which timeliness is as important as the correctness of the outputs, although this does NOT mean that they have to be ?fast systems?.A real-time system does not have to process data in microseconds to be considered real-time - it must simply have response times that are constrained and thus predictable.
13Real life applications of microprocessor Microprocessors are used to handle a set of tasks that control one or more external events or systems.Microprocessors are typically used in either reactive or embedded systems.Reactive systems are those that have an ongoing interaction with their environment - for example, a fire-control system that constantly reacts to buttons pressed by a pilot.Embedded systems are those used to control specialized hardware in which the computer system is installed - for example, the microprocessor system used to control the fuel/air mixture in the carburetor of many automobiles. In embedded systems the software system is completely encapsulated by the hardware that it controls.
14Some questions What is SSI,MSI and LSI? What is difference between microprocessor, microcontroller and microcomputer?What is a bit, byte, nibble and a word?What is difference between compiler and interpreter?What is instruction and mnemonic?
158085 programming model Program counter Stack pointer General purpose registersAccumulatorFlag registersData and address buses
168085 instruction set Data transfer operations Arithmetic operations Logical operationsBranch operationsMachine control operations
17Data transfer operations MOV Rd,RsMVI R,8 bitHLTIN bit port address accept the data from the input port specified in the second byte and loads into the accumulator.NOPOUT 8 bit port address copies the contents of the accumulator to the output port specified in the second byte,2 byte instruction
18Data transfer operations This group of instructions copies data from a location called a source to another a location called destination without modifying the contents of the source.Data transfer can be between 1)registersSpecified data byte to a register or memory locationBetween a memory location and a register
21Arthimetic operations ADD RADI 8 bitSUB RSUI 8 bitINR RDCR R
22Branch operationsJMP 16 bit 2nd(low) and 3rd(high) byte specifies 16 bitMemory addressJCJNCJZJNZJPJM
23Microprocessor architecture The process of data manipulation and communication is determined by the logic design of the microprocessor called the arcitecture.
24Microprocessor architecture Microprocessor initiated operationsInternal operationsExternally initiated operationsTo perform these functions microprocessor requires a group of logic circuits and set of signals called control signals.
298085 pin diagramIs 8 bit microprocessor, capable of addressing 64k of memoryHas 40 pins ,operate with 3mhz single phase clockRequire +5v of single power supply
30Pin diagram conti…. All the signals are classified into 6 groups Address busData busControl and status signalsPower supply and frequency signalsExternally initiated signalsSerial input output ports
31Block diagram of 8085 microprocessor It includesArithmetic and logic unitTiming and control unitInstruction register and decoderRegister arrayInterrupt controlSerial input output control
328085 interrupt What is interrupt? Vectored interrupt Non vectored interruptEnable and disable interrupt instructionsPending interrupts
338085 interruptInterrupt is a process where an external device can get the attention of the microprocessor.The process starts from the I/O deviceThe process is asynchronous.Classification of InterruptsInterrupts can be classified into two types:Maskable Interrupts (Can be delayed or Rejected)Non-Maskable Interrupts (Can not be delayed or Rejected)Interrupts can also be classified into:Vectored (the address of the service routine is hard-wired)Non-vectored (the address of the service routine needs to be supplied externally by the device)
34InterruptsAn interrupt is considered to be an emergency signal that may be serviced.The Microprocessor may respond to it as soon as possible.What happens when MP is interrupted ?When the Microprocessor receives an interrupt signal, it suspends the currently executing program and jumps to an Interrupt Service Routine (ISR) to respond to the incoming interrupt.Each interrupt will most probably have its own ISR.
35InterruptsWhen a device interrupts, it actually wants the MP to give a service which is equivalent to asking the MP to call a subroutine. This subroutine is called ISR (Interrupt Service Routine)The ‘EI’ instruction is a one byte instruction and is used to Enable the non-maskable interrupts.The ‘DI’ instruction is a one byte instruction and is used to Disable the non-maskable interrupts.The 8085 has a single Non-Maskable interrupt.The non-maskable interrupt is not affected by the value of the Interrupt Enable flip flop.
38Interrupt Vectors and the Vector Table An interrupt vector is a pointer to where the ISR is stored in memory.All interrupts (vectored or otherwise) are mapped onto a memory area called the Interrupt Vector Table (IVT).The IVT is usually located in memory page 00 (0000H - 00FFH).The purpose of the IVT is to hold the vectors that redirect the microprocessor to the right place when an interrupt arrives.
43For port C Mode0 Mode 1 Mode2 Control WordD7 D6 D5 D4 D3 D2 D1 D00/1BSR Mode I/O ModeFor port C Mode0 Mode 1 Mode2No effect on mode Simple I/O Handshake I/Ofor ports for ports A and or BA,B,CPort C bits
508086 effective address computations To provide flexible base addressing and indexing a data address may be formed by addressing together a combination of the BX or BP register contents SI or DI contents and a displacement.The result of such and address computation is called effective address.
518086 memory segmentationAddress within segmentsOverlapping segments
52Program relocation using CS register If a programmer wants to relocate the program by any means ,he can relocate the program using cs register.