Home/Support/Support Forum/Connecting ConnectME (NS7520 microprocessor) with I2C device
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

Connecting ConnectME (NS7520 microprocessor) with I2C device

0 votes
I would like to know if somebody have tried to connect ConnectME (NS7520 microprocessor) with some I2C bus device. For example: I would like to use PCF8574 (Remote 8-Bit I/O Expander for I2C-Bus. http://www-s.ti.com/sc/ds/pcf8574.pdf). Can I make two ConnectME development board gpio ports act like it is I2C bus? I think I need to connect SDA(serial data) and SCL(serial clock). Maybe there is other solution? I just need to read and write data to that PCF8574 chip from ConnectME module. Any suggestions?
Thank you!
asked Feb 24, 2005 in NET+OS by himem New to the Community (0 points)
recategorized Dec 19, 2013 by tuxembb

Please log in or register to answer this question.

5 Answers

0 votes
The answer:


The NS7520 uP does not provide a native I2C interface. Bit-banging is your only solution.

answered Feb 24, 2005 by dhinman New to the Community (15 points)
0 votes
Anyone have a solution to the startup delay that jams the bus until the ME starts?

answered Feb 24, 2005 by egawtry Veteran of the Digi Community (349 points)
0 votes
Yes, I have attached 7 segment displays along with an 8-bit I/O expander using the I2C protocol off two of the GPIO ports. And yes, it is by bit-banging.
I was only able to get it up to 100 kHz. Considering the type of ARM it is, I was thinking that I should be able to get a higher rate. Well, I have sent something to support, but no response yet.

If you've ever written your own code for an 8051 variant that creates an I2C bus, then you can probably use the same code. You just need to access the Digi's ports a little different.
answered Mar 10, 2005 by Timmyb New to the Community (22 points)
0 votes
Would anyone share some code snippet for this bit-banging?
answered Apr 1, 2005 by mikelis New to the Community (7 points)
0 votes
Sorry, can't provide code snippets. But, here are some hints.

Look into the NS7520 hardware reference document, under the PORTA Configuration register section. There is a register that controls everything for that port. On power up, configure the mode and direction for the two pins that you are going to use for the I2C protocol. Set the direction to outputs, and data as high. You bit-bang the clock and data going out. For the acknowledge bit, quickly change the direction of the SDA pin and read the value. Quickly change the direction back so you can continuing writing data. If you are doing a read, after sending the address, make sure the direction of the SDA pin has changed to input mode so you can read the data coming back.
answered Apr 15, 2005 by Timmyb New to the Community (22 points)