Code runs in simulation but not on chip
The same problem was with me with 16x2 character LCD.
I recognized that Proteus runs the code even without 'pot' connected to Vo pin. Try connecting the 10k pot to Vo pin and calibrate to provide nearly ground potential...