using arduino mega digital pins for 2 lcd's

Hello I have a question about 2 Hitachi HD44780 compatible lcd's.
I want to connect them both to the arduino mega but I don't want to sacrifice the pwm pins because i will need those for motor control.

One lcd is 16x2 the other is 20x4.

So my question is will the the digital pins 22 to 53 work to for the lcd's
using the liquidcrystal library?

thanks a lot.

Well i hooked it up.
And yes you can use the digital lines for lcd instead of pwm lines.

IIRC you may also be able to save some pins by sharing the same data pins for both LCD's. You would then use a separate CS pin for each LCD.

I'm usually willing to try this but I'm soldering everything on an arduino mega protoshield. so I'm not that willing to de-solder if it doesn't work :stuck_out_tongue:
But I will try it next time if it occurs again.

Thanks anyway.

IIRC you may also be able to save some pins by sharing the same data pins for both LCD's. You would then use a separate CS pin for each LCD.

Yes you do recall correctly. You can share all of the pins except CS. This means you only need one more pin for each additional LCD. Look here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1265969050/3 (scroll down for photos).

Don