Author Topic: Atmega 328 - sharing I2C pins with a 595  (Read 2290 times)

0 Members and 1 Guest are viewing this topic.

Offline netdudeukTopic starter

  • Frequent Contributor
  • **
  • Posts: 447
  • Country: gb
Atmega 328 - sharing I2C pins with a 595
« on: December 30, 2013, 04:58:23 pm »
Hi

I've got an Atmega 328P with the Arduino Uno code and it's been working very well.  I've been using A4 (the I2C SDA pin) and A5 (the I2C SCL pin) to drive the data and latch pins of a 74HCT595 but now I would like to connect an LCD display which has one of those I2C to parallel convertors.  The theory was that it didn't matter if the 595 and the I2C interface saw junk heading out for the opposite device but as soon as I connect the display, which displays information from the Atmega ok, it causes (as yet unknown) issues elsewhere.  Is there anything obviously wrong with wanting to get this to work and any quick solutions ?  I don't have any other spare pins.

Thanks
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Atmega 328 - sharing I2C pins with a 595
« Reply #1 on: December 30, 2013, 06:20:00 pm »
Yes, if the avr acts like a master. However, you will have to disable the hardware i2c when writing to the shift register and re-enable it before any i2c transmission.

Alternatively, you can use software i2c.
================================
https://dannyelectronics.wordpress.com/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf