8051

From SEGGER Wiki
Revision as of 01:14, 4 June 2019 by Rolf (talk | contribs)
Jump to: navigation, search

8051 is a term for Intel's MCS-51 single chip microcontroller (MCU). It was one of the first microcontrollers ever. The instruction set is still in use in a lot of modern designs. Modern implementations are usually "pipelined" and execute a single instruction in a single cycle, so they are much faster than the original design.

Memory architecture

Internal RAM (IRAM)

Special fuction registers

External RAM (XRAM)

Program Memory (PMEM)

Registers

The classic 8051 has the following registers:

  • PC - 16-bit Program Counter. Contains the address to read the next instruction from
  • A - Accumulator. 8-bit register used by most instructions. Memory mapped to 0xE0.
  • B - 8-bit registers used as extension to A for multiply and divide. Memory mapped to 0xF0.
  • SP - 8-bit Stack pointer.
  • DP - Data Pointer. 16-bit register used by instructions accessing PMEM and XRAM.Memory mapped to 0x82-83
  • PSW - Program Status Word. 8-bit register containing various flags.
  • R0-R7 - 4 banks of 8 8-bit general purpose registers. Memory mapped to 0x0 - 0x1f, where the first bank uses the first 8 bytes from 0..7. The selected bank is chose by the 2 RSB bits in the PSW.

Instruction set