There are mainly two categories of processors, namely, Von-Neuman (or Princeton) architecture and Harvard Architecture. These two architecture differ in the way data and programs are stored and accessed.
Microcontrollers based on the Von-Neuman architecture have a single “data” bus that is used to fetch both instructions and data. Program instructions and data are stored in a common main memory. When such a controller addresses main memory, it first fetches an instruction, and then it fetches the data to support the instruction. The two separate fetches slows up the controller’s operation.
The Von-Neuman architecture’s main advantage is that it simplifies the microcontroller design because only one memory is accessed. In microcontrollers, the contents of RAM can be used for data storage and program instruction storage. For example, the Motorola 68HC11 microcontroller Von-Neuman architecture.
Example : An Instruction “Read a byte from memory and store it in the accumulator” as follows:
Cycle 1:- Read instrution
Cycle 2:- Read data out of RAM and put into Accumulator
Microcontrollers based on the Harvard Architecture have separate data bus and an instruction bus. This allows execution to occur in parallel. As an instruction is being “pre-fetched”, the current instruction is executing on the data bus. Once the current instruction is complete, the next instruction is ready to go.
This pre-fetch theoretically allows for much faster execution than Von-Neuman architecture, on the expense of complexity. The Harvard Architecture executes instructions in fewer instruction cycles than the Von-Neuman architecture. For example,the intel MCS-51 family of microcontrollers and PIC microcontrollers uses Harvard Architecture.
The same instruction (as shown under Von-Newman architecture) would be executed as follows:
- Complete previous instruction
- Read the “Move Data to Accumulator” instruction
- Execute “Move Data to Accumulator” instruction
- Read next instruction
Hence each instruction is effectively executed in one instruction cycle.
For more info refer Types of Microcontroller