Need basic info about Programming microprocessor and its principle of operation

embeddedmicroprocessor

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

Best Answer

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.