Micro-controller Laboratory

Location: E-230

Faculty I/C: Prof. A.K. Aggarwal, Dr. Barsha Mali

Technician I/C: Mr. Sukhminder Singh


About Micro-controller Laboratory

The Micro-controller Laboratory focuses on study of instruction and logic knowledge with theory study amongst the students. The laboratory experiments are equipped to cater to curriculum needs of diploma, graduate and post graduate programs along with adequate course. Instruction and logic via different assembly language instructions are taught. The laboratory hosts variety of state-of-the-art micro-controller kits to enhance the practical knowledge of the students.

By employing micro-controller solutions, students can lower capital cost of the system, and system maintenance costs. This improves time to market and the quality of products. The devices present in the laboratory offer a wide range of micro-controller capabilities at a significantly lower cost than that of dedicated devices. As integrated circuit technology advances, and off-the-shelf components become cheaper and more powerful, so do the boards that use them. Depending on the particular application, the hardware available include digital input and output, counters, timers, interrupts, capabilities. During the study students become familiar to hardware and software of micro-controller.

Objectives and Strength of Laboratory

The objectives of the lab are:

  1. To write and debug assembly language programs having applications in engineering with the help of 8051 instruction set using 8051 Microcontroller Trainer kit.
  2. To highlight the architecture attributes for an 8051 microcontroller and to provide the students with a basic understanding regarding on-chip peripherals, such as digital I/O ports, Interrupts, Timers, etc.
  3. To enable the students to write Assembly language programs on 8051 Microcontroller Trainer kit and interface a microcontroller system to devices such as motors and sensors, to complete the programming and testing of a microcontroller based embedded system.


List of Equipment

S. No. Items Quantity
1 8031/8051 based microcontroller trainer kit with LCD, power supply and IBM compatible keyboard 5
2 8031/8051 microcontroller trainer kit 4
3 8031 microcontroller cum emulator 1
4 Emulator for 8751 EM 8751/89C51 1
5 Handy serial programmer 2
6 Parallel port universal programmer 2
7 EPROM eraser 4
8 Keil µVision 5 software (limited version)


List of Experiments

  1. To study 8051 micro-controller kit
  2. Write a program to display and flash “GOOD-51”
  3. To study assembly language of 8051 on µVision software.
  4. To show the contents of PSW register after the addition of
    1. 38H + 2FH
    2. 9CH + 64H
    3. BFH + 1BH.

    (in instructions, insert instruction ORG, SJMP and END)

  5. Show the stack and stack pointer for the following. Assume the default stack area and register 0 is selectedMOV R6, #25HMOV R1, #12HMOV R4, #0F3HPUSH 6PUSH 1PUSH 4

    (insert instruction ORG, SJMP and END)

  6. Write a program to
    1. clear accumulator
    2. add 3 to accumulator ten times.

    (insert instruction ORG, SJMP and END)

  7. Write a program to find sum of 79H, F5H and E2H. save the sum in registers R0 (low byte) and R5 (high byte).(insert instruction ORG, SJMP and END)
  8. Write a program to toggle all bits of port 1 by sending value 55H and AAH continuously. Put a time delay in between each issuing of data to port 1
  9. Write the following programs.
    1. Create a square wave of 50% duty cycle on bit 0 of port 1
    2. Create a square wave of 66% duty cycle on bit 3 of port 1.

    (insert instruction ORG, SJMP and END)

  10. A switch is connected to pin P1.0 and an LED to pin P2.7. Write a program to get the status of the switch and send it to the LED.(insert instruction ORG, SJMP and END).  (find error in program, make correction)
  11. Write a program to copy the value 55H into RAM memory location 40H to 45 using
    1. Direct addressing mode
    2. Register indirect addressing mode without a loop and
    3. With a loop

    (insert instruction ORG, SJMP and END)

  12. Write a program to clear 16 RAM location starting at RAM address 60H.(insert instruction ORG, SJMP and END)
  13. Write a program to copy a block of 10 bytes of data from RAM location starting at 35H to RAM location starting at 60H.(insert instruction ORG, SJMP and END)
  14. In this program, assume the word “SLIET” is burned into ROM location starting at 200H, and that the program is burned into ROM location starting at 0. Analyze how the program works and state where “GIN” is stored after the execution of this program.
  15. Assume that ROM space staring at 250H contains “SLIET”, write a program to transfer the bytes into RAM location starting at 40Ha) Using null character  b) Using null character for end of string
  16. Write a program to get the x value from P1 and send x2 to P2, continuously, using look-up table
  17. Write a program to find the biggest number from given set of memory location


Lab Manual for Microprocessor and Microcontroller Lab