LAB1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 42

Microcontroller and Microprocessor

LAB # 01
LAB Name: introduction to 8086 trainer MDA Win8086
1.1 Objective:
To become familiar with the 8086 trainer MDA Win8086 trainer
1.2 Introduction:
MDA-8086 has high performance 64K-byte monitor program. It is designed for easy function.
After power is on, the monitor begins to work. In addition to all the key function the monitor
has a memory checking routine.
The following is a simple description of the key functions.

Figure: 1.1

1.3 FUNCTION OF KEYS:

Figure: 1.2

1
21395
Microcontroller and Microprocessor

1.3 TECHNICAL SPECIFICATIONS:


Table 1.1
CPU 8086
Main RAM 64 KB (62256 x 2)
Monitor ROM 64 KB (27C256 x 2)
Display Unit LCD (16 x 2 Line)
I/O Port 8255A
Serial Port RS-232C (8251A x 1)
System Clock 4.9152 MHz
Clock Generator 8284
Interrupt Controller 8259
Level Meter 10 step
DOT Matrix 8 x 8 (3 Color)
Operation System Software 8086 Assembler
Keyboard 16 Key of data, 10 Key of function
System bus indicator LED (3Ø) x 12
System bus 62pin x 1
Expansion Connector
External Interface 20pin x 1
Step Motor Interface Driver T.R x 4
ADC : ADC 0804
A/D , D/A Converter
DAC : DAC 0800
Power 110V/220V
Board size(mm) 310 x 265
Wood case(mm) 100(H) x 300(D) x 430(W) ± 10(mm)

2
21395
Microcontroller and Microprocessor

1.5 About MDA – 8086:


 MDA is a company name “Midas Engineering”.
 It is a trainer board of 8086 microprocessor having an IC on 8086 inside.
 It consists of an LCD screen, 16 data keys and 10 function keys.
 It has 2 RAM (2x32Kb) and 2 ROM (2x32Kb) included.
 It can be operated in two modes
o KIT MODE
o PC MODE
 It also includes a 7 segment, dot matrix, D/A, A/D, Level meter and stepping motor
projects.

1.6 MDA-8086:

Figure: 1.3

3
21395
Microcontroller and Microprocessor

1.7 Different units on MDA-8086:


 CPU(Central processing unit) :
Using Intel 8086, Using 14.7456 MHz
 ROM(Read Only Memory) :
It has program to control user's key input, LCD display, and user’s program. 64K Byte,
it has data communication program.
Range of ROM Address is F0000H~FFFFFH.
 SRAM(Static Random Access Memory) :
Input user's program & data.
Address of memory is 00000H~0FFFFH, totally 64K Byte
 DISPLAY :
Text LCD Module, 16(Characters) ×2(Lines)
 KEYBOARD :
It is used to input machine language. There are 16 hexadecimal keys and 8 function keys.
 SPEAKER :
Sound test.
 RESET :
Used to reset whole program.
 RS-232C :
Serial communication with.IBM compatible PC.
 SELECT MODE :
It can be operated in two modes
o KIT MODE
o PC MODE
 DOT MATRIX LED :
To understand & test the dot matrix structure and principle of display. It is interfaced to
8255A(PPI).
 A/D CONVERTER :
ADC0804 to convert the analog signal to digital signal.
 D/A CONVERTER :
DAC0800 (8-bits D/A converter) to convert the digital signal to the analog signal and to
control the level meter.
 STEPPING MOTOR INTERFACE :
Stepping motor driver circuit is designed.
 POWER :
AC 110~220V, DC +5V 3A, +12V 1A, -12V 0.5A SMPS.

4
21395
Microcontroller and Microprocessor

1.8 Assessment sheet:


CMS ID: 21395
DATE: 06-04-2015

1-introduction to 8086
Problem Number trainer
2-description of all parts

Working
Lab Performance
Viva

Total Score in Lab#1

Instructor's Verification

5
21395
Microcontroller and Microprocessor

LAB#2

Lab – 2: Basic machine code / Opcode

2.1 Objective:
 To learn the basic machine codes or opcodes of Intel 8086
2.2 Pre-Lab Reading:
Intel Microprocessors: Architecture, Programming and Interfacing, 8th Edition, BARRY B.
BREY, Chapter 4, Topic 4.1
2.3 Equipment:
Instruments MDA-Win 8086 Trainer
Kit

Components Power Cables

