Proteus software LED interface with 8051
How to use Proteus software for embedded systems?
The Proteus software is very useful in Embedded system, without hardware, you can do project testing with library components using in Proteus software.
In this software have so many components to use electronics parts available to do the test project without wasting time on hardware part.
| Microcontroller-Proteus software-image-1 |
Let's start to do project in Proteus software, open new project gives file name or project name then open the Proteus software application, here you need to check the particular components to interface with 8051, like as resistor, capacitor, diode, transistors, regulator so on...
For example, project name is LED blink interface with 8051 microcontrollers. Here you need embedded c code or program on LED on and off with delay function.
Sample Embedded LED blink C Code:
#include<reg52.h>
Sbit LED = P2^0; // connect Port2.0 in 8-bit i/o pin microcontroller LED pin
void Delay(void);
void main (void)
{
while(1)
{
LED = 0; // LED OFF
Delay(50);
LED = 1; // LED ON
Delay(50);
}
}
void Delay(void)
{
int j;
int i;
for(i=0;i<10;i++) //Delay function
{
for(j=0;j<2000;j++)
{
}
}
The above embedded c code must use in Keil C51 software, already we have posted on Keil C51 Software, how to use the C code in software. After settings in Keil software you can rebuild button in Keil software, there shows error and warnings. if you got error you need to rectify, the above code is successful execute in microcontroller.
In Keil software must enable Hex file and give crystal frequency is 11.0592Mhz.
| Proteus software microcontroller settings |
Then, after generating click on rebuild in Keil software, you will get Hex with file name. Now, open Proteus software, click on components library search microcontroller and LED just connect respective pins from Embedded C program.
| Microcontroller with LED blink green |
Double click on microcontroller you will get pop up give crystal oscillator and hex file, then click OK. then after click play button, now see LED will blink with some delay function.
Conclusion:
As per my understanding, is how to do program in Embedded c by using pins configuration design in Microcontroller, some have delay on Timer, counter, Interrupt. Just simple edit the code with Relay of "LED" to Relay, if you use relay, you can change the name "Relay". connection between microcontroller to Relay interface. Take single channel 5v 10amp Relay to use in project.
Latest Computer Stuff Kit Solutions of Topics 36.
How to use 2x16 LCD 8-bit mode Display in Microcontroller?
Latest PC assembled for high configuration for video editing software?
Comments