2ProcessorIt is a device that perform an operation on data based on some pre-defined instructions for example AdditionIn starting the CPU were made on different boards and connected together, as technology improved, it became possible to bring whole CPU on a single chip named as microprocessor.
3Block Diagram of computer Microprocessor A Microprocessor is a multipurpose, programmable electronic device that reads binary instruction from memory; accepts binary data as Input and provides output after processing the data.Block Diagram of computerBlock Diagram of computer with Microprocessor as CPU (Microcomputer)
4BrainIt gets input from eyes/ears and sends processed information to output devices such as face/Muscles.Example : Sit down as instruction.
5Microprocessor (MPU) Read instructions Process binary data Microprocessor includes ALU, Register arrays and control unit on a single chip
6Input/Output Devices & Bus Input DevicesKeyboard and SwitchesProvide binary information to the MPUOutput devicesLEDs and LCDsReceive binary information from the MPUBus – Carries bits between the microprocessor and memory and I/O Devices
7Microprocessor-Based System with Bus Architecture
8MicrocontrollerA device that includes microprocessor, memory and I/O signal lines on a single chip.
9Difference between Microcontroller and Microprocessor
10MicroprocessorCPU is stand-alone, RAM, ROM, I/O, timer are separatedesigner can decide on the amount of ROM, RAM and I/O ports.versatility, general-purposeHigh power consumptionMicrocontrollerCPU, RAM, ROM, I/O and timer are all on a single chipfixed amount of on-chip ROM, RAM, I/O portsspecific-purpose (control-oriented)Low power consumption
12Advances in Semiconductor Technology SSI <10 GatesMSI Between 10 to 1000 GatesLSI >1000 GatesVLSI >100000
13Intel Microprocessors 4,8,16,32,64 Bit Processors Year of IntroductionAddress Bus ( In Bits)Data Bus( In Bits)Addressable Memory40041971104640 Bytes8080197416864 K Bytes8085197680861978201 M Bytes803861985324 G BytesPentium II onwards1997366464 G Bytes
15ALU The ALU performs the following arithmetic and logical operations. AdditionSubtractionLogical ANDLogical ORLogical EXCLUSIVE ORComplement (logical NOT)Increment (add 1)Decrement (subtract 1)Left shiftClear
16Instruction Register and Decoder The instruction register and the decoder are considered as a part of the ALUThe instruction register is a temporary storage for the current instruction of a programThe decoder decodes the instruction and establishes the sequence of events to follow
18General RegistersThe 8085 has six general-purpose registers to store 8-bit data; these are identified as B, C, D, E, H, and LThey can be combined as register pairs - BC, DE, and HL - to perform some 16-bit operationsThe programmer can use these registers to store or copy data into the registers by using data copy instructionsThe HL register pair is also used to address memory locationsIn other words, HL register pair plays the role of memory address register
19Accumulator Hold data for manipulation (arithmetic, logical). Whenever the operation combines two words, either arithmetically or logically, the accumulator contains one word (say A) and the other word(say B) may be contained in a register or in memory location. After the operation the result is placed in the Accumulator replacing the word A.Major working register.Microprocessor can directly work on Acc.
20Program counterThe function of the PC is to point to the memory address from which the next byte is to be fetched.For 8085 it is 16 bit long.PC automatically increments to point to the next memory during the execution of the present instruction.PC value can be changed by some instructions.
21Stack pointer 16 bit register acts as memory pointer. Can save the value of the program counter for later use.points to a memory location in R/W memory which is called stack. follows LIFO algorithm.After every stack operation SP points to next available location of the stack. Usually decrements.
22FlagsThe ALU includes five flip-flops, which are set or reset after an operation according to data conditions of the result in the accumulator and other registersThey are called Zero (Z), Carry (CY), Sign (S), Parity (P), and Auxiliary Carry (AC) flags
23Flag registerS : after the execution of an arithmetic operation, if bit 7 of the result is 1, then sign flag is set.Z : bit is set if ALU operation results a zero in the Acc or registers.AC: bit is set, when a carry is generated by bit 3 and passed on bit 4.P: parity bit is set when the result has even number of 1s.For odd no of 1’s , the flag is resetCY = carry is set when result generates a carry. Also a borrow flag.SZACPCY
34Writing Assembly Language Program Define the problem clearly and make the problem statement.Analyze the problem thoroughly. In this step we divide the problem into smaller steps to examine the process of writing programs.Draw the flow chart. The steps listed in the problem analysis and the sequences are represented in a block diagram.Translate the blocks shown in the flowchart into 8085 operations and then subsequently into mnemonics.
35Conversion and Execution Convert the mnemonics into Hex code; we need to look up the code in 8085 instruction set.Store the program in Read/Write memory of a single-board microcomputer. This may require the knowledge about memory addresses and the output port addresses.Finally execute the program.