Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

8051 Microcontroller simulation Problem Description: Using 8051 Microcontroller to activate/deactivate a LED Circuit components: 8051 mc (AT89C51) Resistor (Generic resistor symbol) . LED (Active)

image text in transcribed

8051 Microcontroller simulation Problem Description: Using 8051 Microcontroller to activate/deactivate a LED Circuit components: 8051 mc (AT89C51) Resistor (Generic resistor symbol) . LED (Active) Procedure: 1. Open new project 2. Select the Cet components from the library +4443 00 290 BARGA TAOxna 3. Connect the Cct components as shown in the figure: D1 LED-BIRY U1 XTAL PO DIADO PO 1 AD1 PO 2 AD2 XTAL2 PO 3AD3 PO4AD4 RST POSADS POBADE PO 7AD7 P20AB P2.1AD P2210 PSEN 23/11 P2412 P25A13 P26A14 P27A15 P3RXD R1 P10 2708 P1.1 P12 P1.3 P14 P15 P3 1/TXD P32IND P34/TD P35/T1 P18 P36/WR P1.7 P37/RD AT89C51 4. Connect the resistor to 8051 PIN1. 5. Connect the LED to the resistor 6. Add power source and sink from the terminal mode (GND). 7. Change the resistor value by editing the properties (2702). 8. Add the program file to the project folder. 9. Save then run the project. Using Keil compiler to write the microcontroller program: 1. Create a folder on desktop for the program file. 2. Open Keil compiler then create new project from project menu. 3. Create a new file to keep all project files inside that folder. 4. Select the microcontroller manufacturer (AT89C51) from the list (ATMEL). 5. Create a new file and save it with extension as .c program for 8051. 6. Add this C file to the project by adding it to the source group 1. 7. Write the program code demo.c o #include sbit led = P1^0; 0 void main() 04 { led = 0; //sets the pin as output 11 12 } while (1) ( led = 1; led = 0; 8. Configure the project by changing the target option, set crystal frequency to 11.0592 then create the hex file. 9. Save the project then build it. 10. Load the hex file into the 8051 microcontroller. 11

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Analysis And Design Of Linear Circuits

Authors: Roland E. Thomas, Albert J. Rosa, Gregory J. Toussaint

10th Edition

1119913020, 978-1119913023

More Books

Students also viewed these Accounting questions