Olimex LCD 16x2 shield. Analog connection.

Started by Yannick, March 01, 2016, 03:46:46 PM

Previous topic - Next topic

Yannick

Hey guys,

i connected the LCD shield to an Arduino Yun. The problem is that the Analog pins 4 and 5 of the Yun are already in use.Therefore i connected the LCD shield from 4 and 5 to the Arduino on 1 and 2 via two wires.

Is it possible to change the analog pins in the library or how do i address them now?

The example sketch "Buttons_and_LCD" is working. What do i control with the analog pins?

I am grateful for your help

Regards

Yannick

kyrk.5

According to the schematic there is an I2C (SDA + SCL) connection and a Serial (RXD + TXD) connection possible betwen the LCD Shield and the Arduino.

"Is it possible to change the analog pins in the library or how do i address them now?" and "What do i control with the analog pins?"
I think the analog pins are in reality I2C pins. So in the library you must look after the I2C config.

First you should check out what type of connection is your library using. Is it the Serial or I2C. I assume it will be the Serial. I think this because you told that the demo is working. Maybe you even do not need the I2C connection. Read the manual from the shield and look what kind of difference is between the two interfaces. Maybe one of them support more commands, maybe not. Normally I would use the I2C interface, since the I2C connection can support multiple slaves (even multiple master), while the Serial is more or less point to point so one master and one slave (sure there are exceptions but that involves some protocol based on the serial comm).

Again: "Is it possible to change the analog pins in the library or how do i address them now?"
In case you would like to use the I2C communication interface. First you should check out which pin is really used on your Arduino platform as an I2C. I am not familiar with the Arduino stuff, so I do not know such things. Then you should connect the shield to that pins. Remember, if the I2C pins are used for I2C, it is allowed to have multiple slaves. So it is no problem if there is an other device hanging on it (as long as it is using I2C). You have only a problem if the device connected to that given pin is using this pin NOT as an I2C. Assume the I2C pin is shared with Analog input. Then of course you have a problem.
Normally only some pins are supporting I2C because there is a HW module in the uC inside, that is bound to that pin. If this HW is used then it is not so easy to remap this functionality to other pin. If the I2C is implemented in SW, than it is possible. Look after Arudion forums how the I2C can be remapped.