0% found this document useful (0 votes)
65 views15 pages

Embeddded Lab Manual

The document describes experiments related to microcontrollers and IoT. It includes experiments on 8051 and Arduino programming, communication with sensors and cloud platforms, and designing IoT systems. The experiments cover topics from low-level assembly and C programming to networking and cloud-based data logging.

Uploaded by

kuralamudhu
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)
65 views15 pages

Embeddded Lab Manual

The document describes experiments related to microcontrollers and IoT. It includes experiments on 8051 and Arduino programming, communication with sensors and cloud platforms, and designing IoT systems. The experiments cover topics from low-level assembly and C programming to networking and cloud-based data logging.

Uploaded by

kuralamudhu
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/ 15

EX.NO DATE EXPERIMENTS Pg.

No MARKS STAFF SIGN

1. Write 8051 Assembly Language

experiments using simulator.

2. Test data transfer between registers

and memory

3. Perform ALU operations.

4. Write Basic and arithmetic

Programs Using Embedded C.

5. Introduction to Arduino platform

and programming

6. Explore different communication

methods with IoT devices (Zigbee,

GSM, Bluetooth)

7. Introduction to Raspberry PI

platform and python programming

8. Interfacing sensors with Raspberry

PI

9. Communicate between Arduino

and Raspberry PI using any

wireless medium

10. Setup a cloud platform to log the

data

11. Log Data using Raspberry PI and

upload to the cloud platform


12. Design an IOT based system

EXP NO:
8051 Assembly Language program using Keil simulator
DATE

AIM:
To write 8051 Assembly Language Program for an 8-bit addition using Keil simulator and
execute it.

SOFTWARE REQUIRED:

S.No Software Requirements Quantity


1 Keil μvision5 IDE 1

INTRODUCTION TO 8051 SIMULATORS:

A simulator is software that will execute the program and show the results exactly to the
program running on the hardware, if the programmer finds any errors in the program while
simulating the program in the simulator, he can change the program and re-simulate the code and
get the expected result, before going to the hardware testing. The programmer can confidently
dump the program in the hardware when he simulates his program in the simulator and gets the
expected results.
8051 controller is a most popular 8-bit controller which is used in a large number of
embedded applications and many programmers write programs according to their application. So
testing their programs in the software simulators is a way. Simulators will help the programmer to
understand the errors easily and the time taken for the testing is also decreased.
These simulators are very useful for students because they do need not to build the complete
hardware for testing their program and validate their program very easily in an interactive way.
List of 8051 Simulators:
The list of simulators is given below with their features:
1. MCU 8051: MCU 8051 is an 8051 simulator that is very simple to use and has an interactive
IDE (Integrated Development Environment). It is developed by Martin Osmera and most
important of all is that it is completely free. There are many features for this IDE they are
 It supports both C and assembly language for compilation and simulation
 It has an in-built source code editor, graphical notepad, ASCII charts, Assembly symbol
viewer, etc. It also supports several 8051 ICs like at89c51, A89S52, 8051, 8052, etc.
 It will support certain electronic simulations like LED, 7segment display, LCD etc. which
will help in giving the output when you interface these things to the hardware directly.
 It has syntax validation, pop base auto-completion etc.
You can download this tool from https://sourceforge.net/projects/mcu8051ide/files/.

2. EDSIM 51: This is a virtual 8051 interfaced with virtual peripherals like 7 segment display,
motor, keypad, UART etc. This simulator is exclusively for students developed by James Rogers,.
The features of this simulator are
 Have virtual peripherals like ADC, DAC with scope to display, comparator etc.
 Supports only assembly language
 IDE is completely written in JAVA and supports all the OS.
 Completely free and with user guide, examples, etc.
You can download this simulator from the https://www.edsim51.com/index.html.

3. 8051 IDE: This simulation software is exclusively for the Windows operating system (98/xp).
The features of this simulator are
 Text editor, assembler, and software simulate in one single program.
 Has facilities like Breakpoint setter, execute to break point, predefined simulator watch
window, etc.
 It is available in both free version and paid version.
You can download this tool from https://www.acebus.com/win8051.htm

4. KEIL µVision: KEIL is the most popular software simulator. It has many features like
interactive IDE and supports both C and assembly languages for compilation and simulation.

You can download and get more information from https://www.keil.com/c51/.

INSTALLATION OF KEIL SOFTWARE

Set up Keil IDE for Programming


