Itlab
Itlab
8,9,10,11a,12,13 in
your observations
8. DAC Interface-Waveform generations
Aim: 8086 Assembly language to interface a 8‐bit D‐A converter and convert digital to analog
(generate square and triangular)
Algorithm:
Procedure:
MOV DX, AL
OUT DX, AL
OUT DX, AL
LOOP UP
MOV AX, CX
POWN: DEC AL
OUT DX, AL
OUT DX, AL
LOOP DOWN
JMP START
OUT DX, AL
OUT DX, AL
MOV AL,00
OUT DX, AL
Algorithm:
i) This program makes the stepper motor to rotate the stepper motor in left (or) right
direction with required speed
ii) This program is in serial mode or LCD mode alone of operation
iii) The program is executed in stand alone mode (or) serial mode of operation
iv) The program starts at memory location of 0:5000H
Procedure:
Algorithm:
ii) This program displays the value of the pressed key on the pc console
iv) This program can be executed in stand alone mode (or) serial mode of operation
vi) Please refer ESA 86/88E users manual for mnemonic systax
Procedure:
i) An algorithm is developed
iv) Reset status is used when the contents to use RAM or not distributed it on board
200D 4B 45 59 MES:
20 50 52
DB ‘KEY
2013 45 53 53 PRESSED=’,0H
45 44 20
2019 3D 20 00
2021 2E CS
2040 EC IN AL,DX
2059 74 05 JZ ROW
2068 0A C3 OR AL,BL
206F C3 RET
2076 59 POP CX
2077 C3 RET
Algorithm:
iii) This program move a block of 16 bytes of data from program memory to data memory
iv) The program can be executed in stand alone mode or serial mode of operation
Procedure:
iii) RESET Status is used when the contents of user RAM are not disturbed it on board.
iv) Load data in program memory at 9000 memory location using MP 9000 command.
MOV R2, # 10
L1: CLR A
MOVC A, @ A+DPTR
MOVX @ DPTR, A
INC DPTR
DJNZ R2, L1
LIMP 0
Aim: Write an ALP to move a Block of Data from one memory location to another location.
12b) Aim: Write an ALP using 8051 to perform division of two 8 bit numbers
Additional Programs:
1.Aim: To add 5 BCD data items that are stored in RAM locations starting at 30H.
Example:
Sample Data:
[30] = 01
[31] = 02
[32] = 03
[33] = 04
[34] = 05
Result:A = 15
MOV C, 01H //move bit addressible memory location 01h's content to carry
SETB 01H
ANL C, 01H //logically and bit addressible memory 01h content with carry
ORL C, 01H //logically or bit addressible memory 01h content with carry
SJMP $ END
Example:
The number of counts for the roll over is FFFH – 0000H = FFFFH ( 65535 D ).
However we add one to 65535 because of the extra clock needed when it rolls over from
FFFF to 0 and raises the TF flag. This gives 65535 × 0.6002 µs = 39.334 ms for half the
pulse. For the entire period it is T = 2 × 39.334 ms = 78.668 ms as the time delay generated
by the timer
#00
MOV TH0,
LCALL DELAY
SJMP HERE
AGAIN
CLR
TR0
CLR TF0
RET