On 3 April 2015 at 16:02, Karsten Merker <[email protected]> wrote: > On Fri, Apr 03, 2015 at 03:09:58PM +0200, Michal Suchanek wrote: > >> I tried to connect an i2c 'arduino-compatible' display to an a10s >> olinuxino and it kind of does not work. Some command sequences make it >> display something but definitely not what was sent to it. >> >> It works when connected to Arduino UNO wired directly to either of 5V >> or 3.3V, gnd, A4 and A5. >> >> It has been pointed out that i2c is supposed to be terminated which is >> something that the Arduino library possibly sets up on the board. >> >> Is it possible to use internal i2c termination on sunxi hardware with >> Linux 4.0 and how is it set up? > > I am not sure whether there is a technical misunderstanding or > whether we perhaps mean different things with the expression > "termination" in the context of connecting external devices. > > I2c does not use any kind of termination in the sense of an > impedance-matched resistor on both ends of a high-frequency > link; i2c is just a simple open-ended two-wire bus. > > If you instead mean pull-up resistors: those are needed for the > i2c bus to operate, as i2c is an open-collector-style bus system. > Technically it does not really matter where they are on the i2c > bus, i.e. they can be on the SoC side or on the device side, as > long as they are present at all, but with one big caveat: if you > are mixing voltage levels, e.g. when connecting a 3.3V SoC to a > 5V external display, you must make sure that the pullups only > connect to the lower-voltage supply - 3.3V in this case. > Otherwise you would feed 5V into the SDA/SCL pins of the SoC > which would probably damage it. > > The usual setup is to place the pull-ups on the side of the > i2c master though, i.e. on the SoC side. > > I don't know whether the i2c pins on the A10s have internal > pull-ups, but perhaps somebody else can answer this part. > > Regarding the 'arduino-compatible' display: are you sure that > this display works properly with 3.3V CMOS logic levels? Many of > the 'arduino-compatible' LCDs I have seen do not work reliably > with logic levels below 5V. >
Yes, that may be the case. The display works powered from 3.3V but the arduino logic is still probably 5V. The pullups are probably optional and may not be on by default so that's another possible source of problems. It's supposed to work with RPi as well but the RPi examples use some RPi-specific lib rather than Linux. And you never know differences in board wiring. Actually, I can probably check the debugfs for pin configuration while the program that is trying to print on the display is running. Thanks Michal -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
