When I have tried interfacing my 16*2 LCD with Arduino I am getting only the black coloured boxes on my screen. What might be the problem?
Is there any solution to that? Do I need to connect any additional physical device to avoid that situation?
There are two possible problems, and you haven't stated which it is.
This is caused by either bad communication (wrong wiring) or incorrect code. Basically, the display isn't being initialized properly by your code for whatever reason.
The display is being initialized properly, so both your code and wiring are correct. However, the contrast setting of the display is wrong. You need to check the wiring for your contrast potentiometer and adjust as necessary.
it's very unusual for the lcd being faulty. since there is no pic that shows how you have connected the lcd i cannot say anything. however you can search "dronebot workshop lcd" on YouTube. Mr Bill had explained it very well he also shows how you can control the lcd by only four wires. go and see that video.