2.4 Code:
2.4.1: Mov A, #80H
2.4.2: Push AX
2.4.3: POP BX
2.4.4: PUSHF
2.4.5: POPF
2.4.6: ADD AH, 5
2.4.7: INC BH
2.4.8: JO
2.4.9: NEG
2.4.10: SUB BL, AH
2.6 Output:
2.5.1: A=80H
2.5.2: AX=55H and Top of stack=55H

6
21395
Microcontroller and Microprocessor

2.5.3: Top of stack=44H and BX=55H


2.5.4: FLAGS are PUSED into the stack
2.5.5: FLAGS are POPED from the stack
2.5.6: AH=5
2.5.7: Before INC BH=6, After INC BH=7
2.7 Exercise:
Table: 2.1
Name Opcode Operands Description
Mov 100010dw mod reg r/m Reg/Memory Data transfer between
Register/Memory to/
from Register
PUSH 11111111 mod 110 r/m Reg/Memory PUSH the data into
the stack
POP 10001111 mod 000 r/m Reg/Memory POP the data from
the stack
PUSHF 10011100 N/A Push FLAGS into the
stack
POPF 10011101 N/A Pop FLAGS into the
stack
ADD 000000dw mod reg r/m Reg/Memory Add the Reg/Memory
with Register to
Either
INC 01000 reg Reg Increments the Reg
by 1
SUB 001010dw mod reg r/m Reg/Memory Subtracts
Reg/Memory and
Register to Either
CMP 001110dw mod reg r/m Reg/Memory Compares the
contents of
Register/Memory and
Register
JO 01110000 displacement N/A Jumps on Overflow
JNO 01110001 displacement N/A Jumps on Not
Overflow
JP/JPE 01111010 displacement N/A Jump on Parity/Parity
Even
NEG 1111011w mod 011 r/m N/A Changes the sign
JS 01111000 displacement N/A Jump on sign

7
21395
Microcontroller and Microprocessor

2.8 Notes:

 When two operands are required for an instruction they are separated by comma. For
example:

REG, memory

 The size of operands must be same. For example:

AL, DL
DX, AX

 Mov command is use for the operation

Mov BX,AX
Mov BX,[BI+SI]

2.9 Assessment Sheet:


CMS ID: 21395
DATE: 13-04-2015

1-basic machine code


Problem Number
2-operands

Working
Lab Performance
Viva

Total Score in Lab#2

Instructor's Verification

8
21395
Microcontroller and Microprocessor

LAB#3
Lab – 3: Arithmetic Blocks

3.1 Objective:
 To learn the basic Arithmetic Operations ( Addition, Subtraction, Multiplication and
Division)
3.2 Pre-Lab Reading:
Intel Microprocessors: Architecture, Programming and Interfacing, 8th Edition, BARRY B.
BREY, Chapter 5, Topic 5.1, 5.2
3.3 Equipment:
Instruments MDA-Win 8086 Trainer
Kit

Components Power Cables

3.4 Code:
3.4.1 Addition:
Algorithm: Operend1 = Operend1 + Operend2
Example:
MOV AL, 5
ADD AL, -3
RET
3.4.2 Subtraction:
Algorithm: Operend1 = Operend1 - Operend2
Example:
MOV AL, 5
ADD AL, 1
RET
3.4.3 Multiplication:
Algorithm: AX = AL * operand or DX AX = AX * operand
9
21395
Microcontroller and Microprocessor

Example:
MOV AL, 301
MOV BL, 6
MUL BL
RET
3.4.4 Division:
Algorithm: AL = AX / operand, AH = reminder or AX= (DX AX) / operand,
DX=reminder
Example:
MOV AL, 100
MOV BL, 3
DIV BL
RET

3.5 Output:
3.5.1: AL = 05H
AL = 02H
3.5.2: AL = 05H
AL = 04H
3.5.3: AL = 00C8H
BL = 04H
AX = 0320H (800)
3.5.4: AX = 00CBH
BL = 04H
AL= 50 (32h), AH = 3

3.7 Exercise:

10
21395
Microcontroller and Microprocessor

3.7.1 Addition:
Addition can be performed in the following way:
REG, Memory
Memory, REG
REG, REG
Memory, Immediate
REG, Immediate

3.7.2 Subtraction:
Subtraction can be performed in the following way
REG, Memory
Memory, REG
REG, REG
Memory, Immediate
REG, Immediate

3.7.3 Multiplication:
Multiplication can be performed in the following way
REG
Memory

3.7.4 Division:
Division can be performed in the following way
REG
Memory

