Go Down

Topic: Do I need to alter the I2c pin #s for an Atmega1284 (Read 604 times) previous topic - next topic

seanz2003

I am switching a project over to a 1284p chip from a 328p, and I was wondering if I would need to change the pin definitions somewhere in the libraries since the two chips use different pin numbers for I2C.

retrolefty


I am switching a project over to a 1284p chip from a 328p, and I was wondering if I would need to change the pin definitions somewhere in the libraries since the two chips use different pin numbers for I2C.


I don't believe so, the I2C pins are 'hardwired' internally to the I2C support hardware inside the chip, so there should be no mapping translation performed by the I2C library code, just wire them up and go.

The only problem is that when using shield products that used I2C in the past they usually expected the I2C pins to be on A4 and A5. so such shield based I2C boards wouldn't work on a mega board (without hardware mods) which used other pins for the two I2C signals. This problem has been 'solved' for present Uno and mega boards and any new shield designs, in that arduino folks have added two new shield pins dedicated to just the I2C signals located next to the Aref pin.

Lefty


Go Up