Lect 5


Published on


Published in: Technology, Business
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Lect 5

  1. 1. Microprocessor Systems EE351 8086 Chipset Badar-ul-Islam Department of Electrical Engineering NFC-IEFR [email_address]
  2. 2. 8086/88 Device Specifications <ul><li>Both are packaged in 40-pin DIP (Dual In-Line Packages) </li></ul><ul><li>8086: 16-bit microprocessor with a 16-bit data bus </li></ul><ul><li>8088: 16-bit microprocessor with an 8-bit data bus </li></ul><ul><li>Both are 5V parts (i.e. VDD is 5V) </li></ul><ul><ul><li>8086: Draws a maximum supply current of 360mA </li></ul></ul><ul><ul><li>8088: Draws a maximum supply current of 340mA </li></ul></ul><ul><li>80C86/80C88: CMOS version draws 10mA with temp spec -40 to 225oF </li></ul>
  3. 3. Microprocessor Versions <ul><li>Both microprocessors are designed to work within the temperature range of 32 F to 180 F, extended tem range versions of 8086 and 8088 are also available. </li></ul><ul><li>80C88 and 80C86 are CMOS versions and require 10 mA power supply current and function in temp extremes of -40 F through +225 F. </li></ul>
  4. 4. Input/Output current levels
  5. 5. I/O Characteristics <ul><li>Noise immunity is the difference between the logic 0 output voltage and logic 0 input voltage. </li></ul><ul><li>It is recommended to connect no more than ten loads or combinations of load of any kind to any output without involving buffers, otherwise the increased noise may cause problems in the timing and synchronizing mechanisms. </li></ul>
  6. 6. 8086/88 Pinout
  7. 7. 8086/88 Pinout <ul><li>AD15-AD0 </li></ul><ul><ul><li>Multiplexed lines, address memory or some I/O port when ALE=1 and will be used as data bus when ALE=0.They will remain in high impedance state during hold acknowledge.AD0-AD7 in 8088 and AD0-AD15 in 8086. In 8088 processor A8-A15 pins are used as address bus only( as 8086 has address and data bus width of 16 bits and 8088 has an address bus of 16 lines and data bus of 8 lines only) </li></ul></ul>
  8. 8. 8086/88 Pinout <ul><li>A19/S6-A16/S3 (status/address bus, multiplexed) </li></ul><ul><ul><li>High order 4 bits of the 20-bit address OR status bits S6-S3. S3 and S4 are used to select any one of the four memory segments (shown in a table). They attain a high impedance during hold acknowledge. </li></ul></ul><ul><ul><li>__ __ </li></ul></ul><ul><li>M/IO or IO/M </li></ul><ul><li>__ _ </li></ul><ul><ul><li>The IO/M (8088) and M/IO (8086) indicates if address is a Memory or IO address. Attain a high impedance state during hold acknowledge. </li></ul></ul>
  9. 9. 8086/88 Pinout <ul><li>___ </li></ul><ul><li>RD (Active Low) </li></ul><ul><ul><li>When 0, data bus is driven by memory or an I/O device and becomes receptive to data from memory or IO connected to the system. Attains high impedance during hold acknowledge. </li></ul></ul><ul><li>___ </li></ul><ul><li>WR (Active Low) </li></ul><ul><ul><li>Microprocessor is driving data bus to memory or an I/O device and uP outputs data for memory or IO when this pin is low, data bus contains valid data for memory and IO device. This pin floats to high impedance during hold acknowledge. </li></ul></ul>
  10. 10. 8086/88 Pinout <ul><li>ALE (Address latch enable) </li></ul><ul><ul><li>When 1, address data bus contains a memory or I/O address, otherwise it contains data. ALE signal does’t float during hold acknowledge. </li></ul></ul><ul><ul><li>__ </li></ul></ul><ul><li>DT/R (Data Transmit/Receive) </li></ul><ul><ul><li>This signal shows either Data bus is transmitting (if high) or receiving (if low) data. The signal is used to enable the external data bus buffers. </li></ul></ul><ul><li>DEN (Data bus Enable) </li></ul><ul><ul><li>Activates external data bus buffers. </li></ul></ul>
  11. 11. 8086/88 Pinout <ul><li>INTR </li></ul><ul><ul><li>When 1 and IF=1(IF flag bit indicated by S5 status pin), microprocessor prepares to service a hardware interrupt. In this condition uP enters in an interrupt acknowledge cycle and INTA becomes active after current instruction completes. </li></ul></ul><ul><ul><li>--------- </li></ul></ul><ul><li>INTA </li></ul><ul><ul><li>Interrupt Acknowledge generated by the microprocessor in response to INTR. Causes the interrupt vector to be put onto the data bus. </li></ul></ul><ul><li>NMI </li></ul><ul><ul><li>Non-maskable interrupt. Similar to INTR except IF flag bit is not consulted and interrupt is vector 2. </li></ul></ul>
  12. 12. Interrupt Vectors <ul><li>It is a 4 byte number stored in first 1024 bytes of the memory when the processor operates in real mode, in the protected mode vector table is replaced by an interrupt descriptive table. </li></ul><ul><li>There are 256 different interrupt vectors each vector contains the address of an interrupt service procedure. </li></ul><ul><li>Each vector contains a value for IP and CS that forms the address of interrupt service procedure. </li></ul><ul><li>Try to explore more on interrupt vectors. </li></ul>
  13. 13. 8086/88 Pinout <ul><li>CLK </li></ul><ul><ul><li>Clock input must have a duty cycle of 33% (high for 1/3 of the cycle and low for 2/3 of the cycle to ensure proper internal timing) </li></ul></ul><ul><li>VCC/GND </li></ul><ul><ul><li>Power supply (+5V plus-minus 10%) and GND (0V) provides the return path for the supply, both processors have two ground pins and both must be connected to ground properly. </li></ul></ul><ul><li>MN/MX </li></ul><ul><ul><li>Select minimum (5V) or maximum mode (0V) of operation. </li></ul></ul>
  14. 14. 8086/88 Pinout
  15. 15. 8086/88 Pinout <ul><li>____ </li></ul><ul><li>BHE/S7 </li></ul><ul><ul><li>Bus High Enable. Enables the most significant data bus bits (D15-D8) during a read or write operation. The state of S7 is always a logic 1. </li></ul></ul><ul><li>READY </li></ul><ul><ul><li>Used to insert wait states (controlled by memory and IO for reads/writes) into the microprocessor. If the ready input pin is placed at logic 0, the uP enters in a wait state and becomes idle. If this pin is placed at logic 1, the operation of the uP remains normal. </li></ul></ul><ul><li>RESET </li></ul><ul><ul><li>Microprocessor resets if this pin is held high for 4 clock periods. Instruction execution begins at FFFF0H and IF flag is cleared, so the future interrupts are disabled. </li></ul></ul><ul><li>TEST </li></ul><ul><ul><li>An input that is tested by the WAIT instruction. Commonly connected to the 8087 coprocessor. </li></ul></ul>
  16. 16. 8086/88 Pinout <ul><li>HOLD </li></ul><ul><ul><li>Requests a direct memory access (DMA). When 1, microprocessor stops and places address, data and control bus in high-impedance state. When 0, microprocessor executes the program instructions normally. </li></ul></ul><ul><li>HLDA (Hold Acknowledge) </li></ul><ul><li>Indicates that the microprocessor has entered the hold state. </li></ul>
  17. 17. 8086/88 Pinout <ul><li>RO/GT1 and RO/GT0 </li></ul><ul><ul><li>Request/grant pins request/grant direct memory accesses (DMA) during maximum mode operation. </li></ul></ul><ul><li>LOCK </li></ul><ul><ul><li>Lock output is used to lock peripherals off the system. Activated by using the LOCK: prefix on any instruction. </li></ul></ul><ul><li>QS1 and QS0 </li></ul><ul><ul><li>The queue status bits show status of internal instruction queue. Provided for access by the numeric coprocessor (8087). </li></ul></ul>
  18. 18. 8284A Clock Generator <ul><li>Clock generation </li></ul><ul><li>RESET synchronization </li></ul><ul><li>READY synchronization </li></ul><ul><li>Peripheral clock signal </li></ul><ul><li>For detailed pin specifications refer to text book. </li></ul>
  19. 19. Pinouts
  20. 20. Connection of the 8284 and the 8086
  21. 21. 8284A Clock Generator
  22. 22. 8284A Clock Generator <ul><li>Clock generation </li></ul><ul><li>Crystal is connected to X1 and X2. </li></ul><ul><ul><li>XTAL OSC generates square wave signal at crystal's frequency which feeds: </li></ul></ul><ul><li>An inverting buffer (output OSC) which is used to drive the EFI input of other 8284 As 2-to-1 MUX </li></ul><ul><li>F/C selects XTAL or EFI external input. </li></ul>
  23. 23. <ul><li>The MUX drives a divide-by-3 counter (15MHz to 5MHz). </li></ul><ul><li>This drives: </li></ul><ul><li>The READY flipflop (READY synchronization). </li></ul><ul><li>A second divide-by-2 counter (2.5MHz clk for peripheral components). </li></ul><ul><li>The RESET flipflop. </li></ul><ul><li>CLK which drives the 8086 CLK input. </li></ul>
  24. 24. 8284A Clock Generator <ul><li>RESET </li></ul><ul><li>Negative edge-triggered flipflop applies the RESET signal to the 8086 on the falling edge. </li></ul><ul><li>The 8086 samples the RESET pin on the rising edge. </li></ul>
  25. 25. 8284A Clock Generator <ul><li>Correct reset timing requires that the RESET input to the microprocessor becomes a logic 1 NO LATER than 4 clocks after power up and stay high for at least 50µs. </li></ul>
  26. 26. BUS Buffering and Latching <ul><li>Computer systems have three buses </li></ul><ul><li>Address </li></ul><ul><li>Data </li></ul><ul><li>Control </li></ul><ul><li>The Address and Data bus are multiplexed (shared) due to pin limitations on the 8086. </li></ul><ul><li>The ALE pin is used to control a set of latches. </li></ul>
  27. 27. BUS Buffering and Latching <ul><li>All signals MUST be buffered </li></ul><ul><li>Buffered Latches for A0-A15. </li></ul><ul><li>Control and A16-A19 + BHE are buffered separately. </li></ul><ul><li>Data bus buffers must be bi-directional buffers. </li></ul><ul><li>In a 8086 system, the memory is designed with two banks. </li></ul><ul><li>High bank contains the higher order 8-bits and low bank the lower order 8-bits </li></ul><ul><li>Data can be transferred as 8 bits from either bank or 16-bits from both </li></ul><ul><li>BHE pin selects the high-order memory bank </li></ul>
  28. 28. BUS Buffering and Latching
  29. 29. Timing in General <ul><li>Bus Cycle: </li></ul><ul><li>Microprocessor uses memory and I/O IN periods of time, called Bus Cycles. </li></ul><ul><li>Each Bus Cycle equals to four clocking periods (T states), however some latest systems use just two clocking signals to complete the cycle. </li></ul><ul><li>As the clock frequency is 5 MHz, so one bus cycle is completed in 800 ns. </li></ul><ul><li>8086 can execute 2. millions of instruction per second (MIPS used as a unit of microprocessor execution power.) </li></ul>
  30. 30. BUS Timing <ul><li>Writing </li></ul><ul><li>Dump address on address bus. </li></ul><ul><li>Dump data on data bus. </li></ul><ul><li>___ _ </li></ul><ul><li>Issue a write (WR) and set M/IO to 1. </li></ul>
  31. 31. <ul><li>Reading </li></ul><ul><li>Dump address on address bus. </li></ul><ul><li>__ __ </li></ul><ul><li>Issue a read (RD) and set M/IO to 1. </li></ul><ul><li>Wait for memory access cycle </li></ul>
  32. 32. BUS Timing
  33. 33. BUS Timing <ul><li>During T1: </li></ul><ul><li>The address is placed on the Address/Data bus. </li></ul><ul><li>Control signals M/IO, ALE and DT/R specify memory or I/O, latch the address onto the address bus and set the direction of data transfer on data bus. </li></ul><ul><li>During T2: </li></ul><ul><li>8086 issues the RD or WR signal, DEN, and, for a write, the data. </li></ul><ul><li>DEN enables the memory or I/O device to receive the data for writes and the 8086 to receive the data for reads. </li></ul>
  34. 34. BUS Timing <ul><li>During T3: </li></ul><ul><li>This cycle is provided to allow memory to access data. </li></ul><ul><li>READY is sampled at the end of T2. </li></ul><ul><li>- If low, T3 becomes a wait state. </li></ul><ul><li>- Otherwise, the data bus is sampled at the end of T3. </li></ul><ul><li>During T4: </li></ul><ul><li>All bus signals are deactivated, in preparation for next bus cycle. </li></ul><ul><li>Data is sampled for reads, writes occur for writes. </li></ul>
  35. 35. BUS Timing <ul><li>Each BUS CYCLE on the 8086 equals four system clocking periods (T states). </li></ul><ul><li>The clock rate is 5MHz , therefore one Bus Cycle is 800ns . </li></ul><ul><li>The transfer rate is 1.25MHz . </li></ul><ul><li>Memory specifications (memory access time) must match constraints of system timing. For example, bus timing for a read operation shows almost 600ns are needed to read data. </li></ul><ul><li>However, memory must access faster due to setup times, e.g. Address setup and data setup. This subtracts off about 150ns . </li></ul><ul><li>Therefore, memory must access in at least 450ns minus another 30-40ns guard band for buffers and decoders. </li></ul><ul><li>420ns DRAM required for the 8086. </li></ul>
  36. 36. <ul><li>READY </li></ul><ul><li>An input to the 8086 that causes wait states for slower memory and I/O components. </li></ul><ul><li>A wait state (TW) is an extra clock period inserted between T2 and T3 to lengthen the bus cycle. </li></ul><ul><li>For example, this extends a 460ns bus cycle (at 5MHz clock) to 660ns . </li></ul>
  37. 37. Selection input MN/MX <ul><li>• Minimum-mode/Maximum mode </li></ul><ul><li>– Min-mode: </li></ul><ul><li>• Used for simple or single processor systems </li></ul><ul><li>• Microprocessor provides all control signals </li></ul><ul><li>– Max-mode: </li></ul><ul><li>• Used for complex or multi-processor systems </li></ul><ul><li>• Microprocessor produces signals for implementing a multiprocessor/coprocessor system environment </li></ul>
  38. 38. Minimum mode (uniprocessor) <ul><li>8088/8086 provides control signals </li></ul><ul><li>implementing memory and I/O interfaces </li></ul><ul><li>Signal groups: </li></ul><ul><li>– Address/data bus </li></ul><ul><li>– Control signals </li></ul><ul><li>– Interrupt signals </li></ul><ul><li>– Status signals </li></ul><ul><li>– DMA signals </li></ul>
  39. 39. Signal Interfacing
  40. 40. Maximum-Mode Interface <ul><li>Used to produce signals for implementing a multiprocessor/coprocessor system environment </li></ul><ul><li>– There are several processors in the system </li></ul><ul><li>environment </li></ul><ul><li>– They share common resources (called global </li></ul><ul><li>resources) </li></ul><ul><li>– Each processor may have its local or private </li></ul><ul><li>resources </li></ul><ul><li>• For multiprocessor systems--facilities are needed for implementing allocations of global resources and passing bus control to other microprocessors sharing the system bus. </li></ul>
  41. 41. MIN and MAX Mode <ul><li>Controlled through the MN/MX pin. </li></ul><ul><li>Minimum mode is cheaper since all control signals for memory and I/O are generated by the microprocessor. </li></ul><ul><li>Maximum mode is designed to be used when a coprocessor (8087) exists in the system. </li></ul>
  42. 42. MIN and MAX Mode <ul><li>Some of the control signals must be generated externally, due to redefinition of certain control pins on the 8086. </li></ul><ul><li>The following pins are lost when the 8086 operates in Maximum mode . </li></ul><ul><ul><li>ALE </li></ul></ul><ul><ul><li>WR </li></ul></ul><ul><ul><li>IO/M </li></ul></ul><ul><ul><li>DT/R </li></ul></ul><ul><ul><li>DEN </li></ul></ul><ul><ul><li>INTA </li></ul></ul><ul><li>This requires an external bus controller: 8288 Bus Controller . </li></ul>
  43. 43. 8288 Bus Controller <ul><li>Provides signals that are required to control the memory, I/O, and interrupt interfaces. </li></ul><ul><li>Connects directly to 8088/8086. </li></ul><ul><li>– Processor pins S0,S1,S2 carries a status code provided prior to initiation of each bus cycle </li></ul><ul><li>– Bus controller generates appropriately timed </li></ul><ul><li>command and control signals in response. </li></ul>
  44. 44. Signals of the 8288 <ul><li>Memory signals </li></ul><ul><li>MRDC - memory read command </li></ul><ul><li>MWTC - memory write command </li></ul><ul><li>AMWC - advanced memory write command </li></ul><ul><li>– I/O signals </li></ul><ul><li>IORC - I/O read command </li></ul><ul><li>IOWC - I/O write command </li></ul><ul><li>AIOWC - advanced I/O write command </li></ul><ul><li>– Interrupt signals </li></ul><ul><li>INTA - interrupt acknowledge </li></ul><ul><li>– Other signals </li></ul><ul><li>DEN, DT/R, and ALE </li></ul><ul><li>(the same as for the minimum-mode system) </li></ul>
  45. 45. Status-to-command mapping
  46. 46. Other Maximum Mode Signals <ul><li>Lock signal - LOCK </li></ul><ul><li>– Request to lock out the other processors from using the bus </li></ul><ul><li>– Used when accessing shared resources (global resources) </li></ul><ul><li>Queue status signals - QS1QS0 </li></ul><ul><li>– Informs the external circuitry what type of information was </li></ul><ul><li>removed from the queue during the previous clock cycle </li></ul><ul><li>Bus request signals </li></ul><ul><li>– RQ/GT0 and RQ/GT1 - request/granted lines (they replace HOLD and HOLDA signals) </li></ul><ul><li>– Provide a prioritized bus access mechanism for accessing local bus. </li></ul>
  47. 47. Maximum Mode Interface through 8288
  48. 48. 8288 Bus Controller
  49. 49. 8288 Bus Controller <ul><li>Separate signals are used for I/O (IORC and IOWC) and memory (MRDC and MWTC). </li></ul><ul><li>Also provided are advanced memory (AIOWC) and I/O (AIOWC) write strobes plus INTA. </li></ul>
  50. 50. MAX Mode 8086 System