Specifications

mikroElektronika | Free Online Book | PIC Microcontrollers | Introduction: World of Microcontrollers
Microcontrollers using this architecture have only one memory block and one 8-bit data bus. As all data
are exchanged by using these 8 lines, this bus is overloaded and communication itself is very slow and
inefficient. The CPU can either read an instruction or read/write data from/to the memory. Both cannot
occur at the same time since the instructions and data use the same bus system. For example, if some
program line says that RAM memory register called “SUM” should be incremented by one (instruction: incf
SUM), the microcontroller will do the following:
1. Read the part of the program instruction specifying WHAT should be done (in this very case it is the “incf” instruction for increment).
2. Read further the same instruction specifying upon WHICH data it should be performed (in this very case it is the “SUM” register).
3. After being incremented, the contents of this register should be written to the register from which it was read (“SUM” register address).
The same data bus is used for all these intermediate operations.
Harvard Architecture
Microcontrollers using this architecture have two different data buses.
One is 8 bits wide and connects CPU to RAM. Another consists of
several lines (12, 14 or 16) and connects CPU to ROM. Accordingly, the
CPU can read an instruction and perform a data memory access at the
same time. Since all RAM memory registers are 8 bits wide, all data
within the microcontroller are exchanged in the same such format.
Additionally, during program writing, only 8 bits data are considered.
In other words, all you can ever change from within the program and
all you can affect will be 8 bits wide. A program written for some of
these microcontrollers will be stored in the microcontroller internal
ROM upon having being compiled into machine language. However,
these memory locations do not have 8, but 12, 14 or 16 bits. The rest
of bits- 4, 6 or 8- represents the instruction itself specifying to the CPU
what to do with the 8-bit data.
The advantages of such design are the following:
All data in a program is one byte (8 bit) wide. As the data bus used for program reading has several lines (12, 14 or 16), both instructions
and data can be read simultaneously by using these spare bits. Therefore, all instructions are executed in only one instruction cycle. The
only exception is jump instruction which is executed in two cycles.
Owing to the fact that a program (ROM) and temporary data (RAM) are separate, the CPU can execute two instructions simultaneously.
Simply, while RAM read or write is in progress (the end of one instruction), the next program instruction is being read via another bus.
When using microcontrollers with von-Neumann architecture one never knows how much memory is to be occupied by some program.
Basically, each program instruction occupies two memory locations (one contains information on WHAT should be done, whereas another
http://www.mikroe.com/en/books/picmcubook/ch0/ (27 of 30)5/3/2009 11:28:39 AM