µP
Virtual Laboratory

Microprocessors & Microcontrollers (MPMC) Laboratory

12 experiments · 8086 & 8051

Program real processors,
right in your browser.

Every experiment has a working simulator. 8086 programs are assembled with a MASM-compatible assembler and debugged in a DOSBox/DEBUG environment. 8051 programs are built in a Keil µVision-style IDE from assembly or Embedded C, and run on a virtual trainer board with LEDs, switches, relay, buzzer, seven-segment display, LCD, stepper motor and DAC.

Each page follows the same structure: Aim → Theory → Procedure → Pre-Lab Test → Simulator → Data & Analysis → Post-Lab & Feedback.

✍ Editable codeEdit any program, rebuild and see the effect immediately.
🔬 Real timingCycle-accurate 8051 timing, 12T or 1T core, slow motion down to 1/1000×.
🧪 Edge casesDivide overflow, busy LCD, missed stepper steps, ghosting and more.
📊 Auto-checked dataRecord runs, compare with theory, export as CSV.
🗣 Audio & visual aidsSpoken explanations, buzzer and relay sounds, animated data flow.
✅ Self-assessmentPre- and post-lab tests with instant hints.
🌓 Light & darkTheme toggle on every page.
💾 ProgressScores and tables are saved in this browser.

8086 Microprocessor Exp 1–4

0186
8086 · MASM/DOSBox

8086 Programming Environment and Basic Arithmetic

Set up DOSBox, MASM, LINK and DEBUG, then add two 16-bit numbers held in registers.

  • 1.1 Set up the environment (Hello program)
  • 1.2 Add two 16-bit numbers in registers
02±
8086 · MASM/DOSBox

Basic Arithmetic and Logical Operations (8086)

16-bit subtraction, addition of memory operands, and AND / OR / XOR on data in memory.

  • 2.1 Subtract two 16-bit numbers
  • 2.2 Add two 16-bit numbers stored in memory
  • 2.3 AND, OR and XOR on data in memory
03×÷
8086 · MASM/DOSBox

Multiplication and Division (8086)

8×8 and 16×16 unsigned multiplication and 16÷8 division with operands in memory.

  • 3.1 Multiply two 8-bit numbers (memory)
  • 3.2 Multiply two 16-bit numbers (memory)
  • 3.3 Divide a 16-bit number by an 8-bit number
04[ ]
8086 · MASM/DOSBox

Data Handling and Array Operations (8086)

Block transfer of N bytes/words, the smallest and largest values in an array, and counting the 0s and 1s in a byte.

  • 4.1a Block transfer of N bytes (REP MOVSB)
  • 4.1b Block transfer of N words (loop)
  • 4.2 Smallest and largest number in an array
  • 4.3 Count the 0s and 1s in a byte

8051 Microcontroller Exp 5–12

05µV
8051 · Keil + Nuvoton

Introduction to the 8051 Programming Environment

Keil µVision project set-up, building a HEX file, and programming a Nuvoton W78E052D with the ISP utility.

  • 5.1 A LED blink (assembly)
  • 5.1 B LED blink (Embedded C)
06A51
8051 · Assembly

8051 Assembly Language Programming

8-bit addition in internal RAM, subtraction in external RAM, block transfer, and bit manipulation.

  • 6.1 Add two 8-bit numbers in internal RAM
  • 6.2 Subtract two 8-bit numbers in external RAM
  • 6.3 Block transfer of N bytes in internal RAM
  • 6.4 Bit-manipulation operations
07💡
8051 · Embedded C

LED and Switch Interfacing Using Embedded C

Flash LEDs, alternate them, N-bit and ring counters, and mirror 8 keys onto LEDs on Port 3.

  • 7.1 Flash LEDs with a time delay
  • 7.2 Flash LEDs alternately
  • 7.3 N-bit counter and ring counter
  • 7.4 Read 8 keys and show them on Port 3 LEDs
08⚙
8051 · Embedded C

Relay, Buzzer, Switch and LED Interfacing Using Embedded C

Drive a relay and a buzzer through transistors, and select actions with two switches.

  • 8.1 Relay ON/OFF with a time delay
  • 8.2 Buzzer ON/OFF with a time delay
  • 8.3 Switch-selected actions (8.4–8.7)
098.8
8051 · Embedded C

Seven-Segment Display Interfacing Using Embedded C

Four common-anode displays in multiplexed mode: hex digits 0–F and the number 1234.

  • 9.1 Interface test: light every segment
  • 9.2 Display hex digits 0 to F
  • 9.3 Display 1234 (multiplexed)
10LCD
8051 · Embedded C

LCD Interfacing Using Embedded C

Initialise an HD44780 16×2 LCD in 8-bit mode and display messages.

  • 10.1 A Display two messages
  • 10.1 B Scrolling message
  • 10.1 C Live counter (number → ASCII)
11⟳
8051 · Embedded C

Stepper Motor Interfacing

Clockwise and anticlockwise rotation, direction by switch, and rotation by N steps.

  • 11.1 A Clockwise then anticlockwise
  • 11.1 B Direction selected by a switch
  • 11.2 Rotate by N steps
12∿
8051 · Embedded C

DAC Interfacing and Waveform Generation

Generate square, ramp and triangular waveforms (plus a sine table) with a DAC0808.

  • 12.1 A Square wave
  • 12.1 B Ramp (sawtooth) wave
  • 12.1 C Triangular wave
  • 12.1 D (Extension) Sine wave from a table

How to use this lab

  1. Open an experiment and read the Aim and Theory.
  2. Take the Pre-Lab Test.
  3. In the Simulator choose a sub-task, build, run and step. Then edit the code and explore the edge cases.
  4. Record your results in Data & Analysis and write your conclusion.
  5. Finish with the Post-Lab Test and the self-evaluation.

The simulators model the 8086 instruction subset used in these experiments and a W78E052D/8051 with its peripherals. Timing for Embedded C uses an estimated cycle model; calibrate against Keil's stopwatch on real hardware.