Electronics > Microcontrollers
Atmega 328 - sharing I2C pins with a 595
(1/1)
netdudeuk:
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
dannyf:
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.
Navigation
[0] Message Index
Go to full version