mrarslanahmed
Full Member level 2
- Joined
- Nov 15, 2011
- Messages
- 143
- Helped
- 6
- Reputation
- 12
- Reaction score
- 6
- Trophy points
- 1,298
- Location
- gujranwala pakistan
- Activity points
- 2,206
I AM TRYING A HALLO WORLD PROGRAM ON LCD BUT ITS NOT WORKING
I DOWNLOADED DIFFERENT TUTORIALS AND WORKED THE WAY GIVEN IN THOSE TUTORIALS...
MY CODE IS:
ORG 00H
MOV A,#38H
ACALL COMNWRT
MOV A,#38H
ACALL COMNWRT
MOV A,#0EH
ACALL COMNWRT
MOV A,#01H
ACALL COMNWRT
MOV A,#06H
ACALL COMNWRT
MOV A,#08H
ACALL COMNWRT
;_________________________________
MOV A,#'H'
ACALL DATAWRT
MOV A,#'A'
ACALL DATAWRT
MOV A,#'L'
ACALL DATAWRT
MOV A,#'O'
ACALL DATAWRT
MOV A,#' '
ACALL DATAWRT
MOV A,#'W'
ACALL DATAWRT
MOV A,#'O'
ACALL DATAWRT
MOV A,#'R'
ACALL DATAWRT
MOV A,#'D'
ACALL DATAWRT
COMNWRT:
MOV P1,A
CLR P3.7 ;RS
NOP
CLR P3.6 ;READ/WRITE
SETB P3.5 ; ENABLE
NOP
CLR P3.5
NOP
ACALL DELAY
RET
DATAWRT:
MOV P1,A
SETB P3.7 ;RS
NOP
CLR P3.6 ;READ,WRITE
SETB P3.5 ; ENABLE
NOP
CLR P3.5
NOP
ACALL DELAY
RET
DELAY:
MOV R3,#0FH
HERE2:
MOV R4,#0FH
HERE:
DJNZ R4,HERE
DJNZ R3,HERE2
RET
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
END
CODE WAS TRIED ON PROTEUS...THE DESIGN IS
I DOWNLOADED DIFFERENT TUTORIALS AND WORKED THE WAY GIVEN IN THOSE TUTORIALS...
MY CODE IS:
ORG 00H
MOV A,#38H
ACALL COMNWRT
MOV A,#38H
ACALL COMNWRT
MOV A,#0EH
ACALL COMNWRT
MOV A,#01H
ACALL COMNWRT
MOV A,#06H
ACALL COMNWRT
MOV A,#08H
ACALL COMNWRT
;_________________________________
MOV A,#'H'
ACALL DATAWRT
MOV A,#'A'
ACALL DATAWRT
MOV A,#'L'
ACALL DATAWRT
MOV A,#'O'
ACALL DATAWRT
MOV A,#' '
ACALL DATAWRT
MOV A,#'W'
ACALL DATAWRT
MOV A,#'O'
ACALL DATAWRT
MOV A,#'R'
ACALL DATAWRT
MOV A,#'D'
ACALL DATAWRT
COMNWRT:
MOV P1,A
CLR P3.7 ;RS
NOP
CLR P3.6 ;READ/WRITE
SETB P3.5 ; ENABLE
NOP
CLR P3.5
NOP
ACALL DELAY
RET
DATAWRT:
MOV P1,A
SETB P3.7 ;RS
NOP
CLR P3.6 ;READ,WRITE
SETB P3.5 ; ENABLE
NOP
CLR P3.5
NOP
ACALL DELAY
RET
DELAY:
MOV R3,#0FH
HERE2:
MOV R4,#0FH
HERE:
DJNZ R4,HERE
DJNZ R3,HERE2
RET
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
END
CODE WAS TRIED ON PROTEUS...THE DESIGN IS