The writecommand is only writing the high nibble. After the first few commands you need to write both nibbles. Do as it says in the datasheet. Note in the table, after writing 2 it then writes in pairs.
Mike.
I think the following sequence need to initialize LCD. which sequence need to write both higher and lower nibble
RD7 RD6 RD5 RD4
15ms wait
0011 Function set
0011 Function set
5ms wait
0011 Function set
0010 Function set 4 bit
0010 Function set 4 bit
NF** N - 0 = 1/8 or 1/11 duty (1 line),
0010 F - 0 = 5×8 dots,, ** = 10
0000 Display ON
1000
0000 clear display
0001
0000
0111 Entry mode set ID = 1 increment cursor position; S = 1 display shift