Ignoring ACK during master send without peripheral slave ack

Post your example source code and application notes to share with others
Post Reply
User avatar
yevgenit
Posts: 84
Joined: Fri Apr 25, 2008 12:47 am
Contact:

Ignoring ACK during master send without peripheral slave ack

Post by yevgenit »

Performance of some embedded devices can be improved by extending length of I2C link, especially with unidirectional information stream like DAC or LCD.

Buffering and galvanic isolation of write-only I2C devices is quite sophisticated due to neediness in dynamic reverse of SDA signal direction for acknowledge bit.

Specialized I2C galvanic isolation devices (e.g. from Philips) are not popular.

The attached is example of ignoring ACK during master TX.

Slightly modified versions of NetBurner Run-time library functions I2CSendBuf() and I2CSend() are used. The modification is ignoring ACK during master send without peripheral slave acknowledge. The modified functions can be free mixed with the original NetBurner Run-time library functions.

For the reference, the original lines of the modified code are commented out instead of delete.

Tested with NetBurner board mod5270b, Atmel EEPROM at24c512, and NetBurner NDDK Rel24_rc2.
Attachments
main.cpp
The attached is example of ignoring ACK during master TX.

Slightly modified versions of NetBurner Run-time library functions I2CSendBuf() and I2CSend() are used. The modification is ignoring ACK during master send without peripheral slave acknowledge. The modified functions can be free mixed with the original NetBurner Run-time library functions.

For the reference, the original lines of the modified code are commented out instead of delete.

Tested with NetBurner board mod5270b, Atmel EEPROM at24c512, and NetBurner NDDK Rel24_rc2.
(6.88 KiB) Downloaded 384 times
Yevgeni Tunik
Embedded/RealTime software engineer
https://www.linkedin.com/in/yevgenitunik/
________________________
rhopf1
Posts: 37
Joined: Mon May 12, 2008 5:57 am

Re: Ignoring ACK during master send without peripheral slave ack

Post by rhopf1 »

Arrgh, spent a few weeks back in 2007 dealing with that idiosyncrasy using a Philips I2C bus extender. Needless to say had to suppress the ACK on transmit, I do enforce it's receipt on the address byte which gives me the warm-fuzzy the device is actually on the bus and functioning.

Not sure why the bus extenders aren't more popular I'm operating over about 40-60 feet in a semi-enclosed environment. Also have a possible use for an inexpensive temperature monitoring chain down a 200' line, also a friendly room temp. app.

Bob H.
User avatar
yevgenit
Posts: 84
Joined: Fri Apr 25, 2008 12:47 am
Contact:

Re: Ignoring ACK during master send without peripheral slave ack

Post by yevgenit »

Generally, complying I2C standard for ACK bit is preferred, even with price of more sophisticated hardware of buffering and galvanic isolation.

In the real projects, the board designer sometimes decide to simplify the board, based on some hardware design constraints. For example, the board designer in some my old project decided to not buffer at all for communication via ~40 centimeter cable to a another enclosure I2C-to-parallel extender. It worked with reduced baud rate. The major reason was inappropriate delivery time of the Philips I2C bus extender.

The other reason of ignoring ACK bit can be early (before the custom board is built) evaluation of the firmware I2C driver timing.
Yevgeni Tunik
Embedded/RealTime software engineer
https://www.linkedin.com/in/yevgenitunik/
________________________
Post Reply