Home/Support/Support Forum/I2C with Connect ME 9210
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

I2C with Connect ME 9210

0 votes
Hi,

I'm trying to get I2C to work with my Digi Connect ME 9210.
I have this lcd module:
http://www.robot-electronics.co.uk/htm/Lcd03tech.htm
and am using the Digi development board.

I have 10K pullup resistors connected to the SDA and SCL pins of the device (pins #17 and #18). These are connected to the 3.3V which powers the device. Now, is it correct that these pull up resistors should be connected to the 3.3V from the Connect ME device, or should they be connected to 5V that the LCD runs off? I've assumed that it should be 3.3V because 5V would be too high for the Connect ME.

In NET+OS, I am running the NAI2CInit function first to initialise I2C. I set it up in Master mode and normal 100KHz speed. This returns I2C_SUCCESS so I know that it is properly set up.

Next I run the NAI2COperation function with parameters:
NAI2COperation(0xC6, "Hello", &stringLen, NULL, NULL, 100, I2C_HOST_WRITE_ONCE);

This function should write to the LCD, however it returns I2C_FAIL; so the operation failed.

Anyone have any ideas?

Thanks
asked Sep 22, 2009 in NET+OS by adamp New to the Community (21 points)
recategorized Dec 18, 2013 by tuxembb

Please log in or register to answer this question.

6 Answers

0 votes
HI,

You will also have to make sure that the multiplexor for the GPIO lines are correctly set up for I2C. I believe that this will be in gpio.h
answered Sep 23, 2009 by rdeabill Community Contributor (142 points)
0 votes
You may find that the differing supply voltages are part of the problem. We use a PCA9512 to do the conversion and buffer the bus.

Dependent on cable lengths, the 10K resistors may also not be low enough to give a reasonable rise time on the I2C signals. We actually use 1K.

Finally, if you look at the code example they give, you have to specifiy a register number (zero) as the first character of the data.

Are you using Net+O/S 7.4 with the latest patches? There have been one or two bug fixes related to I2C, although they're more likely to bite you later if you're running old software.
answered Sep 23, 2009 by steved1 Community Contributor (85 points)
0 votes
Ok, got that done:

I set BSP_GPIO_MUX_I2C in gpio.h to BSP_GPIO_MUX_USE_PRIMARY_PATH instead of BSP_GPIO_MUX_INTERNAL_USE_ONLY which it was set to by default. This should enable I2C on its primary path which I think is pins #17 and #18.

I'm still getting the same response though; I2C_FAIL.
answered Sep 23, 2009 by adamp New to the Community (21 points)
0 votes
First, I am using NET+OS 7.4 with all the latest patches, so I should have got any of the bug fixes relating to I2C.

With regard to the PCA9512, is that necessary in my situation as I only have one device running off I2C and don't need any expansion?

I have changed the pull-up resistors from 10K to 1K but this has made no difference so far.

I have also looked at the sample that digi give for I2C, I see they do specify a register number but their whole example is based around the PCA9554 part.
How could this be modified to fit my example?

Thanks
answered Sep 23, 2009 by adamp New to the Community (21 points)
0 votes
Hello,
Was this issue resolved?
I am getting the same I2C_FAIL trying any NAI2COperation.
The NAI2CInit returns I2C_SUCCESS.
I monitor the SDA and SCL signals with the oscilloscope and see no activity.

I have tried the nai2capp example - the same problem.
answered Jun 28, 2010 by Andrey New to the Community (11 points)
0 votes
I had the same problem. To get I2C working, you need to flash both firmware and bootloader code.
answered Sep 10, 2010 by aleppin New to the Community (1 point)
...