Your SlideShare is downloading. ×
8085 microprocessor(1)
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

8085 microprocessor(1)

718
views

Published on

Published in: Technology, Business

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
718
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
22
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. 8085 MICROPROCESSOR ARCHITECTURE AND PROGRAMMING
  • 2. • Presented by: PRATIK DATTA Roll no-10900311051 REEVU PAL Roll no-10900311070 PRATIP GHOSH Roll no-10900311052 RANADIP SAHA Roll no-10900311069
  • 3. WHAT IS A MICROPROCESSOR  A microprocessor is a multipurpose, programmable electronic device that accepts binary data as input ,processes the data and provides results as output.  It works in tandem with the storage memory containing data and instructions along with control unit, input and output devices amd forms a microcomputer.  Every microprocessor recognizes and processes ‘n’ number of binary digits(bits) at time and is known as the word length.It may vary from 4- bit to 64-bit. MICROPROCESSOR 3 ALU REGISTE R ARRAY CONTROL UNIT INPUT/OUTPUT MEMORY SYSTEM BUS Slide # 1of 26
  • 4. 8085- AN INTRODUCTION  The 8085 is an 8-bit general purpose microprocessor that can address 64K Byte of memory.  It has 40 pins and uses +5V for power. It can run at a maximum frequency of 3 MHz.  The pins on the chip can be grouped into 6 groups: Address Bus. Data Bus. Control and Status Signals. Power supply and frequency. Externally Initiated Signals. Serial I/O ports Slide # 2 of 26
  • 5. High-Order Address Bus Multiplexed Address/Data Bus AL ES0 S1 IO/𝑀 HLDA 𝑊𝑅 𝑅𝐸𝑆𝐸𝑇𝐼𝑁 𝐼𝑁𝑇𝐴 HOL D RST 6.5RST 5.5INTR READ Y TRA P 𝑅𝐷 RST 7.5 +5 V GND CLK OUTRESET OUT 6 7 8 9 10 35 39 36 38 11 21 19 12 30 29 33 34 32 31 A8 373 20401 vssvccX1 X2 2 28A15 AD0 AD7 PIN CONFIGURATION SID SOD 5 4 Slide #3 of 26
  • 6. THE ADDRESS AND DATA BUSES  The address bus has 8 signal lines A8 – A15 which are unidirectional.  The other 8 address bits are multiplexed (time shared) with the 8 data bits.  So,the bits AD0 – AD7 are bi-directional and serve as A0 – A7 and D0 – D7 at the same time.  In order to separate the address from the data, we can use a latch to save the value before the function of the bits changes. Slide # 4 of 26
  • 7. DEMULTIPLEXING AD7-AD0  The basic requirement of demultiplexing is to save the total 16bit address for the entire duration of execution of an instruction.  To make sure we have the entire address for the full three clock cycles, we will use an external latch to save the value of AD7– AD0 when it is carrying the address bits. We use the ALE signal ,which is kept high to enable this latch.  Then when ALE goes low, the address is saved and the AD7– AD0 lines carry the data bits D7-D0. 8085 ALE A15-A8 Latch AD7-AD0 A7- A0 D7- D0 Slide # 5 of 26
  • 8. THE CONTROL AND STATUS SIGNALS  There are 4 main control and status signals. These are:  ALE : Address Latch Enable. This signal is a pulse that become 1 when the AD0 – AD7 lines have an address on them. It becomes 0 after that.  RD : Read- Active low,signifying ‘read’ operation  WR : Write- Active low,signifying ‘write’ operation.  IO/𝑀 : This signal specifies whether the operation is a memory operation (IO/𝑀=0) or an I/O operation (IO/𝑀=1).  S1 and S0 : Status signals to specify the kind of operation being performed Slide # 6 of 26
  • 9. CLOCK SIGNALS AND PINS • 8085 MPU has 3 pins that control or present the clock signal. • X1 and X2 pins determine the clock frequency. • CLK OUT is a square-wave output clock. • The CLOCK OUT is one-half the crystal frequency. 8085A X1 CLK OUT X2 6 MHz Slide # 7 of 26
  • 10. INTERRUPT AND EXTERNALLY INITIATED SIGNALS • INTR and 𝐼𝑁𝑇𝐴 are general purpose interrupts,the former being an input signal from peripherals and later being output to the corresponding source. • RST 7.5,6.5,5.5 are vectored interrupts that transfer the program control to specified memory locations.The priority order is 7.5>6.5>5.5. • TRAP is a Non-maskable interrupt that has the highest priority. • HOLD , READY(Input) and HLDA are used for communication with other devices and peripherals. Slide # 8 of 26
  • 11. BLOCK DIAGRAM OF 8085 MICROPROCESSOR INTERRUPT CONTROL SERIAL I/O CONTROL ACCUMULAT OR TEMP. REGISTE RS TIMING AND CONTROL UNIT INSTRUCTI ON REGISTERS INSTRUCTION DECODER & MACHINE CYCLE ENCODING ADDRESS(HIG H) BUFFER ADDRESS(LO W)/DATA BUFFER B Register C Register D Register E Register H Register L Register Stack Pointer Program Counter +5 VGN D X1 X2 CLK OUT READ Y 𝑅𝐷 AL E S 0 S1 HLDA 𝑅𝐸𝑆𝐸𝑇 𝐼𝑁 RESET OUT 𝑊𝑅 IO/𝑀 HOLD 8 BIT INTERNAL REGISTER REGISTER ARRAY SID SO D RST 7.5 RST 5.5 TRA P INT R 𝐼𝑁𝑇𝐴 FLAG FLIP- FLOPS ARITHMETI C LOGIC UNIT RST 6.5 Slide # 9 of 26
  • 12. PROGRAMMING MODEL OF 8085 Accumulator:  It is 8 bit general purpose register connected to ALU.  Performs arithmetic and logical operations.  Result of an operation is stored in accumulator Temporary register:  All the arithmetic and logical operations are done in the temporary register but user can’t access it.  It is not available for user. Accumulator ALU Flags Instruction Decoder Register Array Memory Pointer Registers Timing and Control Unit 16-bit Address Bus 8-bit Data Bus Control Bus Slide # 10 of 26
  • 13. FLAG REGISTERS  Flag Register: It is a group of 5 flip flops used to know status of various operations done and is given by:  S: Sign flag is set when result of an operation is negative.  Z: Zero flag is set when result of an operation is 0.  AC: Auxiliary carry flag is set when there is a carry out of lower nibble or lower four bits of the operation.  CY: Carry flag is set when there is carry generated by an operation.  P: Parity flag is set when result contains even number of 1’s. Rest(X) are don’t care flip flops.  8085 uses these flags in decision-making process. S Z X AC X P X CY Slide # 11 of 26
  • 14. INSTRUCTION SET OF 8085  An instruction is a binary pattern designed inside a microprocessor to perform a specific function.  8085 has 246 instructions.  Each instruction is represented by an 8-bit binary value.  These 8-bits of binary value is called Op-Code or Instruction Byte. 8085 instructions can be classified as: 1. Data Transfer (Copy) 2. Arithmetic 3. Logical and Bit manipulation 4. Branch 5. Machine Control Slide # 12 of 26
  • 15. DATA TRANSFER (COPY) OPERATIONS These instructions move data between registers, or between memory and registers, from source to destination. Before Instructions After Instructions Load a 8-bit number 4F in register B:MVI B, 4FH B B Copy from Register B to Register A:MOV A,B A A B B Load a 16-bit number 2050 in H H Register pair HL:LXI H, 2050H L L Copy from Register B to H H Memory Address 2050 Containing data 9FH:MOV M,B L L B B XX 4FH XX 4FH4FH 4FH XX XX 20H 50H 20 50 20 50 XX 9FH Slide # 14 of 26
  • 16. ARITHMETIC OPERATIONS / INSTRUCTIONS  These instructions perform the operations like: Addition, Subtraction, Increment Decrement , etc. Before Instructions After Instructions Add a 8-bit number 32H to Accumulator: ADI 09H A A Data Add contents of Register B to Accumulator: ADD B A A B B Subtract a 8-bit no.32H from Accumulator: SUI 32H Subtract contents of Register C from Accumulator: SUB C Increment the contents of Register D by 1: INR D D D Decrement the contents of Register E by 1: DCR E E E 07H 09H 10H 07H 09H 10H 09H FFH 00H FFH FEH Slide # 15 of 26
  • 17. LOGICAL & BIT MANIPULATION OPERATIONS 1. Logically AND Register H with Accumulator: ANA H 2. Logically OR Register L with Accumulator: ORA L 3. Logically XOR Register B with Accumulator: XRA B 4. Compare contents of Register C with Accumulator: CMP C 5. Complement Accumulator: CMA 6. Rotate Accumulator Left: RAL Slide # 16 of 26
  • 18. BRANCHING OPERATIONS These operations are used to control the flow of program execution 1. Jump to a 16-bit Address 2080H if Carry flag is SET: JC 2080H 2. Unconditional Jump: JMP 2050H 3. Call a subroutine with its 16-bit Address: CALL 3050H 4. Return back from the Call: RET 5. Call a subroutine with its 16-bit Address if Carry flag is RESET: CNC 3050H 6. Return if Zero flag is SET: RZ MACHINE CONTROL INSTRUCTIONS 1. Stop program execution: HLT 2. Do not perform any operation: NOP Slide # 17 of 26
  • 19. TIMING DIAGRAM FOR STA 526AH : Slide # 18 of 26
  • 20. STACK AND SUBROUTINES • The Stack is a set of Memory locations ,either specified by the user or is allotted by default , which stores information bytes temporarily. • Say, If stack pointer is loaded with 2099H,the storing of bytes begins at 2098H and continues in decreasing order such as 2098H,2097H etc. • Instruction ‘PUSH’ is used to store data bytes(two at a time) on the stack and ‘POP’ is used to retrieve data back to the respective registers. • EG: LXI SP,2099H LXI D,42F2H PUSH D POP B • Subroutine is a group of instructions written separately to perform a function which occurs repeatedly in the main program. • ‘CALL’ is used to transfer execution to specified address and ‘RET’ is used to resume main program execution. MEMORY MEM ADDRE SS F2 2097 42 2098 XX 2099 D 42 F2 E B 42 C F2 PUS H PO P Slide # 19 of 26
  • 21. COUNTERS AND DELAY • A counter is designed by loading a number into one of the registers and using INR/DCR/INX/DCX instructions. • A loop is established to update the count and checking is done through JNZ/JZ instructions whether or not to continue the loop. • For a certain clock period, depending upon the No. of T-states of instructions, every count generates a different time delay. • Eg.: MVI C,FFH LOOP: DCR C JNZ LOOP MVI takes 7 T-states , JNZ takes 10.Hence for a clock period of 0.5µsec, the loop continues for 255(FFH) times and a delay of 1.8ms is generated. • For larger amount of delay , a Register pair as well as a loop within loop techniques can be used to achieve the required delay. Slide # 20 of 26
  • 22. MICROPROCESSOR BASED TRAFFIC CONTROL SYSTEM The Basic Objective is to design a Traffic control System with a provided on/off time to three traffic lights-GREEN, YELLOW and RED. This is done by using 8255 peripheral interface which can be programmed to transfer data under given conditions. Fig. shows the interfacing diagram to control 12 LED’s. Port A is used to control lights on N-S road and Port B is used to control lights on W-E road. For understanding the basic application of 8085 here we have demonstrated only for North-South and East-West movement only. Further development can be done once the basic procedure is understood 22 Slide # 21 of 26
  • 23. SOFTWARE FOR TRAFFIC LIGHT CONTROL • Control word for Initialisation of 8255: 80H I/O Mode Port A in Mode0 Port A=Output Port B in Mode0 Port B=Output • Data bytes to be sent for specific combination Similarly to glow Y1 and Y2 Port A output=12H , Y3 and Y4 Port B output=12H. To glow R3 and R4 Port A output=09H , G1 and G2 Port B output=24H. IO/BSR MODE A PORT A PORT C H MODE B PORT B PORT C L 1 0 0 0 X 0 0 X TO GLOW P A 7 P A 6 PA 5 P A 4 P A 3 P A 2 PA 1 P A 0 PORT A OUTP UT P B 7 P B 6 PB 5 PB 4 PB 3 PB 2 PB 1 PB 0 PORT B OUTPU T R1,R2, G3,G4 X X 1 0 0 1 0 0 24H X X 0 0 1 0 0 1 09H Slide # 22 of 26
  • 24. FLOW CHART FOR PROGRAM EXECUTION Address of Control Register=83H Data for port A=24H,port B=09H Delay Generated= 10sec Data for port A=12H,Port B=12H Delay generated=03 sec Send Data to Port A,B to glow R1,R2,G3,G4 Call Delay subroutine using count of 14H Send Data to Port A,B to glow Y1,Y2,Y3,Y4 24 Slide # 23 of 26 Initialize Port A,B of 8255 in output mode Call Delay subroutin e using count of 06H
  • 25. Send Data to Port A,B to glow R3,R4,G1,G2 Data for Port A=09H,Port B=24H Call Delay Subroutine using count of 14H Send Data to Port A,B to glow Y1,Y2,Y3,Y4 Delay generated=10 sec Data for Port A=12H,Port B=12H Call Delay Subroutine using count of 06H Delay Generated=06 sec Use Unconditional Jump to starting address: JMP START 25 Slide # 24 of 26 Return to start and continue the process
  • 26. CONCLUSION The 8085 processor was used in a few early personal computers, produced from1977 to early-to-mid-1980’s. Now-a-days, in many engineering schools the 8085 processor is used in introductory microprocessor courses. However with time, better quality microprocessors have been developed with greater bit processing capability(32 and 64 bit ) along with huge no of other modifications Slide # 25 of 26
  • 27. REFERENCES AND BIBLIOGRAPHY • BOOKS: • Microprocessor Architecture, Programming and Applications with the 8085 by Ramesh Gaonkar. • Fundamentals of Microprocessors and Microcontroller by B.Ram . • INTERNET: • http://en.wikipedia.org/wiki/Intel_8085 • http://www.nptel.ac.in/courses/Webcourse-contents/IISc- BANG/Microprocessors and Microcontrollers • http://instrumentationandcontrollers.blogspot.in/2011/01/microproce ssor-based-traffic-light.html Slide # 26 of 26
  • 28. THANK YOU

×