Etec 404
Etec 404
Etec 404
(d) Write a program to find the maximum number from a given 8-bit ten numbers.
(h)
Q.NO.2
Q.NO.3
Q.NO.4
Q.NO.5
Q.NO.6
Q.NO.7
Q.NO.8
Q.NO.9
; DISPLAY ON CURSOR ON
;
;
MOV A, #01H
ACALL COMMWRT
ACALL DELAY
; CLEAR LCD
;
;
MOV A, #84H
ACALL COMMWRT
ACALL DELAY
MOV A, #'A'
ACALL DATAWRT
ACALL DELAY
AGAIN :
SJMP AGAIN
COMMWRT:
MOV P1, A
;
CLR P2.0
; RS = 0 FOR COMMAND REGISTER
CLR P2.1
; R/W = 0 FOR WRITE
SETB P2.2
; E = 1 FOR HIGH PULSE
ACALL DELAY
;
CLR P2.2
; E = 0 FOR LOW PULSE
RET
DATAWRT:
MOV P1, A
;
SETB P2.0
; RS = 1 FOR DATA REGISTER
CLR P2.1
; R/W = 0 FOR WRITE
SETB P2.2
; E = 1 FOR HIGH PULSE
ACALL DELAY
;
CLR P2.2
; E = 0 FOR LOW PULSE
RET
DELAY :
MOV R3, #50H ;
BACK:
MOV R4, #255H ;
HERE:
DJNZ R4, HERE ;
DJNZ R3, BACK ;
RET
END