HD44780 20x4 issue (showing all squares)

Let's start all over again.

From your original post:

I'm having a trouble with a 20x4 LCD.

It would help if we knew exactly which LCD you are using. It's part number would be sufficient and a link to it's data sheet would be even better.

Obviously, every connection is made correctly.

This is not at all obvious since your display is not working properly. It is quite possible that you are completely misinterpreting your pin connections, especially if you are using a device with it's row of pins below and to the left of the display. A photograph of your connections would really help here.

From Reply #5:

I've got a trimmer (10KOhms) but i'm having same issue with this code ...

The code that you are using has nothing to do with the ability to adjust the trimmer to set the correct contrast. As a matter of fact you can, and probably should, adjust the trimmer before you ever connect your LCD to your Arduino.

Replies #7 and #9:
Here we are guessing as to what voltage is being used to power your LCD module. Why don't you just tell us?

Reply #10

Man i tried all the stuff above, i even connected the contrast pin to a digital out (pin 9) to select the voltage... like that:

I wasn't aware that you could use Analog write with a digital pin. You cannot get the correct contrast setting this way. With a digital pin the output is either high or low. With the output high your display will be blank and with the output low you will (usually) get dark blocks everywhere. Once again - you should get the contrast adjusted properly before you try to run any code and preferably before you even connect the Arduino. If you want to use PWM to set the contrast then do that later on, after you have the device working.

I think i burned something (like some driver, if there is any).

As long as you are seeing the squares there's a good possibility that your display is still usable.

Don