Professional Documents
Culture Documents
MICROCONTROLLERS
LAB MANUAL
DEPARTMENT OF EEE
PALLAVI ENGINEERING COLLEGE
Kuntloor (V), HayathNagar (M), R.R District-501 505
DEPARTMENT OF EEE
INDEX
DEPARTMENT OF EEE
I.Introduction to the trainer & Instructions to user
ESA 86/88 –2 is a powerful, general-purpose microcomputer system, which can be operated either
with 8086 CPU or with 8088 CPU. It is generally supplied with 8086 CPU.
The 8086 and 8088 are third generation CPU is from INTEL that differ primarily in their external
data paths. 8088 uses 8-bit wide data bus while 8086 uses a 16-bit wide bus. ESA86/88-2 can be operated
with either CPU and the only possible difference would be in the speed of execution (with 8088 CPU, a
small speed degradation occurs because of the 8-bit wide data bus). In either case, the CPU is operated
in the maximum mode.
● Examine and optionally modify the contents of memory (byte or word format)
● Perform fast numerical computations using the optional 8087 Numeric data processor.
● Download user programs into ESA 86/88-2 from a host computer system.
SPECIFICATIONS:
Central processor
8086 CPU operates at 8MHz. (Memory cycles have zero wait states and I/O cycles have one wait
state).
Co-Processor
DEPARTMENT OF EEE
128K bytes using 6255s
(64K bytes supplied using 2x62556s. The other two sockets are for user
expansion).
RAM has battery backup facility.
8251A: Programmable Communication Interface for serial communication supporting all standards
with baud rates from 110-19,200 (Baud rate can be selected through on-board Dip switch).
8253-5: (2 Nos.) programmable peripheral Interface devices provide 48 Programmable I/O lines each.
8259A: Programmable interrupt Controller provides interrupt vectors for 8 sources
8288: Bus controller used for generating control signals.
Interrupts
External: NMI and INTR
INTR controlled through 8259A, on-board Interrupt Controller provides interrupt vectors for eight
sources. Complete flexibility in selecting off-board or on-board interrupt sources.
On-board interrupt sources
Interface Signals
CPU Bus: Demultiplexed and fully buffered, TTL compatible, Address, Data & Control signals are
available on two 50-pin ribbon cable connectors.
Parallel I/O:48 Programmable parallel I/O lines (TTL compatible) through two
26-pin ribbon cable connectors.
Serial I/O:RS 232 C through on-board 9pin D-type female connector.
Power supply: +5V @ 3.0Am
DEPARTMENT OF EEE
Printer Enable/Disable
ESA 86/88-2 firmware includes the driver program for centronics compatible parallel printer interface.
This driver can be enabled/ disabled as shown below:
▪ Asynchronous mode
▪ 2 stop bits
▪ No parity
Timers 0 of an 8253 provide the Transmit and receive baud clocks for the
USART. This timer is initialized by the system firmware to provide proper baud clock based on the
settings of the DIP Switch as shown below.
DIP SWITCH
SW3 SW2 SW1 Baud rate
OFF OFF ON 9,600
Memory selection:
ESA 86/88-2 has four sockets, labeled U9, U8, U7, U6 for RAM. These sockets are configured
for 62256(32X 4) devices. Two of these sockets are populated (providing 64K Bytes of RAM) and
two are for user expansion.
SW7 SW6
27256 ON OFF JP10 – 1-2
DEPARTMENT OF EEE
INTRODUCTION OF MICROPROCESSOR
INTRODUCTION:
Microprocessor is regarded as one of the most important devices in our everyday
machines called computers. Microprocessor is an electronic circuit that functions as the
CPU of a computer, providing computational control. Microprocessor are also used in other
advanced electronic systems, such as computer printers, automobiles and jet airlines
The first Microprocessor was the Intel 4004, produced in 1971. Originally
developed for a calculator and revolutionary for its time, it contained 2300 transistors on a
4-bit microprocessor that could perform only 60,000 operations per second. The first 8-bit
microprocessor was the Intel 8008, developed in 1972 to run computer terminals.
INTEL MICROPROCESSOR:
8086(1979):
Created as a cheaper version of Intel’s 8086, the 8088 was a 16-bit processor with
an 8-bit external bus
80286(1982):
With 16MB of addressable memory and 1GB of a virtual memory, this 16-bit chip
is referred to as the first “modern” microprocessor. It contained 130,000 transistors and
packed serious compute power 12MHz
80386(1985):
The price/performance curve continued its steep climb with the 386 and later the
486- 32 bit processors that brought real computing to the masses. The 386, featured
275,000 transistors, the 486 had more than a million
Pentium (1993):
DEPARTMENT OF EEE
MICROPROCESSORS &MICROCONTROLLERS LAB
he nearest Pentium has dynamic instruction execution and the chip package is
more than 5.5 million transistors
Pentium II (1997):
The 7.5 million transistors Pentium II processor incorporates Intel MMX-TM
technology, which is designed specially to process video, audio and graphics data
efficiently
Pentium-IV (2000):
The Pentium-4 is fabricated in Intel’s 0.18 micron CMOS process. Its die size is
217 , power consumption is 50W. The Pentium-4 is available in 1.4GHz & 1.5Hz bins
Some of the control pins which carry essential signals for all external operations
had more than one function depending upon whether the device operated in ‘min’ or ‘max’
mode. The former was intended for small single processor systems while latter was for
medium and large systems, using more than one processor.
Page
7
DEPARTMENT OF EEE
INTRODUCTION TO MASM SOFTWARE
INTRODUCTION
MASM & TASM are the software’s used for programming the microprocessor 8086.
They are very popular for domestic and commercial use. MASM stands for Macro
Assembler and TASM stands for Turbo Assembler. MASM and TASM programs are
compatible to a lot of extent. We use the MASM software in our Labs.
The MASM software package comes with Three.exe files mentioned below:
• MASM
• LINK
• DEBUG
1
Procedure For Program Execution :
where add1 is the assembly language program file which will be created and in
this file the user types his/her assembly code program.
.asm is the extension of the assembly file.
Once the program typing is over, we have to SAVE the program file and EXIT
from EDITOR and return to MS – DOS.
The switch causes MASM to display the lines that generate compilation errors.
The switch enables information needed by the debugger to be included in the
.OBJ file.
.
5. Then we run the Linker LINK.OBJ- this generates .EXE file from the .OBJ
file
Syntax: link filename.OBJ <ENTER>
Department of EEE
II.MASM – INTRODUCTION
MICROSOFT MACRO ASSEMBLER:
ENTERING A ROGRAM:
The programs are generally entered using the text editor and we use
‘turboc’ as editor. For every assembly language program .asm extension must
be there. The MASM accepts the file name only with extension of .asm .Even if
the file name is without the extension it provides an extension of .asm to it.
SYNTAX: MASM filename.asm;
On the next line the expected .obj file name is to be on the next line entered hy
creates the objects of the assembly language program. The .obj file is allocated
with the entered file name and the .obj extension on the next line a file name is
entered and an extension for the expected listing file of the source file in the
same way as the object file is entered as an extension of .lst exists. The successful
assembly process may generate the .obj, .lst and .crf files which would further
be used by linker to generate an .exe file.
LINKING A PROGRAM:
The dos linking program LINK.EXE is used by MASM to link one different
object modules of the source program and function library routines to generate an
Department of EEE
integrated executable code of the source program. The main input to the linker is
the .obj file that contains the object modules of the source program. Other
supporting information is obtained by the files generated by MASM. The linker
program is invoked using the following syntax.
SYNTAX: LINK filename.obj;
The output of the link program is an executable file whose extension is generated
as .exe. MASM 5.0 uses the complete procedure of assembling and linking under
a single menu invoked compile function.
DEBUGGING A PROGRAM:
Syntax: DEBUG filename.exe
It is a DOS utility that facilitates the debugging and trouble shooting of
the assembly language programs. The debug utility enables us to have the control
of the resources. The debug command at the DOS prompt invokes this facility. A
‘-‘display signals the successful invoke operation to the debug that is further used
as debug prompt for entering the various debugging commands as listed:
COMMAND CHARACTER FUNCTIONS:
-R: display all the registers and flags.
-D: display 128 memory locations of RAM
-E: enter hexadecimal data at current display pointer.
-F: fill memory area byte by byte
-a: assemble from current CS: IP
-u: assemble from current CS: IP
-g: execute from current CS: IP
-s: searches a byte or string of bytes
-q: quit the debug
-t: trace the program execution step by step.
-m: trace the move and bytes from offset1
-n: set file name pointer to filename.
-l: loads the filename.exe in the ram.
Department of EEE
Exp No.1: Programs for 16 bit arithmetic operations for 8086
(Using Various Addressing Modes).
i) 16 bit addition:
1.a) AIM: Write an assembly language program to add two 16-bit numbers
RESULT:
-g
AX=5454 BX=1111 CX=0023 DX=0000 SP=0000 BP=0000
SI=0000 DI=0000 DS=0B7F
Department of EEE
1.(b). AIM: write an assembly language program to subtract two 16-
bit numbers
RESULT:
-G AX=2000 BX=2000 CX=0000 DX=0000 SP=0000BP=0000
SI=0000 DI=0000 DS=0B7F
Department of EEE
1.(c)AIM: write an assembly language program to multiplication of
two 16-bit numbers
RESULT:
-G AX=8000 BX=0002 CX=0000 DX=0000 SP=0000BP=0000
SI=0000 DI=0000 DS=0B7F
Department of EEE
1.(d)AIM: write an assembly language program to perform division
between two 16-bit numbers
RESULT:
-G AX=0020 BX=0002 CX=0000 DX=0000 SP=0000BP=0000
SI=0000 DI=0000 DS=0B7F
Department of EEE
PROGRAMS USING 8086 KIT
a)
16 bit addition:
Output:
Input output
Register Dat Register Data
a
AX 434 AX 5454
3
BX 111
1
Output:
Department of EEE
Input output
Register Data Register Data
AX 4343 AX 3232
BX 1111
16 bit multiplication:
OUTPUT:
Input Output
Register Data Regis Data
ter
AX 4343 AX EA73
BX 1111 DX 047B
Department of EEE
d)16bit by 8 bit division:
OUTPUT:
Input Output
Register Data Register Data
AX 0100H AL 01
BL FFH AH 01
Viva:
EXERCISE:
1. Write an alp program for addition and subtraction of two 16bit numbers?
1) A278
2) B634
Department of EEE
2. Write an alp program for multiplication and division of two 16bit numbers?
1) 0012
2) 0006
OUT COMES:
1. Able to write the assembly language programs for arithmetical operations.
2. Able to use different segments to store the data.
Department of EEE
EXP NO: 2 Program for string manipulations for 8086.
PROCEDURE:
1. Required number or character load into AL or AX register
2. Using the SCAN instruction search is performed
3. If the required number or character is present in a string then we
will get display “found” otherwise get the display “notfound”
PROGRAM:
ASSUME CS:CODE,DS:DATA ,ES:EXTRA
DATA SEGMENT
STRING1 DB 0AH,0DH,"ENTER A CHARACTER:",0AH,0DH,"$"
STRE DB "FOUND$"
STRNE DB "NOT FOUND$"
DATA ENDS
EXTRA SEGMENT
STRING2 DB "CMRCE$"
STRLEN EQU ($-STRING2)
EXTRA ENDS
CODE SEGMENT
START:MOV AX,DATA
MOV DS,AX
MOV AX,EXTRA
MOV ES,AX
MOV DX,OFFSET STRING1
MOV AH,09H
INT 21H
MOV AH,08H
INT 21H
MOV DI,OFFSET STRING2
REPNE SCASB
JZ LABLE
MOV DX,OFFSET STRNE
MOV AH,09H
INT 21H
JMP EXIT
LABLE:MOV DX,OFFSET STRE
MOV AH,09H
INT 21H
MOV AH,4CH
INT 21H
EXIT: INT 03H
Department of EEE
CODE ENDS
END START
Output: FOUND
Viva:
Department of EEE
2(b): Program for transfer of a string from one location to other
location
AIM: Write an assembly language program for block transfer of given string from
data segment to extra segment
PROCEDURE:
1. Load the given string into the source location. i.e into data segment
2. Using the string instructions like MOVSB, CMPSB,SCASB perform the string
operations
HINT: For string operations source is data segment, destination is extra segment
PROGRAM:
ASSUME CS:CODE, DS:DATA ,ES:EXTRA
DATA SEGMENT
SRCDATA DB “MPMC LAB $”
COUNT EQU 08H
DATA ENDS
EXTRA SEGMENT
DSTDATA DB 08 DUP(0)
EXTRA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA,ES:EXTRA
START: MOV AX,DATA
MOV DS,AX
MOV AX,EXTRA
MOV ES,AX
MOV SI,OFFSET SRCDATA
MOV DI,OFFSET DSTDATA
MOV CL, COUNT
CLD
REP MOVSB
MOV DI,OFFSET DSTDATA
MOV AX,[DI)]
MOV BX,[DI+2]
MOV CX,[DI+4]
MOV DX,[DI+6]
INT 03H
CODE ENDS
END START
Department of EEE
Result:
d ds:0
0B40:0000 4D 50 4D 43 20 4C4142 20 24 MPMC LAB $
0B40:0010 4D 50 4D 43 20 4C 42 20 24 MPMC LAB $
Department of EEE
2(c) program for reverse of a string
AIM: Write an assembly language program for reverse of a given string
RESULT:
D DS:0
Department of EEE
2(d) program for comparison of two strings
DATA SEGMENT
STRING1 DB 'EMPTY$'
STRLEN EQU ($-STRING1)
NOTSFUL DB 'STRINGS ARE UNEQUAL$'
SFUL DB 'STRINGS ARE EQUAL$'
DATA ENDS
EXTRA SEGMENT
STRING2 DB 'EMPTY$'
EXTRA ENDS
CODE SEGMENT
START:MOV AX,DATA
MOV DS,AX
MOV AX,EXTRA
MOV ES,AX
MOV CX,STRLEN
CLD
MOV SI,OFFSET STRING1
MOV DI,OFFSET STRING2
REP CMPSB
JZ FORW
MOV DX,OFFSET NOTSFUL
MOV AH,09H
INT 21H
JMP EXITP
FORW:MOV DX,OFFSET SFUL
MOV AH,09H
INT 21H
EXITP:
NOP
MOV AH,4CH
INT 21H
CODE ENDS
END START
Department of EEE
PROGRAMS USING 8086 KIT:
OUTPUT:
output
Input
MEMORY Data MEMORY Data
LOCATION LOCATION
2000 01 2008 01
2001 04 2009 04
2002 03 200A 03
2003 02 200B 02
2004 01 200C 01
2005 04 200D 04
2006 03 200E 03
2007 02 200F 02
Department of EEE
B) Reverse of a data:
OUTPUT:
Input outpu
t
MEMORY Data MEMORY Data
LOCATION LOCATION
2000 01 2008 08
2001 02 2009 07
2002 03 200A 06
2003 04 200B 05
2004 05 200C 04
2005 06 200D 03
2006 07 200E 02
2007 08 200F 01
Department of EEE
C) Comparison of TWO strings
INT 3
OUTPUT:
Out put
Input
MEMORY String MEMORY String 2 AL=00,
1 data Indicates
data That Two
LOCATION LOCATION Strings Are
Equal
2000 01 2008 01
2001 02 2009 02
2002 03 200A 03
2003 04 200B 04
2004 05 200C 05
Viva:
Department of EEE
4) What is the relation between 8086 processor frequency & crystal Frequency?
EXERCISE:
1. Write an alp for insert or delete a byte in a given string with SI memory location
is 4000 and DI location is 6000?
Department of EEE
EXP NO: 3 Program Using Logical Instructions
AIM: Write an assembly language program to perform logical AND,OR
and XOR operations.
DATA SEGMENT
NUM1 DW 1234H
NUM2 DW 4567h
DATA ENDS
EXTRA SEGMENT
RESULT DW 03 dup(0000h)
EXTRA ENDS
CODE SEGMENT
START:MOV AX,DATA
MOV DS,AX
MOV AX,EXTRA
MOV ES,AX
MOV AX,NUM1
MOV BX,NUM2
AND AX,BX
MOV [RESULT],AX
MOV AX,NUM1
MOV BX,NUM2
OR AX,BX
MOV [ RESULT+2],AX
MOV AX,NUM1
MOV BX,NUM2
XOR AX,BX
MOV [ RESULT+4],AX
INT 3H
CODE ENDS
END START
RESULT:NUM1:1234H, NUM2:4567H
Department of EEE
EXP NO: 4 (a) Program Using Shift & Branch
Instructions
I/P: NUM=34H
O/P :BL=03H ( NUMBER OF ONE’S IN A GIVEN NUMBER)
Department of EEE
4(B) Program Using Rotate Instructions
CODE SEGMENT
ASSUME DS:DATA, CS:CODE
START:
MOV AX,DATA
MOV DS,AX
MOV CL,04H
MOV AL,BCD
ROL AL,CL
ROR AL,CL
MOV BL,AL
MOV AL,BCD
ROR AL,04H
MOV BH,AL
ADD BX,3030H
MOV ASCII,BX
INT 3H
CODE ENDS
END START
RESULT: ALP for Conversion Of BCD To ASCII is Performed and the result is
stored in the memory location .
EXPECTED OUTPUT:
Department of EEE
(ii) AIM: To Write a ALP for Conversion of ASCII to BCD Number
APPARATUS: MASM S/W, PC
PROGRAM: DATA SEGMENT
NUM DW 3435H
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA, CS:CODE
START:
MOV AX,DATA
MOV DS,AX
MOV CL,04H
MOV AX,NUM
ROL AL,CL
ROR AL,CL
MOV BL,AL
MOV AH,NUM
ROL AL,04H
MOV AL,BL
INT 3H
CODE ENDS
END START
RESULT: ALP for Conversion of ASCII to BCD is Performed and the result
is stored in AL
Expected output:
ASCII num= 3435h
BCD=45h
Department of EEE
Cycle 2: Using 8051 Microcontroller Kit
Exp.No.1: Programming using arithmetic, logical and bit
manipulation Instructions of 8051.
1(a)AIM: Write an assembly language program to perform Addition of two
16 bit numbers present in data memory locations 9000 : 9003.Store the result
in 9004& 9005 .
Result:
Input: Output:
MD 9000,9001 4567H MD 9004 CEH
9002,9003 5567H 9005 9AH
Department of EEE
1(b). AIM: Write an assembly language program to perform logical AND operation
of two 16 bit numbers present in a data memory locations 9000 : 9003.Store the
result in 9004 &9005 Data Memory?
Result:
Input: Output:
MD 9000,9001 4567H MD 9004 67H
9002,9003 5567H 9005 40H
Department of EEE
1(c). AIM: Write an assembly language program to perform Subtraction of two 16
bit numbers present in a data memory locations 9000 : 9003.Store the result in 9004
&9005 Data Memory?
Result:
Input: Output:
MD 9000,9001 4567H MD 9004 00H
9002,9003 5567H 9005 F0H
Department of EEE
1(d). AIM: Write an assembly language program to perform Multiplication of two
16-bit numbers present in data memory locations . Store the result in R4,R5,R6&R7
Registers?
PROGRAM:
ORG 0000H
MOV R0,#0FFH ;MSB1
MOV R1,#0EFH ;MSB2
MOV R2,#0FFH ;LSB1
MOV R3,#9DH ;LSB2
MOV A,R2
MOV B,R3
MUL AB
MOV R4,A
MOV R5,B
MOV A,R2
MOV B,R1
MUL AB
MOV R6,B
ADDC A,R5
MOV R5,A
MOV A,R1
MOV B,R4
MUL AB
ADDC A,R5
MOV R5,A
MOV A,B
ADDC A,R6
MOV R6,A
MOV A,R1
MOV B,R2
MUL AB
ADDC A,R6
MOV R6,A
MOV A,B
ADDC A,#00H
MOV R7,A
END
Department of EEE
Result:
Input: Output:
MD NUM1: FFFFH MD R5 R4: 1063H
NUM2: EF90H R7 R6: EF9CH
Department of EEE
1 (e). AIM: Write an assembly language program to perform Logical OR Operation
of two numbers present in a data memory locations 9000 : 9003.Store the result in
9004 &9005 Data Memory?
Result:
Input: Output:
MD 9000,9001 05 05H MD 9004: 07H
9002,9003 06 06H 9005: 07H
Department of EEE
1(f). AIM: Write an assembly language program to perform Logical XOR Operation
of two numbers present in a data memory locations 9000 and 9001.Store the result in
9002 Data Memory?
Result:
Input: Output:
MD 9000 05 MD 9002 03
9001 06
Viva:
1.Differences between 8086 & 8051
2. What is the Internal memory of 8051
3.Write flag register of 8051
4.Explain stack operation in 8051
5. Explain the registers 0f 8051
Department of EEE
EXP.NO.2: Time delay Generation Using Timers of 8051.
PROGRAM:
MOV TMOD,#01 ;Timer 0, mode 1(16-bit mode)
HERE: MOV TL0,#0F2H ;TL0=F2H, the low byte
MOV TH0,#0FFH ;TH0=FFH, the high byte
CPL P1.5 ; toggle P1.5
ACALL DELAY
SJMP HERE
DELAY:
SETB TR0 ;start the timer 0
AGAIN: JNB TF0,AGAIN ; monitor timer flag 0
;until it rolls over
CLR TR0 ;stop timer 0
CLR TF0 ;clear timer 0 flag
RET
Output:
Port1 5th bit is toggled for every 3.3 milli seconds
Department of EEE
EXP. NO.3: Serial Communication from / to 8051 to / from
I/O devices
(a) AIM: Write an assembly language program to Transfer Serial data in 8051.
output: H
PROGRAM:
OUTPUT: P2=A0H
Department of EEE
EXP.NO.4: Program to Generate Squarewave.
PROGRAM:
Department of EEE
EXP No: 1. Interfacing of 7 Segment Display to 8051.
Department of EEE
MOVX @DPTR,A
ACALL DELAY
Department of EEE
AIM: Write an assembly language program for interfacing keyboard to 8051
EQUIPMENT REQUIRED:
PC
8051 Micro Controller Hardware kit
5V Power Supply
Keyboard
Keil software
Keyboard interface module
FRC cable
Software: Xassembler (X8051)
PROGRAM:
MOV A, R6
RL A
MOV R6, A
MOV A,R5
ADD A,#04
MOV R5,A
Department of EEE
MOV A,R5
ADD A,R4
MOV DPTR, #0A004H
MOVX @DPTR, A
SJMP INIT
K3: INC R4
SJMP K2
END
Output: If key “ F” is typed from the keyboard then it is displayed on the display
as “1111”.
Department of EEE
Exp. No: 3 Sequence Generator Using Serial Interface in
8051.
Aim: Write a ALP to send a set of characters serially and receive at receiver
end .
Program:
Transmitter:
$MOD51
ORG 8200H
MOV TMOD,#20H
MOV TH1, #-3
MOV SCON, #50H
SETB TR1
AGAIN: MOV A, #'Y'
ACALL TRANS
MOV A, #'E'
ACALL TRANS
MOV A, #'S'
ACALL TRANS
MOV A, #'#'
ACALL TRANS
SJMP $
Department of EEE
Receiver:
$MOD51
ORG 8300H
MOV TMOD, #20H
MOV TH1, #-3
MOV SCON,#50H
MOV DPTR, #8400H
SETB TR1
HERE: JNB RI, HERE
MOV A, SBUF
CLR RI
CJNE A,#'#',CONT
SJMP $
output:
At receiver end, ASCII values if “yes” is received in the memory locations 8400h,
8401h,8402h
Department of EEE
EXP.NO:4 8 Bit ADC Interface to 8051.
AIM: Write a ALP for convert analog signal to digital signal using 8 -bit ADC.
PROGRAM:
$MOD51
ORG 00H
LJMP MAIN
ORG 9600H
MOV DPTR,#0A000H
MOVX A,@DPTR
MOV DPTR, #0A004H
MOVX @DPTR, A
Department of EEE
MOV TH1,#01
SETB TR1
BACK1: JNB TF1,BACK1
CLR TR1
CLR TF1
DJNZ R3,AGAIN1
LJMP TOP
END
Output:
Department of EEE
EXP.NO:5 Triangular wave generators through DAC
Interfaces to 8051.
AIM: Write a ALP to generate triangular wave using DAC interfacing with 8051.
PROGRAM:
$MOD51
ORG 00H
LJMP MAIN
ORG 8200H
MAIN: MOV DPTR,#0A003H ;CONTROL WORD REGISTER(PPI 8255).
MOV A,#80H ;PORT A-INPUT, PORT B-OUTPUT
;PORT C(L)-OUTPUT, PORT C(U)-INPUT
MOVX @DPTR,A
MOV R1,#00H ;MOV 0 TO R1
TOP: MOV DPTR, #0A000H ;POINT TO PORT A WHICH IS CONNECTED
MOV A, R1 ;TO INPUT OF DAC
MOVX @DPTR, A ;R1 CONTENT IS SENT TO DAC INPUT
INC A ;IT IS INCREMENTED
MOV R1,A
LJMP TOP ;JUMP TO GIVE ANOTHER INPUT
END
OUT PUT:
Department of EEE