The short answer
The difference is about how the processor reaches its instructions and its data:
- Von Neumann architecture uses one memory space and one bus for both. The CPU fetches an instruction, then uses the same path to read or write data, one after the other.
- Harvard architecture uses separate memories and separate buses for instructions and data, so the CPU can fetch the next instruction while it reads or writes data.
Most microcontrollers lean towards Harvard because it lets a simple, low-clock-speed core get more done per cycle. In practice, though, nearly every modern chip is a modified Harvard design that mixes features of both, and the label tells you less than it used to.
Von Neumann architecture
In a von Neumann machine, program code and data sit in a single address space and travel over a single set of address and data lines. To the CPU, an instruction is just another value stored at an address.
That brings some real advantages:
- Simplicity. One memory interface, one bus, one address map.
- Flexibility. Any memory can hold code or data. A program can load code into RAM and run it, which is how a PC loads programs from disk.
- Easy pointers. A single pointer type can reach anything in memory.
The von Neumann bottleneck
The drawback is that instruction fetches and data accesses compete for the same bus. If an instruction needs to load a value from memory, the CPU can’t fetch the next instruction at the same moment. This limit on throughput is known as the von Neumann bottleneck.
Desktop and server processors hide much of this with caches and pipelining. A small microcontroller has far fewer tricks available, so the bottleneck matters more.
Harvard architecture
The name comes from the Harvard Mark I, an early computer that read instructions from punched tape and kept data separately in electromechanical counters.
In a Harvard design:
- Program memory (usually flash in a microcontroller) holds instructions and connects to the CPU through its own bus.
- Data memory (usually SRAM) holds variables and the stack, connected through a second bus.
- The two memories can have different word widths. An AVR’s program memory is organised in 16-bit words while its data memory is 8-bit; mid-range PIC chips use 14-bit instructions with 8-bit data.
Because instruction fetch and data access happen in parallel, a Harvard core can often complete one simple instruction per clock cycle without complex caches. That’s a good fit for small, cheap, low-power chips.
The trade-off is reduced flexibility. Code and data live in different address spaces, so the address 0x0100 can mean one thing in program memory and something different in data memory. Reading a constant stored in program memory needs special instructions, and in a strict Harvard design the CPU can’t execute instructions from data RAM at all.
Comparison table
| Von Neumann | Harvard | |
|---|---|---|
| Memory for code and data | Shared | Separate |
| Buses | One shared bus | Separate instruction and data buses |
| Simultaneous fetch and data access | No | Yes |
| Instruction and data widths | Same | Can differ |
| Running code from RAM | Possible | Not possible in a strict design |
| Reading constants from code memory | Ordinary load | Special instructions or compiler support |
| Hardware complexity | Lower | Higher (two memory interfaces) |
| Typical use today | Some low-power MCUs, simple cores | Most MCUs and DSPs, in modified form |
Modified Harvard: what most chips actually use
Pure Harvard and pure von Neumann designs are both uncommon in modern microcontrollers. “Modified Harvard” covers a range of compromises, most often:
- Separate buses, shared address map. The core has separate instruction and data buses for speed, but everything appears in one unified address space. To the programmer it feels like von Neumann.
- Separate address spaces with a bridge. Code and data stay in separate spaces, but there are instructions that can read data from program memory, such as AVR’s
LPMor 8051’sMOVC. - Split caches. Larger processors, including desktop CPUs and high-end microcontrollers, use separate instruction and data caches backed by one unified main memory.
It helps to separate two questions that are often blurred together:
- Bus architecture: are there separate physical paths for instructions and data?
- Address-space layout: does the programmer see one memory map or two?
A chip can be “Harvard” on the first question and “von Neumann” on the second, which is why different sources sometimes give different labels for the same part.
Which microcontrollers use which?
AVR (Arduino Uno)
The ATmega328P on the Arduino Uno is a classic Harvard design. Program code sits in 32 KB of flash, organised as 16-bit words, and data lives in a separate 2 KB SRAM space. The CPU can’t run code from SRAM, and reading constants from flash requires the LPM instruction. Our article on microcontroller memory types covers these memories in more detail.
PIC
Microchip’s 8-bit PIC families are Harvard designs with instruction words wider than the data path: 12-bit, 14-bit or 16-bit instructions depending on the family, with 8-bit data.
8051
The 8051 keeps separate address spaces for code memory and data memory, with a further external data space. Constants in code memory are read with MOVC and external data with MOVX. C compilers for the 8051 use keywords such as code and xdata to say which space a variable belongs in.
MSP430
TI’s MSP430 is generally described as von Neumann. Flash, RAM and peripheral registers share one address space and one memory bus, and the CPU can execute code from RAM.
ARM Cortex-M
Here the labels depend on the core:
- Cortex-M0 and M0+ use a single bus interface for both instructions and data, which is a von Neumann bus arrangement.
- Cortex-M3 and M4 have separate instruction and data bus interfaces, so they’re usually called Harvard, or modified Harvard.
- Cortex-M7 adds separate instruction and data caches and tightly coupled memories.
In every case, Cortex-M presents one unified 4 GB address map. Flash, SRAM and peripherals all have ordinary addresses, a normal C pointer can reach any of them, and code can run from SRAM. So a Cortex-M3 has Harvard buses but a von Neumann programming model. If you’re comparing Arm cores more broadly, see our guide to Cortex-M vs Cortex-A vs Cortex-R.
What it means for your code
On most 32-bit chips you can ignore the distinction day to day. On 8-bit Harvard chips it shows up directly in your code.
Constants and strings on AVR
Because flash and SRAM are separate spaces on AVR, a normal const array or string literal is copied into SRAM at startup, so ordinary pointers can read it. With only 2 KB of SRAM on an Uno, long strings and lookup tables can quickly use up RAM.
The workaround is to keep them in flash and read them with special functions:
#include <avr/pgmspace.h>
const char message[] PROGMEM = "Stored in flash, not SRAM";
char c = pgm_read_byte(&message[0]);
In Arduino code, the F() macro does the same thing for printed strings:
Serial.println(F("This text stays in flash"));
On a chip with a unified address map, such as a Cortex-M, const data normally stays in flash and is read with ordinary pointers, so none of this is needed.
Running code from RAM
Some tasks need code to run from RAM: reprogramming the chip’s own flash while it can’t be read, or speeding up a time-critical routine on a part where flash access involves wait states. This is routine on Cortex-M and MSP430, where the linker can place selected functions in RAM. On a strict Harvard part like the AVR it isn’t possible, so bootloaders use dedicated hardware support for writing flash instead.
Self-modifying code and code injection
A von Neumann machine can, in principle, write instructions into memory and then execute them. That’s flexible, but it also means a buffer overflow could inject executable code. A strict Harvard design can’t execute from data RAM, which removes that particular route, although it doesn’t make a device secure on its own. On unified-address chips, a memory protection unit can mark RAM as non-executable to get a similar effect.
Does it matter when choosing a microcontroller?
Rarely, on its own. Clock speed, memory size, peripherals, power use, toolchain and price matter far more for most projects. The architecture label is more useful for understanding behaviour you’ll run into:
- why strings eat RAM on an Arduino Uno but not on an ARM board
- why some chips can run code from RAM and others can’t
- why some datasheets list separate “program memory” and “data memory” maps
It’s also a common exam and interview topic, so it’s worth knowing the textbook definitions and the modified-Harvard caveat. For the bigger picture of how the processor, memory and peripherals fit together, see our overview of embedded system architecture. For more on the buses that connect them, see what a bus is in embedded systems.
Summary
- Von Neumann: one memory and one bus for code and data. Simple and flexible, but fetches and data accesses compete for the bus.
- Harvard: separate memories and buses. Fetch and data access happen in parallel, and the two memories can have different widths, at the cost of flexibility.
- Modified Harvard: what most modern chips use. Usually separate buses or caches with some way to cross between code and data, often a single unified address map.
- Examples: AVR, PIC and 8051 are Harvard; MSP430 is von Neumann; Cortex-M3/M4/M7 have Harvard buses with a unified address space, and Cortex-M0/M0+ use a single bus.
- In practice: it matters most on 8-bit Harvard chips, where constants in flash need
PROGMEM-style handling.