Iot
Iot
4. Create a source file (using File->New), type in the assembly or C program and save
Group option.
5. Set the Target options using -> Project – Options for Target opens the µ Options for
Target – 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 the
COM 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-chip
UART, 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
error line. 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, step
over, 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 DPTR
region (XRAM-present on chip in AT89C51ED2) say 9000h location type inX:09000H.
EXP NO:01
Write 8051 Assembly language experiments using Simulator
DATE:
AIM:
PROCEDURE:
PROGRAM: OUTPUT
RESULT:
Thus the assembly language program for 8051 simulators has been executed successfully.
EXP NO:02a
DATE:
Test data transfer between registers and memory
AIM:
To write and execute an Assembly language program to transfer data between register.
PROCEDURE:
PROGRAM: OUTPUT:
RESULT:
Thus the assembly language program to test data transfer between register and memory has
been executed successfully.
EXP NO:02b
Test data transfer between memory and register
DATE:
AIM:
To write an assembly language program to test data transfer between memory and register.
PROCEDURE:
PROGRAM: OUTPUT:
RESULT:
Thus the assembly language program to test data transfer between memory and register
has been executed successfully.
EXP NO:03
Perform ALU Operations
DATE:
AIM:
PROCEDURE:
PROGRAM: OUTPUT:
RESULT:
Thus the assembly language for ALU operations has been executed successfully.
EXP NO:4a
Write Basic Program Using Embedded c
DATE:
AIM:
To write basic and arithmetic programs using embedded c.
PROCEDURE:
1. Initialize the program.
2. This program follows the above-mentioned steps to create and compile the project.
3. Includes the necessary header file reg51.h.
4. Declares two integer variables i and j and LED as a single bit located at pin P2.0.
5. The main () function contains an infinite loop.
6. Inside the loop, it turns on the LED by setting ‘LED’ to 0, then waits for delay using a
‘for’ loop.
7. After the delay, it turns off the LED by setting LED to 1, then waits for another delay.
8. The pattern repeats indefinitely, resulting in the LED blinking on and off with a delay
between each transition.
9. End the program.
10.To see the output go to peripherals and open I/O ports which was declared.
PROGRAM: OUTPUT:
RESULT:
Thus, the basic embedded c program has been executed successfully.
EXP NO:4b
Write arithmetic program using Embedded C
DATE:
AIM:
To write a arithmetic program using Embedded c.
PROCEDURE:
1. Initialize the program.
2. This program follows the above-mentioned steps to create and compile the project.
3. Define the variables used for arithmetic program.
4. Declare two 8-bit numbers.
5. Perform arithmetic operation for each two 8-bit numbers.
6. Store declare port as a output port.
7. End the program.
8. To see the output go to peripherals and open I/o port which was declared.
PROGRAM:
OUTPUT:
RESULT:
Thus the arithmetic program using Embedded C has been executed successfully.