2.8 Notes:

11
21395
Microcontroller and Microprocessor

 When two operands are required for an instruction they are separated by comma. For
example:

REG, memory

 The size must be of same For example:

AL, DL
DX, AX

 Mov instruction is used for transfer of data


Mov AX,BX

2.9 Assessment Sheet:


CMS ID: 21395
DATE: 20-04-2015

1-basic arithmetic operations


Problem Number
2-mul/div/add/sub

Working
Lab Performance
Viva

Total Score in Lab#3

Instructor's Verification

12
21395
Microcontroller and Microprocessor

LAB#4
LAB NAME: ADRESSING MODES
4.1 OBJECTIVE
To study and examine the NASM and addressing modes

4.2 PRE LAB READING


Computer architecture and assembly language by BILAL MUHAMMAD HASHMI
4.3 EQUIPMENT/SOFTWARE
NASM, DEBUGGER, LINKER, CMD
4.4 COMPONET
PC/COMPUTER
4.5 CODE
REGISTER ADDRESING

Figure: 4.1

13
21395
Microcontroller and Microprocessor

4.6 OUT PUT

Figure: 4.2

Figure: 4.3

View in debugger output

14
21395
Microcontroller and Microprocessor

Figure: 4.4

After executing observe register status, IP and memory window

Figure: 4.5

15
21395
Microcontroller and Microprocessor

IN DIRECT ADDRESING

Figure: 4.6

Listing file is generated

Figure: 4.7

16
21395
Microcontroller and Microprocessor

Figure: 4.8

Figure: 4.9

17
21395
Microcontroller and Microprocessor

After executing observe register status, IP and memory window

Figure:4.10

4.7 Procedure

 To work in NASM ,we should have following software which is easily download by
google
 We must have cmd prompt, afd debugger,NASM and linker
 Write the code in notepad and save it by .asm extension
 Open the cmd prompt
 Write the command as describe above in cmd
 To load file write saved file name i-e u1.asm
 And load object file and listing file by extention as .com and .lst respectively
 Now to view listing file write edit u1.lst the listing file window will open which shows the
program list and steps

18
21395
Microcontroller and Microprocessor

 Examine carefully so if any error occur then you can easily change it
 Then to view object file write afd u1.com
 By executing .com afd debugger will open which show the brief explanation
 By executing each command the register status changing correspondingly
 Also observe the IP status which is loading automatically
 There are two memory windows in afd ,both showing the same value of register
 Value can also be change in this window on typing in cmd line area.

4.8 NOTES:
Save the notepad file by .asm extention and then retrieve it in cmd by same extention

4.9 ASSESMENT SHEET:


CMS ID: 21395
DATE: 27-04-2015

1-adressing modes
Problem Number
2-examine NASM

Working
Lab Performance
Viva

Total Score in Lab#4

Instructor's Verification

19
21395
Microcontroller and Microprocessor

LAB#5
Lab NAME: Introduction to 8051 Microcontroller
5.1 OBJECTIVE :
 To examine and use 8051 microcontroller, assembler and simulator
 To learn “in system programming” (ISP) of microcontroller
5.2 PRE-LAB READING:
Chapter 1, 2, 8, Mazidi and McKinlay, “The 8051 Microcontroller and Embedded Systems”
5.3 EQUIPMENT REQUIRED
Instruments Oscilloscope
8051 ETK Trainer
Components Resistor 8.2k, 10k
Capacitors 10 uF, 30 uF, 30 uF
ICs 89C51RD2

5.4 MICROCONTROLLER WITH MINIMUM CONNECTIONS:


8051 microcontroller has 40 pins, out of which 32 pins are for four eight bit I/O ports. Apart from general
usage, port 3 is also used for specific tasks and each pin of this port has special purpose. A crystal
oscillator is attached at pin 18 and 19 along with capacitors. In case the microcontroller is to be derived
from external clock, pin 18 is left with no connection and external clock is given at pin 19. Vcc is applied
at pin 40 and 31 while pin 20 is connected to ground. In case pin 31 is left low, microcontroller will not
use internal ROM to run, rather it will execute the program from external ROM (if connected). Thus in
normal case, when the program is written in internal ROM, EA pin is given high logic. Pin 9 is RESET. If
this pin is kept high for at least two machine cycles, microcontroller resets and terminates all activities.

5.5 IN SYSTEM PROGRAMMING (ISP):


