0% found this document useful (0 votes)
252 views1 page

How To Progamme A 8051 MCU in Multisim

This document provides instructions for programming an 8051 microcontroller chip (MCU) in Multisim. It defines three LED pins as outputs, writes a main function that turns on each LED for 5 seconds by calling a delay function, and includes a delay function that uses nested for loops to pause the program. A schematic diagram is referenced but not shown.

Uploaded by

Teo Java
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
252 views1 page

How To Progamme A 8051 MCU in Multisim

This document provides instructions for programming an 8051 microcontroller chip (MCU) in Multisim. It defines three LED pins as outputs, writes a main function that turns on each LED for 5 seconds by calling a delay function, and includes a delay function that uses nested for loops to pause the program. A schematic diagram is referenced but not shown.

Uploaded by

Teo Java
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

How to Progamme a 8051 MCU in Multisim?

#include<htc.h>
#define led_1 P20
#define led_2 P21
#define led_3 P22
void delay(int a);
void main()
{
led_1=1;
led_2=0;
led_3=0;
delay(5);
led_1=0;
led_2=1;
led_3=0;
delay(5);
led_1=0;
led_2=0;
led_3=1;
delay(5);
/* Insert your code here. */
}
void delay(int a){
int i;
int j;
for(i=0;i<a; ++i){
for(j=0; j<500; ++j){
}
}

chematic Diagram:

http://efalcons.blogspot.com/2017/02/how-to-progamme-8051-mcu-in-multisim.html

You might also like