1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

8051 specification

Discussion in '8051/8951' started by Parth86, Sep 21, 2014.

  1. Parth86

    Parth86 Member

    Joined:
    Dec 25, 2011
    Messages:
    515
    Likes:
    5
    hello

    I have doubt about 8051 specification
    8 bit microcontroller
    8 bit data
    8 bit instruction
    8 bit decoder
    16 bit program counter

    8 bit data
    If we want to deal with 8 bit data so we use 8 bit

    8 bit instruction
    if
    instruction is 8 bit then we can do 256 operation (and.or.addition ....upto 256)
    if instruction is 16 bit then we can do 64,000 operation

    In 8 bit 8051 microcontroller why we use 8 bit instruction
    Q1 why we cant use 16 bit instruction ?

    8 bit decoder
    8 bit decoder decode 256 instruction
    we can use 5 bit 9 bit 13 bit why we use 8 bit decoder ?
     
  2. Ian Rogers

    Ian Rogers Super Moderator Most Helpful Member

    Joined:
    Mar 28, 2011
    Messages:
    9,165
    Likes:
    910
    Location:
    Rochdale UK
    ONLINE
    Q1.. Buy the MCS-96 or derivative as the registers in the noble MCS-51 are only 8 bit...

    As far as instructions there won't be 256 available in an 8 bit as the ALU has certain tasks using the instruction encoder... not all conditions will be available...

    If you have been paying attention to all you have learned, you will have seen that certain sacrifices made to the design, changes the way we can use the internal mechanism..... Far greater intellectuals than I designed these things, I'm sure they had good reasons for doing so...
     
    • Like Like x 1
  3. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,254
    Likes:
    961
    Location:
    Loveland, CO USA
    The data has only 8 bits so you can't have 2^9 or 2^13 instructions.
     
    • Like Like x 1
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Parth86

    Parth86 Member

    Joined:
    Dec 25, 2011
    Messages:
    515
    Likes:
    5

    ok that means If data is 4 bit then we will use 4:1 decoder ?
    it depend upon what data we are using

    what about program counter
    how to decide that which pc we will use ?
     
  6. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,254
    Likes:
    961
    Location:
    Loveland, CO USA
    The Program counter controls the maximum size of program. If the PC is 8 bit then we can only address 256 instructions.
    In the 8051 the PC is 16 bit and can address 64000 instructions.
    Most 8 bit CPUs use PCh and PCl (two 8 bit registers to make one 16 bit counter).
     
  7. Parth86

    Parth86 Member

    Joined:
    Dec 25, 2011
    Messages:
    515
    Likes:
    5
    I think In 8051 the instruction is 8 bit it can do 256 operation that mean we can use 8 bit pc ?
     
  8. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,254
    Likes:
    961
    Location:
    Loveland, CO USA
    The instruction decoder is 8 bit. So it can do 256 different instructions.
    The program counter points at what instruction is to be preformed next. It is 16 bit.
     
  9. Parth86

    Parth86 Member

    Joined:
    Dec 25, 2011
    Messages:
    515
    Likes:
    5
    still I don't understand why we use 16 bit program counter?
    why not we use 8 bit program counter ?

    If the PC is 8 bit then we can only address 256 instructions.
    In the 8051 the PC is 16 bit and can address 64000 instructions.

    If alu can do 256 instruction then can we use 8 bit pc?
     
  10. ronsimpson

    ronsimpson Well-Known Member Most Helpful Member

    Joined:
    Apr 17, 2007
    Messages:
    7,254
    Likes:
    961
    Location:
    Loveland, CO USA
    We use 16 bit program counter because a program that is 256 location long is so small only a hobby person will use it.
    My first personal computer (8080) had a CP of 16 bits. (before "DOC", back in the CPM days) (printer, hard-drive, monitor, floppy, etc)
    The 8088 (one of the first personal computer) address 1,000,000. That is so small that no one will use now.
    The 80386, has a PC so small that they all have been thrown in the trash.
    I am typing on a computer with only 4,000,000,000 of memory and the new programs will not run on it because the programs are too big.

    Can you find a micro with a 8 bit program counter?
     

Share This Page