In-System Programming (ISP) is performed without removing the microcontroller from the system. The
In-System Programming (ISP) facility consists of a series of internal hardware resources coupled with
internal firmware to facilitate remote programming of the microcontroller through the serial port. This
firmware is embedded within each P89C51RB2/RC2/RD2Hxx device. The ISP function uses five pins:
TxD, RxD, VSS, VCC, and VPP as shown in figure 1.1.
When the microcontroller programs its own Flash memory, all of the low level details are handled by
code that is permanently contained in a 1-kbyte Boot ROM that is separate from the Flash memory. A
user program simply calls the common entry point with appropriate parameters in the Boot ROM to
accomplish the desired operation. Boot ROM operations include things like: erase block, program byte,
verify byte, program security lock bit, etc. The Boot ROM overlays the program memory space at the top
of the address space from FC00 to FFFF hex, when it is enabled. If the flash memory of microcontroller is
completely erased, Boot ROM will also be erased which will make our microcontroller useless. Such
microcontroller will not be programmed by ISP. Therefore, never erase full memory blocks of
microcontroller. Figure 1.2 shows flash memory configuration and position of Boot ROM in flash
memory of microcontroller.

20
21395
Microcontroller and Microprocessor

Figure: 5.1

5.6 PRECAUTIONS FOR ENTIRE COURSE


 Do not erase full memory blocks of the microcontroller.
 Remember to initialize the ports of the microcontroller.

21
21395
Microcontroller and Microprocessor

 Do not at any point draw more than 26mA from the microcontroller.
5.7 ACTIVITIES AND EXERCISES
1. This task is designed to get you familiar with ASEM-51 assembler. Write a simple assembly language
code in which you move a value in register A. Then from register A, move this value to registers R0-R7.
Save this file as .asm and generate .hex file and simulate it. Write the code in following space. A
microcontroller simulator helps in viewing the inside of a microcontroller. Hex file of code is loaded in
the simulator which shows the code in ‘disassembled code window’. Values of different registers and data
in RAM is also shown and updated at each step of the code.

ORG 00H
Mov A, #0BH
MOV R0, A
MOV R2, A
MOV R3, A
MOV R4, A
MOV R5, A
MOV R6, A
MOV R7, A
END
2. Write an assembly language code in which a value is moved in register A. Then from register A, 06H is
added to this value and moved to register R0. Keep adding 06H and move the data from R1 to R7
registers. Now load the hex file of this code in the simulator and use the simulator to single step the
program. Examine and write down the values of registers (PC, ACC, and R0-R9) on each step and show
to your instructor.

ORG 00H
Mov A, #10H
ADD A, #06H
Mov R0, A
ADD A, #06H
Mov R1, A
ADD A, #06H
Mov R2, A
ADD A, #06H
22
21395
Microcontroller and Microprocessor

Mov R3, A
ADD A, #06H
Mov R4, A
ADD A, #06H
Mov R5, A
ADD A, #06H
Mov R6, A
ADD A, #06H
Mov R7, A
END
5.8 Assessment sheet:
CMS ID: 21395
DATE: 04-05-2015

1-introduction to 8051
Problem Number
2-description

Working
Lab Performance
Viva

Total Score in Lab#5

Instructor's Verification

23
21395
Microcontroller and Microprocessor

Lab#06
Lab name: Led blinking by using 8051
6.1 Lab 0bjective:
To become familiar how to blink led in 8051 using assembly
6.2 Pre lab reading:
Book: the 8051 microcontroller and embedded systems, edition second, Author Muhammad Ali
mazidi, chapter 03, and topic: simple led blinking program
6.3 Equipment:
Proteus 8, power supply
6.4 components:
8051 microcontroller, led, wires,
6.5 circuit:

Figure: 6.1
6.6 code:
Org 00H
main:
here: setb p1.0

24
21395
Microcontroller and Microprocessor

CPL p1.0
SJMP here
End
6.7 Output:

Figure: 6.2

6.8 Exercise/procedure:
Open the software proteus 8 and go for the new project select the default schematic. Now select
the controller and write the code and check the errors if any then remove it. Select all the
components from library and connect all the components. Once the simulation is done then run it
and see the output.
6.9 Notes:
Here we will observe the led it will blink continuously

25
21395
Microcontroller and Microprocessor

6.10 Assessment sheet:


CMS ID: 21395
DATE: 11-05-2015

1-led blinking
Problem Number
2-using 8051

Working
Lab Performance
Viva

Total Score in Lab#6

Instructor's Verification

