I have a a very basic question about how to design a microprocessor based system in contrast to a microcontroller based system. To have a better understanding of what i mean, i am presenting a general example.

Lets say I want to design an embedded system with 32 bit processor having ROM of 1MB and 1MB RAM @500MHz clock.

In micrcontrollers based system what i understand is, we simply burn our program into the internal ROM/Flash, when we power up, it starts with a reset PC(program counter)/IP(instruction pointer) which always indicates to the first RAM address from where the ALU unit begin fetching data from internal ROM/Flash and hence the execution of program starts.

In contrast to that, i assume we can not burn our program into the microprocessor chip as it doesnt have internal Flash for that purpose, so we burn the external ROM with our program, but than i dont understand how we tell the microprocessor to start the execution of the program written into the ROM etc.

As I mentioned my knowledge of digital world is not very limited, i have just used microcontrollers and that's it. I don't know the whole story inside microcontroller/microprocessor.

Can some one explain how the microprocessor starts its execution and how we program the discrete embedded system composed of microprocessor, external ROM and RAM ?

Please also provide some related material to study related to the topic.

I thank you all. Regards, Iftikhar

  • 3
    \$\begingroup\$ I think the procedure is almost identical to that of a microcontroller with the difference that the ROM is outside the CPU. Both MCU and CPU start at a certain memory addres and expect to find instructions there. That the ROM is outside the processor chip does not matter, the addressing works the same way. \$\endgroup\$ Commented Oct 1, 2015 at 13:56

1 Answer 1


Basically you read the processor's databook, which will tell you how it starts executing, and design the board so that the ROM is mapped to the appropriate address.

For example the Z80 will assume whatever it finds at address 0000 is a valid instruction and execute it. So, when resetting a Z80 after power on, you should map the ROM to address 0 and put your startup code there.

Later, you can map the ROM to another address or even select it out of the memory map altogether, but before you do that, typically you would load an actual OS like CP/M from floppy disk, into RAM, map the RAM to address 0, and either warm reset or simply jump to 0.

Other CPUs may start up in different ways, the 8086 starts at address FFFF0, but all have in common that their documentation tells you where this first instruction or Reset Vector is located.

  • \$\begingroup\$ Thanks for your reply. In case of Z80 it will assume whatever it finds at address 0000 is a valid instruction that is okay, but it brings me to another question how do we map a ROM to address 0 ? \$\endgroup\$
    – Sahil
    Commented Oct 1, 2015 at 21:10
  • \$\begingroup\$ That's a hardware design issue. You design the address decoder to enable the ROM when the MSBs of the address are 0. Later, you can write to a register in the address decoder to modify the address map, but this has to be what happens after a Power-On Reset. \$\endgroup\$
    – user16324
    Commented Oct 1, 2015 at 21:23
  • \$\begingroup\$ Thanks Brian, can you share some literature that specifically talk about the topic ? i could not find actually. \$\endgroup\$
    – Sahil
    Commented Oct 1, 2015 at 21:43
  • \$\begingroup\$ Should be covered in "The Art of Electronics" (Horowitz&Hill) and many other places \$\endgroup\$
    – user16324
    Commented Oct 1, 2015 at 22:17
  • \$\begingroup\$ @Iftikhar: Hennessy and Patterson Computer Architecture is more standard book for this level of abstraction. \$\endgroup\$ Commented Oct 1, 2015 at 23:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.