Download presentation
Presentation is loading. Please wait.
1
The 8085 Bus & Memory Chapter 2 - Continue
2
The 8085 Bus The bus is a set of conductors that connect the CPU to its memory and I/O devices. It may be wires in a cable or lines on printed circuit (PC) board that all information must travel on. Normally, the bus conductors are separated into three groups: 1. The Data Bus. 2. The Address Bus. 3. The Control Bus.
3
The 8085 Data bus The data bus transmits data and instructions back and forth between various chips of the system. The data on the bus can travel in both directions (bi-directional bus). The bus might be 8-bit (8 parallel conductors) or 16-bit (16 parallel conductors) or more, depends on the CPU used. For the 8085 CPU the data bus is an 8-bit bus.
4
The 8085 Address bus The address bus originate from the microprocessor and carries addresses to all devices that are connected to the data bus , so it is (unidirectional). In the 8085 CPU the address bus is 16 parallel bits wide (16 parallel conductors). It allows a total of 216 or 64k addresses (or addresses, where the k=1024). An address carried by the address bus normally selects a device (usually a chip) or a location (usually a register or a memory cell). The address bus is always used in conjunction with the data bus to specify the source or destination of the data transmitted on the data bus.
5
The 8085 address bus - continue
The address bus originates from a specialized CPU register called the Program Counter (PC). The 8085A uses a multiplexed Data Bus. The address is split between the higher 8bit Address Bus and the lower 8bit Address/Data Bus. During the first cycle the address is sent out. The lower 8bits are latched into the peripherals by the Address Latch Enable (ALE=1) so that the address is saved. Then during the rest of the machine cycle (ALE-0), the Data Bus is used to carry memory or I/O data.
6
The 8085 address bus - continue
The number of address bits n determines the number of memory locations (or expressed as the number of bytes in memory since each location carries one byte). This is according to the following equation: Where n is number of address bits
7
The 8085 address bus - continue
Example 2.1: If number of address bits n=4, how many memory location we can address? Solution: The number of memory locations = =16 locations (bytes)
8
The 8085 address bus - continue
Example 2.2: If the size of a memory is 4k bytes, how many address bits required to address these memory locations? Solution:
9
The 8085 control bus Carries synchronization signals between the microprocessor and all the devices connected to the buses. Typical signals traveling on the control bus are Read ( ), Write ( ), Interrupt, Reset, Input/output or Memory select ( ) and Acknowledgements of various types. Each control signal has its own line.
10
The 8085 Read Operation The program counter inside the CPU places the 16-bit address onto the address bus (for example hex) as shown in fig 2.1 The CPU Identifies the operation as read operation by setting the following signals (IM/O=0, S1=1, S0=0). The control section in the CPU send an O-signal down the RD control bus, indicates the selected memory is to be read and that the data bus is available for the data transfer. The memory location at the identified address will then place its stored data (C8) on the data bus. The CPU can then read this data word from the data bus and transfer it to the instruction decoder.
11
The 8085 Write Operation The program counter in the CPU places the 16-bit address onto the address bus (for example hex) as shown in fig 2.2. The CPU Identifies the operation as write operation by setting the following signals (IM/O=0, S1=0, S0=1). The control section in the CPU send an O-signal down the WR control bus, indicates the selected memory is to be written to, and that the data bus is available for the data transfer. The CPU places the data word 2E on the data bus. The memory location at the identified address 2500 hex will then take the data (2E) from the data bus and store it at that location.
12
The 8085 Memory Devices The memory in computer performs two tasks:
1. It stores the instruction of programs. 2. It stores the data used by the programs The memory is an electronic circuit that made able to store binary data. In computers the memory consists of large collection of storage locations. Each location is identified by a number assigned to it called Address as shown in Fig-2.3. These addresses normally occur in sequence. The addresses and the contents of the memory locations usually represented in hexadecimal numbers. Therefore, the first memory location has address 0000 hex, the second one has address 0001 hex, and so on. Each memory location stores one byte. For example, the memory location at address 0004 hex stores the data word
13
The 8085 Memory Devices - continue
The width of a memory location (sometimes referred to it as word) is its number of bits stored in the location. Bits are normally numbered from 0 to n. In case of an 8-bit microprocessor such as the 8085, each memory location will take 8-bit (one byte) and the position of the bit will be referenced by digits from 0 to 7. The word size in this case is 8-bit. A 16-bit microprocessor requires 16 bit memory location and the word size here is 16-bit width.
14
The 8085 Memory Types Next Lecture
15
The 8085 Memory Types There are two basic types of memories, RAM, and ROM. RAM (Random Access Memory) Static RAM (SRAM) Dynamic RAM (DRAM) ROM (Read Only Memory) PROM (Programmable Read Only Memory) EPROM (Erasable Programmable Read Only Memory) EAROM (Electrically Alterable Read Only Memory)
16
The 8085 – RAM (Random Access Memory)
Volatile memory, it stores data and programs as long as it is supplied by power. It loses data whenever it loses the supplied power. There are two types of RAM memory: Static RAM (SRAM): The contents of static RAM remains stable forever as long as power is available. Dynamic RAM (DRAM): The supplied power must be refreshed every few millisecond in order to keep the data available..
17
The 8085 – ROM (Read Only Memory)
Non-volatile memory, its contents cannot be altered or lost when the power goes off. There are three types of ROM Memory: PROM (Programmable Read Only Memory). Non-Erasable memory. This type is programmed by the user using a special device called Universal PROM Programmer. Once programmed, data and contents cannot be erased or changed. EPROM (Erasable Programmable Read Only Memory). it can be programmed by the user, but the program can be erased by the user using ultra violet light through a glass window provided on the EPROM IC Chip. Can be programmed again. EAROM (Electrically Alterable Read Only Memory). Can be programmed and erased electrically while in the circuit.
18
The 8085 - Memory Types - Exercises
Example 2.3: Determine the amount of EPROM and RAM in kilobytes for the following memory map shown in Fig 2.4: Solution: EPROM size: from 0000 hex to 05FF hex Convert both size limits to decimal:- 0000 hex = 0000 decimal ……………………....1 05FF hex = = = 1535 ……..…….2 subtract 1 from 2: therefore the size of EPROM memory= =1536 bytes Or size of EPROM in kilobytes = =1.5K bytes
19
The 8085 - Memory Types - Exercises
Example 2.3: Solution – Continue:
20
The 8085 - Memory Types - Exercises
Example 2.4: Shown in Fig – 2.5, a memory of size 1k bytes, Determine the following: a) The number of address bits required. b) The Address of the highest 5 memory locations. Solution: a) The number of address bits
21
The 8085 - Memory Types - Exercises
Example 2.4: Solution - Continue: b) The highest address is decimal is = 1k-1 = (1x1024)-1 = 1023 Converting the result to hexadecimal form: (1023)10 = (3FF)16 Therefore, the highest 5 addresses arranged in descending order are: 3FF, 3FE, 3FD, 3FC, 3FB
22
The 8085 - Memory Types - Exercises
Example 2.5: Shown in Fig – 2.6, a memory of size 20k bytes, Determine the following: a) The number of address bits required. b) The Address of the highest 5 memory locations. c) The highest address of the n address bits found in part a. Solution: a) The number of address bits
23
The 8085 - Memory Types - Exercises
Example 2.5: Solution - Continue: b) The highest address is decimal is = 20k-1 = (20x1024)-1 = 20479 Converting the result to hexadecimal form: (20479)10 = (4FFF)16 Therefore, the highest 5 addresses arranged in descending order are: 4FFF, 4FFE, 4FFD, 4FFC, 4FFB c) The highest address the 15 bit address can give is: 7FFF.
24
The 8085 – Input/Output (I/O):
Computers communicate with external world through devices called input/output devices (peripheral devices). Information feed into the computer through the input devices such as keyboards, mouse, ..etc. Information coming out of the computer through output devices such as monitors, printers, …etc. The connections between these I/O devices and the computer are through special circuits known as I/O ports. These circuits are used to provide the interface between the microprocessor buses and the I/O devices.
25
The 8085 – Input/Output (I/O):
There are three techniques used to communicate between the CPU and the I/O devices: Polling: Periodically, the CPU asks every device connected to its data bus for any required services. The connected devices place their respond on the control bus. If the connected device does not require any service, the microprocessor proceed to ask the next connected device with the same procedures. Practically, this is done by testing a flag in the status register of the device.
26
The 8085 – Input/Output (I/O):
There are three techniques used to communicate between the CPU and the I/O devices: Interrupts: Each I/O devices is connected to one of the lines in the control bus called interrupt line which is connected to the microprocessor. Every device that requires a service may generate an interrupt pulse signal on the interrupt line. The microprocessor must then accept the interrupt at the proper time and then perform the requested service. Interrupt technique is much faster than polling.
27
The 8085 – Input/Output (I/O):
There are three techniques used to communicate between the CPU and the I/O devices: Direct Memory Access (DMA): Used for I/O devices which requires high speed transfer of data directly between the memory and the I/O device such as disks or display monitor. Uses a chip called Direct Memory Access Controller (DMA) (8237 or 8257 IC’s). Uses a chip called Direct Memory Access Controller (DMA) (8237 or 8257 IC's). The I/O device may send an interrupt directly to the microprocessor by sending a HOLD signal. Next the DMA controller takes over the buses of the system and automatically transfers blocks of data bytes between the memory and the I/O device.
28
The 8085 – Program Execution:
To execute a program, it must first be loaded in memory as a sequence of binary instructions residing at successive address. When the user presses the Run key (or the Execute key) the following steps occur for each instruction: 1. The memory address of the first instruction of the program is loaded into the program counter (PC). 2. The PC places the memory address on the address bus and send to the memory. 3. A read command RD signal is then send to the memory over the control line. 4. The memory decodes the address (that is it finds the correct memory location). 5. The memory will place the instruction on the data bus.
29
The 8085 – Program Execution:
6. The microprocessor will read the instruction from the data bus and places it into the instruction register (IR). 7. The instruction decoder will decode the instruction. 8. The appropriate control signals are then generated in the timing and control section, resulting in the execution of the instruction. 9. The contents of the PC incremented to contain the address of the next instruction in the memory whether it is a data or an instruction. Steps 1 through 7 are referred to as Fetch Cycle, while steps 8-9 are referred to as Execute Cycle.
30
The 8085 microprocessor: End of Chapter 2
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.