26
21395
Microcontroller and Microprocessor

Lab#07
LAB NAME: Led blinking by using delay.
7.1 Lab 0bjective:
To become familiar how to blink led in 8051 using delay
7.2 Pre lab reading:
Book: the 8051 microcontroller and embedded systems, Edition second, Author Muhammad Ali
mazidi, chapter 03, and topic: delay program
7.3 Equipment:
Proteus 8, power supply
7.4 Components
: 8051 microcontroller, led, wires,
7.5 Circuit:

Figure:7.1
7.6 Code:
ORG 00H
main:
here: SETB P1.0

27
21395
Microcontroller and Microprocessor

ACALL DELAY
CPL P1.0
ACALL DELAY
SJMP here

ORG 300H
DELAY: MOV R0, 0FFH
DJNZ R0, $
RET
End
7.7 Output:

Figure:7.2

7.8 Exercise/procedure:
Open proteus 8 select the new project and select default schematic. Select the controller and
write a program by using a call delay in assembly. Now check the errors if any then remove it

28
21395
Microcontroller and Microprocessor

and compile it. Select the component from library and connect all the components and run the
simulation see the result led will continuously blink with some delay

7.9 Notes:
Led will blink with some time delay

7.10 Assessment sheet:


CMS ID: 21395
DATE: 15-05-2015

1-led blinking using delay


Problem Number
2-8051

Working
Lab Performance
Viva

Total Score in Lab#7

Instructor's Verification

29
21395
Microcontroller and Microprocessor

Lab#08
LAB NAME: Programming in Mode (0, 1, 2)
8.1 Lab 0bjective:
To become familiar how to use modes in assembly language
8.2 Pre lab reading:
Book: the 8051 microcontroller and embedded systems, edition second, Author Muhammad Ali
mazidi, chapter 09, and topic: delay program
8.3 Equipment:
Proteus 8, power supply
8.4 Components:
8051 microcontroller, led, wires,
8.5 Circuit:

Figure:8.1

8.6 Code:
FOR TIMER0 MOD0
ORG 00H
MAIN:
MOV TMOD, 00H

30
21395
Microcontroller and Microprocessor

HERE: MOV TL0, #15H


MOV TH0, #0FFH
CPL P1.0
SETB TR0
JNB TF0, $
CLR TR0
CLR TF0
SJMP HERE
END
FOR TIMER0 MOD 1
ORG 00H
MAIN:
MOV TMOD, 01H
HERE: MOV TL0,#0F5H
MOV TH0,#0FFH
CPL P1.0
SETB TR0
JNB TF0, $
CLR TR0
CLR TF0
SJMP HERE
End
FOR TIMER0 MOD 2
ORG 00H
main:
MOV TMOD, 02H
MOV TH0, #0FDH
HERE: CPL P1.0

31
21395
Microcontroller and Microprocessor

SETB TR0
JNB TF0, $
CLR TF0
SJMP HERE
End
8.7 Output:

Figure:8.2

8.8 Exercise/procedure:
Open the software for the simulation. Go for the new project and select the controller. Now write
the program for timer in assembly. 8051 has two timer (timer0.timer) but here we used timer0 for
our simulation. After completing the code and circuit now check the errors if any then fix it and
run it
Mod0 is of 13-bit and mod1 is of 16-bit and the mod2 is 8-bit auto reload.
Select the components from library and drag it on the screen and connect them together
Code the timer0 for mod0 run the simulation and observe the result. Repeat the procedure for
mod1 and mod2.
8.9 Notes:
8051 has two timers which are used for the timer and a counter. .

32
21395
Microcontroller and Microprocessor

8.10 Assessment sheet:


CMS ID: 21395
DATE: 22-06-2015

1-programming mode
Problem Number 2-using timers for mode
0,1,2
Working
Lab Performance
Viva

Total Score in Lab#8

Instructor's Verification

33
21395
Microcontroller and Microprocessor

Lab#09
LAB NAME: Counters In 8051
9.1 Lab 0bjective: To become familiar with counters how they are used in 8051
9.2 Pre lab reading:
Book: the 8051 microcontroller and embedded systems, edition second, author Muhammad Ali
mazidi, chapter 09, and topic: delay program
9.3 Equipment:
Proteus 8, power supply
9.4 Components:
8051 microcontroller, led, wires,
9.5 Circuit:

Figure:9.1
9.6 Code:
ORG 00H
main:
MOV TMOD, #60H
MOV TH1,#0H
SETB P3.5
AGAIN: SETB TR1