Keil µVision IDE is a popular way to program MCUs containing the 8051 architectures. It supports
over 50 microcontrollers and has good debugging tools including logic analyzers and watch
windows.
In this article, we will use the AT89C51ED2 microcontroller, which has:
 64 KB FLASH ROM
 On-chip EEPROM
 256 Bytes RAM
 In-System programming for uploading the program
 3 Timer/counters
 SPI, UART, PWM

The Keil µVision icon.


To start writing a new program, you need to create a new project. Navigate to project —> New
µVision project. Then save the new project in a folder.

After saving the file, a new window will pop up asking you to select your microcontroller.
As discussed, we are using AT89C51/AT89C51ED2/AT89C52, so select this controller under the
Microchip section (as Atmel is now a part of Microchip).
Select ‘Yes’ in the next pop-up, as we do not need this file in our project.

Our project workspace is now ready!

From here, we need to create a file where we can write our C code. Navigate to File —> New.
Once the file is created, save it with .c extension in the same project folder.

Next, we have to add that .c or .asm file to our project workspace. Select Add Existing Files and
then select the created .c or .asm file to get it added.
The workspace and project file are ready.
PROCEDURE

1. Create a new project, go to “Project” and close the current project “Close Project”.
2. Next Go to the Project New μVision Project and Create New Project Select Device for
Target.
3. Select the device AT89C51ED2 or AT89C51 or AT89C52
4. Add Startup file Next go to “File” and click “New”.
5. Write a program on the editor window and save it with .asm extension.
6. Add this source file to Group and click on “Build Target” or F7.
7. Go to debugging mode to see the result of simulation by clicking Run or step run.8.
PROGRAM:

ORG 0x0000 ; Start address


MOV R0, #25 ; Load first number into R0
MOV R1, #50 ; Load second number into R1
ADD A, R0 ; Add R0 to accumulator
ADD A, R1 ; Add R1 to accumulator
MOV P1, A ; Move result to Port 1 for display
END

OUTPUT:
Input: Output:
R0-25 R1-75
R1-50
RESULT:
EXP NO:
Test data transfer between registers and memory
DATE

AIM:
To write and execute an Assembly language program to transfer data between registers and
memory.

SOFTWARE REQUIRED:

S.No Software Requirements Quantity


1 Keil μvision5 IDE 1

PROCEDURE

1. Create a new project, go to “Project” and close the current project “Close Project”.
2. Next Go to the Project New μVision Project and Create a New Project Select Device for
the Target.
3. Select the device AT89C51ED2 or AT89C51 or AT89C52
4. Add Startup file Next go to “File” and click “New”.
5. Write a program on the editor window and save it with .asm extension.
6. Add this source file to Group and click on “Build Target” or F7.
7. Go to debugging mode to see the result of the simulation by clicking Run or Step run.
PROGRAM:
MOV R0,#50H;// Initialize the source memory pointer
MOV R1,#60H; // Initialize the destination memory pointer
MOV R2, #05H ;// Initialize Iteration counter
BACK: MOV A,@R0; // Get the data from source memory pointer
MOV @R1,A ;// Store the data into destination memory pointer
INC R0 ;// Increment the source memory pointer
INC R1 ;// Increment the destination memory pointer
DJNZ R2, BACK ;// Decrement iteration count and if it
// is not zero, go to relative Address and
// repeat the same process until count become
// zero.
END

OUTPUT:
MEMORY WINDOW:
Before execution: D:0x50H: 22 AB 3D 44 55 00
D:0X60H: 00 00 00 00 00 00
After execution: D: 0x50H: 22 AB 3D 44 55 00
D:0X60H: 22 AB 3D 44 55 00
RESULT:
EXP NO:
ALU operations
DATE

AIM:
To write and execute the ALU program using the Keil simulator.

SOFTWARE TOOLS REQUIRED:

S.No Software Requirements Quantity


1 Keil μvision5 IDE 1

PROCEDURE

1. Create a new project, go to “Project” and close the current project “Close Project”.
2. Next Go to the Project New μVision Project and Create New Project Select
Device for Target.
3. Select the device AT89C51ED2 or AT89C51 or AT89C52
4. Add Startup file Next go to “File” and click “New”.
5. Write a program on the editor window and save it with .asm extension.
6. Add this source file to Group and click on “Build Target” or F7.
7. Go to debugging mode to see the result of simulation by clicking Run or step run.

You might also like