0% found this document useful (0 votes)
7 views

Exercise-14(Microcontroller-Intro)

The document provides an overview of the 8051 microcontroller, detailing its features, capabilities, and the setup of an associated lab trainer kit. It includes an exercise to develop an assembly language program for swapping register contents, along with step-by-step instructions for executing the program using KEIL software. The 8051 microcontroller is characterized as an 8-bit processor with integrated RAM, ROM, and various I/O capabilities.

Uploaded by

houndclegane860
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Exercise-14(Microcontroller-Intro)

The document provides an overview of the 8051 microcontroller, detailing its features, capabilities, and the setup of an associated lab trainer kit. It includes an exercise to develop an assembly language program for swapping register contents, along with step-by-step instructions for executing the program using KEIL software. The 8051 microcontroller is characterized as an 8-bit processor with integrated RAM, ROM, and various I/O capabilities.

Uploaded by

houndclegane860
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 25

PRESIDENCY UNIVERISTY, BENGALURU

School of Engineering

Microprocessors and Microcontroller Lab


CSE 254

IV Semester 2018-19
8051 Microcontroller
Experiments
Microcon-
troller
Microprocessor Vs Microcon-
troller
• 8051 is an 8-bit family of microcontroller developed by Intel in the year 1981.

• This microcontroller was also referred as “system on a chip” because it has 128 bytes

of RAM, 4Kbytes of ROM, 2 Timers, 1 Serial port, and four ports on a single chip.
• The CPU can work for only 8bits of data at a time because 8051 is an 8-bit proces-

sor. In case the data is larger than 8 bits then it has to be broken into parts so that

the CPU can process conveniently.


• This 8051 Trainer kit could act as a standalone unit, the kit can be programmed and

evaluated without using PC. This 8051 Trainer kit has an option to connect PC’s

101/104 Keyboard, to enter user programs in Assembly languages. Serial communi-

cation achieved using 8051. It also supports C & assembly language using PC. It’s

designed as to facilitate On-board Programmer for NXP 8051 MCU through ISP on

serial port.
8051 PIN Dia-
gram
Key Features of 8051 Lab Trainer Kit
•Devices : 80C51(Intel)
•Operating Frequency : 10MHz crystal
•40-pin IC base | 40pin-ZIF Socket (optional) for MCU
•32KB-SRAM for user Data
•32KB-EEPROM for Monitor Program
•2x16 Char LCD display
•24 I/O Pins for (8255)
•32 I/O Pins for 8051 (MCU-P89V51RD2)
•40-Pin FRC connector for Bus Extension
•20-Pin FRC connector Add-on Interface from 8255
•9-pin DB connector for UART (RS232) interface
•ISP Programming for (MCU-P89V51RD2)
•101 PC Type keyboard to enter user address/data commands
•Separate Jumper for INT/EXT memory selection
•P89V51RD2 (NXP) - | 64K FLASH (OPTIONAL)
•2X16 LCD
•Baud rate(Seven different selectable Baud rates from 150 to 9600)
Exercise- 14:
Design and develop 8051 ALP program to
store values in Registers and
swap the contents of Registers
Description: We store values 10H,20H,30H,40H in Registers R1,R2,R3, and R4 respec-
tively and exchange data stored in Registers R1 with R2 and data stored in Registers R3
with R4.

ORG 0000H
MOV R1, #10H
MOV R2, #20H
MOV R3, #30H
MOV R4, #40H
MOV A, R1
XCH A, R2
MOV R1,A
MOV A,R3
XCH A,R4
MOV R3,A
END
Steps to Execute 8051 ALP using KEIL software:
1. Create a new folder for project to avoid getting mixed
up with files
2. Give some name and click SAVE
3. When prompted, se-
lect proper device
that you're using ( i-e
ATMEL > AT89C51 )
4. When prompted, select YES
5. Click NEW button and write your code
(Assembly or C language)
6. SAVE the file with proper extension as above
7. The code you have written gets highlighted
8. Right click SOURCE GROUP 1 as shown
9. Add the code you have written into the Project workspace
10. Go to options for the project
11. Enable HEX file generation
(only If using 8051 microcontroller KIT)
12. Build the project
13. Notice successful build. Ignore the warnings
14. Use this HEX file to program your IC

You might also like