Write a program to send 70H to port 0 and 90H to port 3 of 8051
Hi... in this article we will talk about how to send a hexa-decimal value in port 0 and port 3 of 8051 microcontroller and display those values to 7 segment display.
The microcontroller weare using is AT89C51.
This microcontroller consists of 4 communication ports which are also knows as port 0, port 1, port 2 and port 3.
All ports are internally pull-up except the port 0.
To communicate with the port 0 we need to manually pull-up the port 0 with a resistor and a power supply.
The simulation software I used was proteus and for creating the program hex file I used keil micro vision 5.
In simulation process you need to write the embedded c program and convert it into a hex file with the help of keil software and upload the code on 8051 microcontroller using the proteus simulator, this entire process will simulate the project like a real hardware project.
Code
#include <reg51.h>
void main()
{
P0= 0x70;
P3= 0x90;
}
CONNECT WITH US