34
21395
Microcontroller and Microprocessor

HERE: MOV A,TL1


MOV P2, A
JNB TF1, HERE
CLR TF0
SJMP AGAIN
End

9.7 Output:

Figure:9.2

9.8 Exercise/procedure:
Open the software for the simulation. Go for the new project and select the controller. Now write
the program for timer in assembly. 8051 has two timer (timer0.timer) but here we used timer0 for
our simulation. But here we have used counter instead of timer. Counter0 is used for the counter
operation. After completing the code and circuit now check the errors if any then fix it and run it
Mod0 is of 13-bit and mod1 is of 16-bit and the mod2 is 8-bit auto reload.
Code the counter0 for mod0 run the simulation and observe the result. Repeat the procedure for
mod1 and mod2.
9.9 Notes:
We can use timers 0 and 1 as event counters. A timer can be used as a counter if we provide
pulses from outside the chip instead of using the frequency of the crystal oscillator as the clock

35
21395
Microcontroller and Microprocessor

source. By feeding pulses to the TO (P3.4) and Tl (P3.5) pins, we turn Timer 0 and Timer 1 into
counter 0 and counter 1.

9.10 Assessment sheet:


CMS ID: 43557
DATE: 29-06-2015

1-counters in 8051
Problem Number 2-using counter for event
count
Working
Lab Performance
Viva

Total Score in Lab#9

Instructor's Verification

36
21395
Microcontroller and Microprocessor

Lab#10
Lab name: Serial port program receiver & transmitter
10.1 Lab 0bjective:
To learn microcontroller serial programing for receiving and sending data
10.2 Pre lab reading:
The 8051 Microcontroller and Embedded Systems
Edition: 2nd edition
Author: mazidi
Chapter 11
10.3 Equipment:
Pc, 8051 trainer, serial cable
10.4 Component:
Bread board, 8051 microcontroller, resister, connecting wires, computer, genius programmer,
usb cable, led, and oscillator

10.5 Circuit:

Figure :10.1

37
21395
Microcontroller and Microprocessor

10.6 Code:
ORG 00H
MAIN:
MOV TMOD, #20H
MOV SCON, #50H
MOV TH1, #-3D
SETB TR1

LOOP:
MOV A, #'D'
MOV SBUF, A
ACALL TRANSMIT
MOV A, #'D'
MOV SBUF, A

MOV A, #'A'
MOV SBUF, A
ACALL TRANSMIT

MOV A, #'N'
MOV SBUF, A
ACALL TRANSMIT

MOV A, #'I'
MOV SBUF, A
ACALL TRANSMIT
SJMP $
TRANSMIT:

38
21395
Microcontroller and Microprocessor

JNB TI, $
CLR TI
RET
END

10.7 Output:

Figure: 10.2

10.8 Procedure for transmitting:


Open the keil software write code in it and built it. Check the errors if any fix it and the compile
the code and create a hex file. Connect genius program to computer and burn the hex file in to
8051. Hence the hex file is burnt into the 8051. Now connect components and give power to the
circuit data is transmitted at serial pin and can be observed as led will light to indicate data
transfer. Repeat the experiment by using different values and note the results.

39
21395
Microcontroller and Microprocessor

10.9 Circuit:

Figure: 10.3

10.10 Code:
ORG 00H
MAIN:
MOV TMOD, #20H
MOV SCON, #50H
MOV TH1, #-3D
SETB TR1
MOV P2, #00H
LOOP:
JNB RI, $
CLR RI
MOV A, SBUF
MOV P2, A
SJMP LOOP

40
21395
Microcontroller and Microprocessor

END

10.11 Procedure for receiving:


Open the keil software write code in it and built it. Check the errors if any fix it and the compile
the code and create a hex file. Connect genius program to computer and burn the hex file in to
8051. Hence the hex file is burnt into the 8051. Now connect components and give power to the
circuit. Set the baud rate to 9600 signals/sec. Interface the microcontroller with computer serial
port. Data received will be shown in virtual terminal software. Repeat the experiment by sending
different data to the ports.

10.12 Notes:
We have transmitted and received data serially and learnt the serial port programming

10.13 Assessment sheet:


CMS ID: 21395
Date: 06-06-2015

1-serial port receiving


Problem Number
2-serially transmitting

Working
Lab Performance
Viva

Total Score in Lab#10

Instructor's Verification

41
21395
Microcontroller and Microprocessor

42
21395

You might also like