You are currently viewing 8051 basic overview embedded c
8051 Basic Overview - Simple Embedded C Code

8051 basic overview embedded c

Spread the love

Hello Geeks, in this tutorial I will introduce you with 8051 embedded family so Let’s start :

8051 Basic Overview - Simple Embedded C Code
8051 Basic Overview – Simple Embedded C Code

Pin detail (8051) in Embedded c :

  • Port0 (Pins 32-39) – AD0/AD7 and P0.0 to P0.7
  • Port1 (Pins 1 to 8) – P1.0 to P1.7
  • Port2 – (Pins 21 to 28) – P2.0 to P2.7 and A8 to A15
  • Port3 – (Pins 10 to 17) – P3.0 to P3.7
  • P3.0 – is used as RXD pin for serial communication.
  • P3.1 – TXD pin for Serial Transmit Data.
  • P3.2 – External Interrupt0 Pin, INT0
  • P3.3 – External Interrupt1 Pin, INT1
  • P3.4 – T0 – Clock Input for counter0.
  • P3.5 – T1 – Clock Input for counter1.
  • P3.6 – WR – Signal to write to the external memory.
  • P3.7 – RD – Signal to read from the external memory.
  • Vcc – 5V supply
  • Vss – Ground
  • XTAL2/XTAL1 – Oscillator Input
  • RST – Restart 8051
  • ALE – Address Latch Enable
  • PSEN – Program Store Enable

Which 8051 Instructions Set in Embedded System ?

We know that Basically 8051 instruction set is divided into 5 groups like:

  1. Data Transfer Instructions
  2. Logic Instructions
  3. Bit Oriented Instruction
  4. Arithmetic Instructions
  5. Branch Instructions

How to write simple embedded c code ?

Lets we write a simple code to Blink LED in simple way. so in hardware specific code, we use hardware peripherals like different ports, timers etc. 

#include <reg52.h>

void msdelay(unsigned int t)


unsigned int i,j;




void main()










Some FAQ about embedded 8051 :

What are different basic applications of a microcontroller?

Medical Instruments: ( X-RAY)
Communication: (Full duplex)
Office Equipment: (WAN Equipement)
Electronics Products:  Robots, Washing Machine, Toys, Cameras,Microwave Ovens etc.
Multimedia Application: 

Why microcontroller is used in embedded system?

There are certain advantages and reason to use Microcontroller in embedded like They contain the memory, and I/O peri. as well as the CPU one the same chip and good in performance and flexibility.

Summary :

In this article we saw 8051 basic overview – simple embedded c code i.e. Pin detail of 8051/ instruction set .

sachin Pagar

I am Mr. Sachin pagar Embedded software engineer, the founder of Sach Educational Support(Pythonslearning), a Passionate Educational Blogger and Author, who love to share the informative content on educational resources.

Leave a Reply