LCD 16*2 assign pins?

When using a LCD 16'*2 with the parallel (4bit) interface, is it possible to assign other pins than the commonly used ? So By changing the liquidCrystal lcd (12,11,5,4,3,2) ?
Would like to free up the PWM pins.

I'm aware that I could use a parallel to serial converter.

See: LiquidCrystal - LiquidCrystal() - Arduino Reference

Had a look, but as far as I can see, it doesn't say anything about in what case other pins could be used on the Arduino. Can I pick as I want, or are there some restrictions or criteria for some of the pins? I could off course just give it a try, but would be nice to know before soldering.

LiquidCrystal lcd (12,11,5,4,3,2)  // start with a capital L
LiquidCrystal(rs, enable, d4, d5, d6, d7) 

You are simply creating a mapping in the arguments to the function
Arduino Pin 12 to LCD pin rs
Arduino Pin 11 to LCD pin enable
etc.

You should be able to use any digital capable pin (which excludes pins A6 and A7 on a Nano)

It is always best to test before soldering if possible (or use header pins and dupont connectors)

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.