Skip to main content

Even and Odd Memory Banks

The 8086 microprocessor uses a 20-bit address to access memory. With 20-bit address the processor can generate 220 = 1 Mega address. The basic memory word size of the memories used in the 8086 system is 8-bit or 1-byte (i.e., in one memory location an 8-bit binary information can be stored). Hence, the physical memory space of the 8086 is 1Mb (1 Mega-byte).

For the programmer, the 8086 memory address space is a sequence of one mega-byte in which one location stores an 8-bit binary code/data and two consecutive locations store 16-bit binary code/data. But physically (i.e., in the hardware), the 1Mb memory space is divided into two banks of 512kb (512kb + 512kb = 1Mb). The two memory banks are called Even (or Lower) bank and Odd (or Upper) bank. The organization of even and odd memory banks in the 8086-based system is shown in Figure.

The 8086-based system will have two sets of memory IC's. One set for even bank and another set for odd bank. The data lines D0-D7 are connected to even bank and the data lines D8 -D15 are connected to odd bank. The even memory bank is selected by the address line Ao and the odd memory bank is selected by the control signal BHE. The memory banks are selected when these signals are low(active low). Any memory location in the memory bank is selected by the address line A1 to A19.

The organization of memory into two banks and providing bank select signals allows the programmer to read/write the byte (8-bit) operand in any memory address through 16-bit data bus. It also allows the programmer to read/write the word (16-bit) operand starting from even address or odd address.
Organisation of even and odd memory banks in 8086 based system

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. what if required instruction is only of 1 Byte. Then 8086 cpu will access 2 cells at time but complete instruction is only in sigle cell.

    ReplyDelete
    Replies
    1. Thats why the A0 and BHE bar is connected to send the control signal.

      Delete
  3. you have written an excellent blog.. keep sharing your knowledge..
    Go Lang Course in Chennai
    Go Lang Course in Chennai

    ReplyDelete
  4. Excellent article and with lots of information. I really learned a lot here. Do share more like this.
    Latest Website Design Trends
    New Website Designs

    ReplyDelete
  5. Excellent article and this helps to enhance your knowledge regarding new things.

    PTE Coaching in ambala
    Best IELTS Institute in Ambala
    Best IELTS Coaching in Ambala

    ReplyDelete
  6. micro segmentation banking
    Personalize products, offers, pricing and loyalty programs; prevent revenue leakage and ensure regulatory compliance with a billing solution.

    ReplyDelete

Post a Comment

Popular posts from this blog

8051 Simple Programs

Sum of 8-bit Numbers Stored in Memory Here  we will discuss about 8051 programs but we can't discuss about all of the 8051 instructions. For programming 8051 we should know about assembler directives as well as instruction set. Click  here to download Atmel c51 user guide that will discuss about 8051(c51 family microcontroller) instruction set, assembler directives, c51 cross assembler from Atmel.  Program ORG 00H MOV R0,#50H   ; get memory location in memory pointer R0 MOV R1,#51H   ; get memory location on memory pointer register R1 MOV A,@R0       ; get content of memory location 50H to accumulator ADD A,@R1        ; add content of A with content of memory location 51H and store result in A MOV R0,#52H    ; get 52H to memory pointer R0 MOV@R0,A         ; copy content of A to memory location 52H END Add 16-bit Numbers Program ORG 00H MOV DPTR,#2040H   ; get 2040H into DPTR MOV A,#2BH              ; get lower byte of second 16-bit number on accumulator MO

Introduction to 8051 embedded C

For 8051 we need to include the file reg51.h. This file contains the all the definitions of 8051 registers. With this information C compiler produces hex file that can be downloaded into the ROM of the microcontroller. It is important to note that the size of the hex file produced by the assembly language is much larger than the hex file produced by C compiler. Apart from this fact, there is many reasons for writing programs in C instead of assembly: ●It is much easier and less time consuming to write programs in C assembly. ●C is more flexible; it is easier to modify and update. ●Programming in C allows to use code available in function libraries. ●Program written inC for one microcontroller is portable to other microcontrollers with little or no modifications. Data Types in 8051 Embedded C The table shown below lists the data types that are available in typical C51 compiler. The gives information about the size of the data variable and it's value range. Data type