hi p89v51rd2 interfacing with jhd 162a , nothing displayed , give me the solution

Status
Not open for further replies.

chasekan@gmail.com

Member level 1
Joined
Jun 23, 2013
Messages
35
Helped
1
Reputation
2
Reaction score
1
Trophy points
8
Visit site
Activity points
255
Org 00h
mov a,#38h
acall cmnwrt
acall delay
mov a,#0eh
acall cmnwrt
acall delay
mov a,#01h
acall cmnwrt
acall delay
mov a,#06h
acall cmnwrt
acall delay
mov a,#84h
acall cmnwrt
acall delay
mov a,#'n'
acall datawrt
acall delay
mov a,#'o'
acall datawrt
l1: Sjmp l1
cmnwrt: Mov p1,a
clr p2.0
clr p2.1
setb p2.2
acall delay
clr p2.2
ret
datawrt: Mov p1,a
setb p2.0
clr p2.1
setb p2.2
acall delay
clr p2.2
ret
delay: Mov r3,#50
l2: Mov r4,#255
l3: Djnz r4,l3
djnz r3,l2
ret
end
 

Try the following LCD commands in the order (its in C, take the commands from it.)

LCD_command(0x38); // 8-bit, 2 Line, 5x7 Dots
LCD_command(0x38);
LCD_command(0x38);
LCD_command(0x08);
LCD_command(0x01); // Clear LCD
LCD_command(0x06); // entry mode , auto increment with no shift
LCD_command(0x0C); // Display ON , cursor blinking command

Also you need to specify some details like its PIN's configs. Here I think p2.0 is RS line. p2.1 is RW and p2.2 is E. Just try by putting the delay call just after the H->L transistion on E pin. like
setb p2.2
clr p2.2
acall delay
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…