Skip to main content

Microprocessor vs microcontroller; 8051 addressing

Differentiate Microprocessor and Microcontroller highlighting its uses. Also explain the Addressing Modes of 8051 microcontroller.

Microprocessor versus microcontroller

PointMicroprocessorMicrocontroller
Chip containsCPU onlyCPU, RAM, ROM, I/O ports, timers, serial port
External chipsNeeded for memory and I/OFew or none
Size, cost, powerLarger, costlier, higher powerSmaller, cheaper, low power
InstructionsRich, for data processingBit-oriented, for control
SpeedHigh (GHz)Low (MHz)
UsesPCs, laptops, servers, workstationsEmbedded: washing machine, remote control, ATM, car ECU, toys
Examples8085, 8086, Core i78051, AVR, PIC, ARM Cortex-M

Addressing modes of the 8051

The addressing mode specifies where an instruction finds its operand.

ModeOperand isExampleMeaning
Immediatea constant in the instruction, marked with #MOV A,#25HA = 25H
Registerin R0-R7 of the active bank (or A, B)MOV A,R3A = R3
Directat an 8-bit internal RAM or SFR addressMOV A,30HA = RAM[30H]
Register indirectat the RAM address held in R0 or R1MOV A,@R0A = RAM[R0]
Indexedin code memory at base + offsetMOVC A,@A+DPTRA = ROM[DPTR + A]
  1. Immediate: the data is in the instruction: MOV R2,#10, MOV DPTR,#4000H.
  2. Register: the operand is in a register: ADD A,R5. Short and fast.
  3. Direct: the instruction holds the 8-bit address: MOV 40H,#5, MOV A,P1. It is the only way to access SFRs.
  4. Register indirect: R0 or R1 is a pointer: MOV A,@R1; with INC R1 it scans an array. External RAM: MOVX A,@DPTR.
  5. Indexed: for look-up tables in ROM: MOVC A,@A+DPTR, MOVC A,@A+PC, JMP @A+DPTR.
  6. Bit addressing: single bits are accessed with SETB P1.0, CLR C, JB P2.1,LABEL.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Embedded System chapter 9 questions →