Micro controller


A google classroom is created for learning the basics of 8051 Microcontroller and query solving.

Install “Google Classroom” application and join my classroom suing code “73fors“.

8051 Microcontroller Notes:

Review of Basics for Microcontroller

8051 Architecture

Assembly Language Programming of 8051

8051 Instruction Set

Logical Operations Instructions of 8051

Arithmetic & Logical Operations Instructions of 8051

Moving Data Operations Instructions of 8051

Jump, Loop and Call Instructions

Time Delay Calculations using Loop or Nested Loop Method

Input Output Port Programming

Timer/Counter Programming

Programming in C

Use the circuit diagram given below to make 8051 circuit on General Purpose Board.


8051 Microcontroller Programming:

Download latest Keil µVision Software for C51.
Website link (select C51, then fill in the details and submit to download software)
Install the software using downloaded file.

Refer this link on how to use Keil µVision for programming of 8051.

To upload the program onto 8051 Micro-controller, connect the circuit given above to Computer using RS232 cable and use Flash Magic software, provided by Flashmagictool.com, which is specifically used for NXP make P89V51RD2 micro-controller ICs.

Download link: Flash Magic Tool

Given below are the links to understand topic-wise programs in assembly language for 8051.

Moving Data operations

Arithmetic Operations (Refer to Arithmetic & Logical Operations Instructions of 8051)

Logical Operations

Jump, Loop and Call instructions

Time Delay Calculations

Input Output Port Programming


Below are some of the assembly language program files for 8051.

Keep in mind to add given individual file to project work-space in Keil µVision software for C51, other-wise it will not work.

Also, take note that these files are for 8051 micro-controller family only, if used for any other micro-controller will damage it internally.

  1. Store Byte
  2. Copy 16 bit Contents
  3. Store byte in different Register Bank
  4. Word Addition
  5. 1s Complement
  6. 2s Complement
  7. Binary to BCD
  8. BCD Addition
  9. Unpacked to Packed Conversion
  10. Unpacked BCD Multiplication
  11. Block Addition
  12. Block Addition with 16 bit result
  13. Block addition with Data in External Memory
  14. Non Overlap Block Transfer
  15. Non Overlap External Memory Block Transfer
  16. Count numbers of 1s and 0s
  17. Count numbers of Positive Numbers
  18. Count numbers of Negative Numbers
  19. Search a Byte
  20. Find Largest Number
  21. Find Smallest number
  22. Byte Addition
  23. Byte Subtraction
  24. Mask Lower Nibble
  25. Mask Upper Nibble
  26. Ascending Order
  27. Descending Order
  28. External Byte Multiplication
  29. External Byte Division
  30. Multiply using Successive Addition
  31. Word Subtraction
  32. Binary to Gray Conversion
  33. Overlapped Block Transfer
  34. Average of n Nos.
  35. Reverse a Block and Transfer
  36. 16 bit BCD Addition
  37. Shift 8 bit Data
  38. Shift 16 bit Data
  39. Parity Checking
  40. Matrix Addition
  41. Matrix Subtraction
  42. Square of a number
  43. Factor of a number
  44. Find LCM
  45. Find GCD
  46. Fibonacci Series
  47. Generation of Square Waveform of 50 Hz frequency
  48. Generation of Square Waveform of 2 kHz frequency
  49. Generation of Square Waveform of  750 Hz and 500 Hz based on Input Pin State
  50. Generation of different frequency Square Waveform based on Pin State of 2 Input Pins
  51. Comparison of Triangular Waveform and DC Signal
  52. Comparison of Sawtooth Waveform and DC Signal
  53. Generation of Sinusoidal Waveform
  54. Generation of 50 Hz Sinusoidal Waveform

More assembly language programming will be added soon.

Some of the Embedded C language programs.

  1. Generation of 50 Hz Square Waveform 
  2. Generation of 2 kHz Square Waveform 
  3. Generation of 750 Hz and 500 Hz Square Waveform based on Input Pin State
  4. Generation of multiple frequency Square Waveform based on Pin State of 2 Input Pins
  5. Generate of Sine Waveform
  6. Generation of 50 Hz Sine Waveform

More C language programs will be added soon.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s