Re: interfacing
i didn't got u actually...please explain me
Added after 1 minutes:
ok i'm sending u my code..plse check it....is it correct
DB0 EQU P1.0
DB1 EQU P1.1
DB2 EQU P1.2
DB3 EQU P1.3
DB4 EQU P1.4
DB5 EQU P1.5
DB6 EQU P1.6
DB7 EQU P1.7
EN EQU P3.7
RS EQU P3.6
RW EQU P3.5
DATA EQU P1
WAIT_LCD:
CLR EN ;
CLR RS ;
SETB RW ;
MOV DATA,#0FFh ;
SETB EN ;
MOV A,DATA ;
JB ACC.7,WAIT_LCD ;
CLR EN ;
CLR RW
RET
INIT_LCD:
CLR RS
MOV DATA,#38h
SETB EN
CLR EN
LCALL WAIT_LCD
CLR RS
MOV DATA,#0Eh
SETB EN
CLR EN
LCALL WAIT_LCD
CLR RS
MOV DATA,#06h
SETB EN
CLR EN
LCALL WAIT_LCD
RET
CLEAR_LCD:
CLR RS
MOV DATA,#01h
SETB EN
CLR EN
LCALL WAIT_LCD
RET
WRITE_TEXT:
SETB RS
MOV DATA,A
SETB EN
CLR EN
LCALL WAIT_LCD
RET
LCALL INIT_LCD
LCALL CLEAR_LCD
MOV A,#'R'
LCALL WRITE_TEXT
MOV A,#'O'
LCALL WRITE_TEXT
MOV A,#'O'
LCALL WRITE_TEXT
MOV A,#'M'
LCALL WRITE_TEXT
MOV A,#'.'
LCALL WRITE_TEXT
MOV A,#'N'
LCALL WRITE_TEXT
MOV A,#'O'
LCALL WRITE_TEXT
MOV A,#'.'
LCALL WRITE_TEXT
MOV A,#8CH
LCALL WRITE_TEXT
MOV A,#'3'
LCALL WRITE_TEXT
MOV A,#'0'
LCALL WRITE_TEXT
MOV A,#'1'
LCALL WRITE_TEXT
CLR RS
MOV DATA,#140h
SETB EN
CLR EN
LCALL WAIT_LCD
MOV A,#'M'
LCALL WRITE_TEXT
MOV A,#'r'
LCALL WRITE_TEXT
MOV A,#'.'
LCALL WRITE_TEXT
MOV A,#'S'
LCALL WRITE_TEXT
MOV A,#'U'
LCALL WRITE_TEXT
MOV A,#'R'
LCALL WRITE_TEXT
MOV A,#'A'
LCALL WRITE_TEXT
MOV A,#'N'
LCALL WRITE_TEXT
MOV A,#'J'
LCALL WRITE_TEXT
MOV A,#'I'
LCALL WRITE_TEXT
MOV A,#'T'
LCALL WRITE_TEXT
MOV A,#'K'
LCALL WRITE_TEXT
MOV A,#'O'
LCALL WRITE_TEXT
MOV A,#'S'
LCALL WRITE_TEXT
MOV A,#'T'
LCALL WRITE_TEXT
MOV A,#'A'
LCALL WRITE_TEXT
i want this msg to be displayed foe 20 sec and after that new text will be displayed waht should i right??
LCALL INIT_LCD
LCALL CLEAR_LCD
MOV A,#'R'
LCALL WRITE_TEXT
MOV A,#'O'
LCALL WRITE_TEXT
MOV A,#'O'
LCALL WRITE_TEXT
MOV A,#'M'
LCALL WRITE_TEXT
MOV A,#'.'
LCALL WRITE_TEXT
MOV A,#'N'
LCALL WRITE_TEXT
MOV A,#'O'
LCALL WRITE_TEXT
MOV A,#'.'
LCALL WRITE_TEXT
MOV A,#8CH
LCALL WRITE_TEXT
MOV A,#'3'
LCALL WRITE_TEXT
MOV A,#'0'
LCALL WRITE_TEXT
MOV A,#'2'
LCALL WRITE_TEXT
CLR RS
MOV DATA,#140h
SETB EN
CLR EN
LCALL WAIT_LCD
MOV A,#'M'
LCALL WRITE_TEXT
MOV A,#'r'
LCALL WRITE_TEXT
MOV A,#'.'
LCALL WRITE_TEXT
MOV A,#'M'
LCALL WRITE_TEXT
MOV A,#'A'
LCALL WRITE_TEXT
MOV A,#'N'
LCALL WRITE_TEXT
MOV A,#'I'
LCALL WRITE_TEXT
MOV A,#'S'
LCALL WRITE_TEXT
MOV A,#'H'
LCALL WRITE_TEXT
MOV A,#' '
LCALL WRITE_TEXT
MOV A,#'Y'
LCALL WRITE_TEXT
MOV A,#'A'
LCALL WRITE_TEXT
MOV A,#'D'
LCALL WRITE_TEXT
MOV A,#'A'
LCALL WRITE_TEXT
MOV A,#'V'
LCALL WRITE_TEXT
Added after 5 minutes:
it will display in this format
ROOM NO.301
Mr.SURANJIT KOSTA