Iot Record
Iot Record
NAME :
REG NO :
VI Semester.
5. Set the Target options using -> Project – Options for Target opens the µ
Options forTarget – Target configuration dialog. Set the Xtal (Crystal frequency)
frequency to 11.0592 MHz, and also the Options for Target– Debug – use either
Simulator / Keil Monitor- 51 driver.
6. If Keil Monitor- 51 driver is used, click on Settings -> COM Port settings
select theCOM Port to which the board is connected and select the baud rate as
19200 or 9600
(recommended). Enable Serial Interrupt option if the user application is not using
on-chipUART, to stop program execution.
7. Build the project; using Project -> Build Project. application and links. Any
errors in the code are indicated by – “Target not created” in the Build window, along
with the errorline. Debug the errors. After an error free, to build go to Debug mode.
8. Now user can enter into Debug mode with Debug- Start / Stop Debug session
dialog. Or by clicking on the icon.
9. The program is run using the Debug-Run command & halted using Debug-
Stop Running. Also, the (reset, run, halt) icons can be used. Additional icons are
(step, stepover, and step into, run till cursor).
10. If it is an interface program the outputs can be seen on the LCD, CRO, motor, led
status, etc. If it is a part-A program, the appropriate memory window is opened using
View ->memory window (for data RAM & XRAM locations), Watch
window (for timer program), serial window, etc.
11. Note: To access data RAM area type address as D: 0020h. Similarly, to access the
DPTRregion (XRAM-present on chip in AT89C51ED2) say 9000h location type
inX:09000H.
EXP. NO:01 WRITE 8051 ASSEMBLY LANGUAGE EXPERIMENTS USING
SIMULATOR.
DATE:
AIM:
To write 8051 assembly language experiments using simulator.
PROCEDURE:
a. Create a new project, go to “Project” and close the current project “Close Project”.
b. Next Go to the Project New μVision Project and Create New Project Select Device
forTarget.
c. Select the device DS2250 or DS2251T or DS2252T.
d. Add Startup file Next go to “File” and click “New”.
e. Write a program on the editor window and save it with .asm extension.
f. Add this source file to Group and click on “Build Target” or F7.
g. Go to debugging mode to see the result of simulation by clicking Run or step run.
h. This program follows the above-mentioned steps to create and compile the project
i. To see the output go to the memory window and enter the memory location like
D:41H.
PROGRAM:
ORG 0000H
CLR C
//Addition
MOV A,#3H
MOV R0,#5H
ADD A,R0
MOV 50H,A
END
OUTPUT:
RESULT:
Thus, the assembly language program for 8051 simulators has been executed
successfully.
EXP.NO:02(i) TEST DATA TRANSFER BETWEEN REGISTERS TO
MEMORY.
DATE:
AIM:
To write and execute an Assembly language program to transfer data between registers
and memory.
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 DS2250 or DS2251T or DS2252T.
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.
8. This program follows the above-mentioned steps to create and compile the project.
9. To see the output go to the memory window and enter the memory location like
D:50H.
PROGRAM:
MOV R0,#6DH
MOV R1,#3BH
MOV R2,#5AH
MOV 50H,R0
MOV 51H,R1
MOV 52H,R2
END
OUTPUT:
RESULT:
Thus, the assembly language program to Test data transfer between registers to
memory.
EXP.NO: 02(ii)
TEST DATA TRANSFER BETWEEN MEMORY TO
DATE: REGISTER.
AIM:
To write an assembly language program to test data transfer between memory and
register.
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
Devicefor the Target.
3.Select the device DS2250 or DS2251T or DS2252T.
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.
8. This program follows the above-mentioned steps to create and compile the project.
9.To see the output go to the memory window and enter the memory
location likeD:50H.
PROGRAM:
MOV 50H,#5DH
MOV 51H,#6BH
MOV 52H,#3AH
MOV R0,50H
MOV R1,51H
MOV R2,52H
END
OUTPUT:
RESULT:
Thus, the assembly language program executes the data transfer between
memory to register.
EXP: NO:03
PERFORM ALU OPERATIONS.
DATE:
AIM:
To write an assembly language program to perform ALU operations.
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 DS2250 or DS2251T or DS2252T.
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.
8. This program follows the above-mentioned steps to create and compile the project.
9. To see the output go to the memory window and enter the memory location like
D:50H.
PROGRAM:
ORG 0000H
CLR C
//Addition
MOV A,#5
MOV R0,#3
ADD A,R0
MOV 50H,A
//Subtraction
SUBB A,R0
MOV 51H,A
//Multiplication
MOV A,#4
MOV B,#5
MUL AB
MOV 52H,A
//Division
MOV A,#20
MOV B,#5
DIV AB
MOV 53H,A
MOV 54H,B
//AND
MOV A,#1
MOV R0,#1
ANL A,R0
MOV 55H,A
//OR
MOV A,#0
MOV R0,#1
ORL A,R0
MOV 56H,A
//XOR
MOV A,#1
MOV R0,#0
XRL A,R0
MOV 57H,A
END
OUTPUT:
RESULT:
Thus, the assembly language program to perform an ALU operations has been
executed successfully.
EXP:NO: 04(i) WRITE BASIC PROGRAMS USING
EMBEDDED C.
DATE:
AIM:
To write basic program using embedded c.
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 DS2250 or DS2251T or DS2252T.
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.
8. This program follows the above-mentioned steps to create and compile the project.
9. To see the output go to the memory window and enter the memory location like
D:50H.
PROGRAM:
#include<reg51.h>
int i,j;
sbit LED=P2^0;
void main()
{
while(1)
{
LED=0;
for(i=0;i<10000;i++)
LED=1;
for(j=0;j<10000;j++);
}
}
OUTPUT:
RESULT:
Thus, the arithmetic program using embedded c has been executed successfully
EXP.NO:4(ii)
WRITE ARITHMETIC PROGRAM USING EMBEDDED C
DATE:
AIM:
To write a arithmetic program using embedded C.
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
Devicefor the Target.
3. Select the device DS2250 or DS2251T or DS2252T.
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.
8. This program follows the above-mentioned steps to create and compile the
project.
9. To see the output go to the memory window and enter the memory location like
D:50H.
PROGRAM:
#include<reg51.h>
void main(void)
{
unsigned char x,y,z,a,b,c,d,e,f,p,q,r;
//addition
x=0x12;
y=0x34;
P0=0x00;
z=x+y;
P0=z;
//subtraction
a=0x12;
b=0x34;
P1=0x00;
c=b-a;
P1=c;
//multiplication
d=0x12;
e=0x34;
P2=0x00;
f=d*e;
P2=f;
//division
p=0x10;
q=0x10;
P3=0x00;
r=p/q;
P3=r;
While(1);
}
OUTPUT:
RESULT:
Thus, the arithmetic program using embedded c has been executed successfully
EXP.NO: 05
INTRODUCTION TO ARDUINO PLATFORM AND
DATE: PROGRAMMING
INTRODUCTION IOT:
IOT stands for “Internet of Things”. The IOT is a name for the vast collection of
“things” that are being networked together in the home and workplace (up to 20
billion by 2020 according to Gardner, a technology consulting firm).
Characteristics of the IOT
Communications are important to IOT projects.
In fact, communications are core to the whole genre. There is a trade-off for IOT
devices. The more complex the protocols and higher the data rates, the more powerful
processor needed and the more electrical power the IOT device will consume.
TCP/IP base communications (think web servers; HTTP-based commutation (like
REST servers); streams of data; UDP) provide the most flexibility and functionality at
a cost of processor and electrical power.
Low-power Bluetooth and Zigbee types of connections allow much lower power for
connections with the corresponding decrease in bandwidth and
functionality.
IOT projects can be all over the map with requirements for communication flexibility
and data bandwidth requirements.
Arduino in IoT
In IoT applications the Arduino is used to collect the data from the sensors/devices to
send it to the internet and receives data for purpose of control of actuators.
Arduino Uno
Introduction:
The Arduino Uno is an open-source microcontroller board based on the Microchip
ATmega328P microcontroller and developed by Arduino.cc. The board is equipped
with sets of digital and analog input/output (I/O) pins that may be interfaced to various
expansion boards (shields) and other circuits. The board has 14 digital I/O pins (six
capable of PWM output), 6 analog I/O pins, and is programmable with the Arduino
IDE (Integrated Development Environment), via a type B USB cable. It can be
powered by the USB cable or by an external 9-volt battery, though it accepts voltages
between 7 and 20 volts. The word "uno" means "one" in Italian and was chosen to mark
the initial release of Arduino Software.
1. Arduino boards are able to read analog or digital input signals from different
sensors and turn it into an output such as activating a motor, turning LED on/off,
connect to the cloud and many other actions.
Arduino IDE:
Introduction:
The Arduino Software (IDE) is easy-to-use and is based on the Processing
programming environment. The Arduino Integrated Development Environment (IDE)
is a cross-platform application (for Windows, macOS, Linux) that is written in
functions from C and C++. The open-source Arduino Software (IDE) makes it easy to
write code and upload it to the board. This software can be used with any Arduino
board.
The Arduino Software (IDE) – contains:
• • A text editor for writing code
• • A message area
• • A text consoles
• • A toolbar with buttons for common functions and a series of menus. It
connects to the Arduino hardware to upload programs and communicate with them.
Open the Arduino IDE software on your computer. Coding in the Arduino language
will control your circuit.
Wait a few seconds; you will see the RX and TX LEDs on the board, flashing
If the upload is successful, the message "Done uploading" will appear in the status
bar.