Connecting atmega328p to atmega32a via I2C - problem


I want to connect two chips together to send information from one to another.

I connected SDA pin in atmega328a with SDA pin in atmega32A and the same with pin SLA → SLA (both connected with 4.7k pull-up resistors) like on the photo below. Both chips are connected to the same ground. When I started program which looking for devices connected via I2C, serial monitor displayed that message:

No I2C devices found.


Unknown error on address 0x01
Unknown error on address 0x40
No I2C devices found.

This message is display on both chips.

I have no idea how to solve this problem. Is it problem with connection?

(On the picture is atmega644 but it has the same pin map like atmega32a)

Ok, problem solved. Too long cables between chips.

Too long cables between chips.

How can the cables be too long ? (the chips are right next to each other)

I don't know but shorter wires work. ;)

That's just crazy.

I agree with you.