Hello Geeks, in this tutorial I will introduce you with 8051 embedded family so Let’s start :
Table of Contents
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:
- Data Transfer Instructions
- Logic Instructions
- Bit Oriented Instruction
- Arithmetic Instructions
- 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;
for(i=0;i<t;i++)
for(j=0;j<1275;j++);
}
void main()
{
while(1)
{
S=0X0F;
msdelay(250);
S=0X00;
msdelay(250);
}
}
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:
Automobile:
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 .