Connect with us

micro controller design

Discussion in 'General Electronics Discussion' started by vead, Feb 26, 2014.

Scroll to continue with content
  1. vead

    vead

    473
    14
    Nov 27, 2011
    I am planning to design 8 bit micro controller on software with FPGA
    I have looked some datasheet and I have done some little work

    Micro controller features

    8 bit micro controller
    8 bit ALU
    8 bit data
    8 bit instruction
    8 bit input port
    8 bit output port
    4K bytes program memory on chip (ROM)
    8K bytes data memory on chip (RAM)
    64K program memory(external ROM)
    64K data memory (external RAM)
    16 bit counter
    16 bit data pointer
    16 bit stack pointer
    64k stack address

    1)Micro controller n bit-
    Its depend upon the requirement
    It may be 4bit , 8 bit, 16bit, 32 bit, 64bit.....etc
    I choose 8 bit micro controller

    2)ALU n bit -
    If the data is n bit. the ALU will be n bit
    It may be 4bit , 8 bit, 16bit, 32 bit, 64bit..... etc
    I choose 8 bit ALU

    3)data is n bit
    data bit may be 4bit , 8 bit, 16bit, 32 bit, 64bit ......etc
    I choose 8 bit data
    data is 8 bit wide

    4)instruction n bit
    It may be 4bit , 8 bit, 16bit, 32 bit, 64bit.....etc
    I choose longer instruction bit I have much room for address
    data bit and instruction bit may be different size
    If data is only 8 bit but instruction may be 8 bit 16 bit
    I choose 8 bit instruction

    5)Rom on chip
    Its depend upon How much big program we want to write
    It may be 256,512,1024,1K,2K,4K,8k,16K,32K,64K,128k,256k,512 k,1m,2m ......etc
    I choose 4k

    6) RAM on chip
    Its depend on how much data we want to store
    It may be 256,512,256 byte, 512byte,1k,2k,8k.........etc
    I choose 8k

    micro controller need external ROM and ROM
    7)external ROM 64K
    8)external RAM 64k

    9)program counter n bit
    it may be 8 bit ,16 bit........etc
    I choose 16 bit
    It can address 64k memory

    10)data pointer n bit
    It may be 8 bit 16bit... etc
    I choose 16 bit
    It can address 64k memory

    11) I choose 16 stack pointer and 64 address space

    I know its not enough to make micro controller. I need to know more
    please check out my features If somewhere I am wrong please tell me
     
  2. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    I would question the 8-bit instruction word. Also external program memory and RAM, most micrcontrollers do not have this, is there a reason you do need it?

    What is the purpose of this exercise? Surely you don't expect to compete with available microcontrollers. Is this a school project?

    Bob
     
  3. shumifan50

    shumifan50

    548
    56
    Jan 16, 2014
    There is such a vast selection of micros available in a huge range of configurations that the purpose of this seems futile. On top of which they normally have nicely integrated peripheral interfaces, unless we are talking real entry level micros. And they cost next to nothing.
     
  4. gorgon

    gorgon

    603
    24
    Jun 6, 2011
    Your address space and address pointers are not consistent. from the amount of 64k blocks, you would need at least 18bit address pointers, maybe more.

    A 64k stack makes it possible to live on it, at least compared with the rest of the specs.
     
  5. vead

    vead

    473
    14
    Nov 27, 2011
    no this isn't assignment. I always want to do advanced In school teacher teach only theory a thought came in my mind how does actually company like intel make micro controller so I started reading datasheet and I want make micro controller for my basic understanding

    I know about 8051. I am not familiar with other like PIC, ARM I am not going to design for company just for study purpose actually I don't have much information which things is useful and which may be not used in design
    can anyone give advice how to make advanced micro controller ?
     
  6. vead

    vead

    473
    14
    Nov 27, 2011
    I know there are lots of controller available but I want to know how does company like intel design micro controller?
     
  7. shumifan50

    shumifan50

    548
    56
    Jan 16, 2014
    Big companies don't design micro controllers for each new version. Instead they design the building blocks(modules) to do specific very limited tasks. For each micro controller they then combine the modules, according to design requirements, to assemble a micro controller.
    Most of the options you list are such modules. Each module has to be configured to suit the design CONSISTENTLY, which is what gorgon is saying. Before you can decide on instruction width, you need to know how many instructions you will support and how you will construct each instruction - only then will you know the width of the instruction. Once you now instruction width, you can decide how many instructions you want to support in your rom address space and therefore calculate the size of rom required. This style of logic has to be followed for each module.
    As far as the stack goes, you need to decide how deep you would like to be able to call from calls(including interrupts) and then you can decide on stack space required also considering what information will be pushed onto the stack by each push, interrupt etc.
    One of the main goals of each design is to provide maximum functionality with minimum components, like with most circuit design. Your 64K stack is an example of wasteful design. Typical stacks on small PICs are 3 or 4 levels deep.
     
    Last edited: Feb 27, 2014
  8. vead

    vead

    473
    14
    Nov 27, 2011
    that's matter I have made module like ALU, RAM, ROM, datapointer, counter.....etc I am having problem I can't decide how to assemble each component
     
  9. shumifan50

    shumifan50

    548
    56
    Jan 16, 2014
    I gave you 2 examples of how you arrive at your required configuration, one for instruction width and one for stack size. If we need to calculate each parameter for you then you are hardly designing the micro processor yourself.

    The parameters are not just 'known' or 'standard', they are based around requirements and that will even include exactly what you want to do with the micro controller or at least what it has to be capable of.
     
  10. kpatz

    kpatz

    318
    84
    Feb 24, 2014
    So, are you attempting to develop a microprocessor or a microcontroller? Based on your specs, it looks closer to a microprocessor with some on board ROM and RAM, relying on external support for peripherals, containing external address, data, and (sometimes) I/O buses. Microcontrollers have a number of peripherals built in, depending on the micro, and most of the pins are used for general I/O or I/O from built-in peripherals.

    99.9% of microcontroller designs don't need a 64K stack, but as long as it's a stack pointer into existing RAM instead of a dedicated stack, I don't see it as all that wasteful. It may be useful to be able to put the stack anywhere you want in the available space and make it as large or as small as needed.

    That said, microprocessors typically use a stack pointer into existing RAM, since the RAM is external and can be large (64K or so for an 8 bit processor, more for 16, 32 bit etc.) Microcontrollers are self contained, contain internal RAM and ROM (usually quite small), and most have a small, dedicated stack for calls and interrupts.
     
  11. shumifan50

    shumifan50

    548
    56
    Jan 16, 2014
    Have a look at some micro controllers manufactured by a company like Microchip and see how they configured their offerings. Select one closest to your requirements and then see if you understand why they chose their specific configuration. If you don't understand a specific choice, post here specifying the link to the one you selected and which bit you don't understand and we will try to help.
    Farnell,Digikey etc all list the micros quite nicely to make it easy to make a selection. They also provide the datasheets that document all the instructions etc and how it all works together.
     
  12. vead

    vead

    473
    14
    Nov 27, 2011
    I don't understand selection about instruction decoder we can use 5 bit , 9bit , or 13 bit so why we use 8 bit decoder. can you tell me the specific reason?
     
  13. shumifan50

    shumifan50

    548
    56
    Jan 16, 2014
    Go read the datasheet for one of the PICs and look at the instruction formats. If you cannot work out the reason for using a specific instruction size, post back here, reference the PIC and the specific instruction and what you don't understand. It should become quite clear if you do the required reading.
     
  14. kpatz

    kpatz

    318
    84
    Feb 24, 2014
    To determine instruction size, first you need to know how many instructions (opcodes) your processor is going to recognize. This will determine how many bits you need for the opcode. Additional bits can then be used to specify additional information for the instruction such as an operand or addressing mode bits.

    Another factor is whether you're using Von Neumann or Harvard architecture. Harvard architecture has separate program and data memory and is used by many microcontrollers. Von Neumann uses a single address space for both program and data (most microprocessors). The advantage of Harvard is that your instruction width can be different than your data width, and your program memory doesn't use up any data memory. For example, a mid range PIC has 14-bit instructions but works with 8-bit data. 5 bits are the opcode, one bit specifies the destination (where the "answer" is placed, either back in the register or in the working register), and the remaining bits are the operand--either a literal value, a register (data memory) address, or a program address destination for branch/jump/call instructions. The advantage of this is most instructions only take up one "word" of program space including the operand. On the PICs some opcodes use fewer bits in order to allow for more bits to be used for the operand (primarily jumps and calls that need more than 8 bits for a destination address).

    If your processor uses the Von Neumann architecture, your instruction width is typically the same as the data width, so an 8 bit processor would use 8-bit instructions. For most such processors, the instruction is broken out into 2 or more bytes, with the opcode in one byte (some bits may be used to specify source/destination or addressing mode) and the operand in the following byte(s). On such a processor, some instructions (those without an operand such as NOP) take up 1 byte, many take up 2, and some take up 3 or more (jumps/calls with absolute 16-bit addresses).
     
    Last edited: Feb 28, 2014
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-