LCD Data bus pins

Is it available for me to use any combination of pins not followed by each other
Example
connect 4 data pins not in order as D2 D5 D4 D7
Or D0 D3 D5 D6
And write as Liquid crystal (RS, RW , D2 , D5 , D4 , D7 )
What will happen in this cases and what is allowed for me only

I use library liquid crystal and lcs 16x2

The LiquidCrystal constructor lets you use any pins in any order.

LiquidCrystal(rs, enable, d4, d5, d6, d7)
LiquidCrystal(rs, rw, enable, d4, d5, d6, d7)

You must always have RS, EN pins. If you use the first constructor, you must hard-wire RW to GND.
Your example has no EN argument. It is not valid.

Avoid using the Serial pins i.e. 0, 1

David.

Using a pin for the r/w signal is a total waste of a pin with the LiquidCrystal library.
If you specify an r/w pin, then the library will set to LOW.
It is a resource costly way to ground the r/w pin on the LCD.

--- bill

I have one more question:
Are d0, d1, d2 and d3 to be grounded at the display side ?
Thanks
Ambro

If you mean is it necessary to connect the Arduino ground to the LCD ground then it is a "no-brainer".

Yes!

probaly not explained well by me :
pins d0, d1, d2 an d3 of the display are not used.
Do I have to connect them to ground ? or they may stay floating instead ?
thanks
Bye

Elesoft:
I have one more question:
Are d0, d1, d2 and d3 to be grounded at the display side ?
Thanks
Ambro

You can leave LCD_D0 .. LCD_D3 as n/c.

If you are already connecting LCD_RW to GND, there is no harm in connecting LCD_D0-D3 to GND too.
I would not connect D0-D3 if LCD_RW is floating or under program control.

David.

Elesoft:
pins d0, d1, d2 an d3 of the display are not used.
Do I have to connect them to ground ? or they may stay floating instead ?

They can be left unconnected.
From my testing, they appear to be pulled down internally so they are not actually floating when left unconnected to anything.

Also, from testing, if you leave r/w unconnected, it won't work as that pin does not seem to default to low or write mode.

--- bill