Pages: [1]   Go Down
Author Topic: Pin Configuration Change for LCD Display[Solved]  (Read 1004 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi So i understand that this is the usual pin configuration for the Arduino.

LCD RS pin to digital pin 12
LCD Enable pin to digital pin 11
LCD D4 pin to digital pin 5
LCD D5 pin to digital pin 4
LCD D6 pin to digital pin 3
LCD D7 pin to digital pin 2

But some of these pins are being used otherwise (eg: as outputs for PWM of Timer0).
My question is : does the LCD display HAVE to be connected to these pins mentioned or I can shift them to say 24-29 digital pins?
Sorry if this is a really stupid question! I really have no idea and so am asking.
Thank you!
« Last Edit: March 21, 2012, 10:16:09 pm by Jewel » Logged

0
Offline Offline
Jr. Member
**
Karma: 2
Posts: 66
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Make sure your LCD is working as expected using the library default you wrote above.
Then just redo your wiring and change "LiquidCrystal lcd(12, 11, 5, 4, 3, 2);" appropriately in your sketch.

(If you have desparate need to save some pins, consider I2C expander for your LCD - it needs just two wires instead of six.)
« Last Edit: March 21, 2012, 04:16:20 am by qwertysimo » Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 26
Posts: 4119
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi So i understand that this is the usual pin configuration for the Arduino.

LCD RS pin to digital pin 12
LCD Enable pin to digital pin 11
LCD D4 pin to digital pin 5
LCD D5 pin to digital pin 4
LCD D6 pin to digital pin 3
LCD D7 pin to digital pin 2

But some of these pins are being used otherwise (eg: as outputs for PWM of Timer0).
My question is : does the LCD display HAVE to be connected to these pins mentioned or I can shift them to say 24-29 digital pins?
Sorry if this is a really stupid question! I really have no idea and so am asking.
Thank you!

There is no such thing as as a "usual pin configuration",  those just happen to be the pins chosen by the author of the tutorial.

You can use any available Arduino pin, including the so-called 'Analog' pins to interface with your LCD module.

All you have to do is make sure that the pins that you choose to use are called out correctly when you invoke the library.  

[sarcasm]I can't understand how you could have overlooked this information.  All you have to do is:
(1) find the tutorial
(2) scroll almost all the way down to the bottom of the page into the 'See Also' section
(3) click on 'Liquid Crystal Library'
(4) go to the 'Function' section
(5) click on 'LiquidCrystal()
and there you have it.
[/sarcasm]

Of course the addition of some comments would clear this up in most cases without having to search out the information:

//LiquidCrystal lcd(RS, E, D4, D5, D6, D7);
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);      // put your pin numbers here


Don




Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 22
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanx qwertysimo and floresta!
Hahaa! Yeah I went through your 5 point steps and am feeling blonde now. Thanks for the help though!
« Last Edit: March 21, 2012, 08:22:08 pm by Jewel » Logged

Pages: [1]   Go Up
Jump to: