Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Accessing A-Star’s ATmega328PB I2C SCL1 & SDA1

I was wondering if there are any way of initiating or enabling the SCL1 and SDA1 I2C pins or at-least are there other alternatives ?

I have read the A-Star’s user guide and noticed you guys have written that there isn’t any support for accessing the atmega328pb’s second I2C module (TWI1) which by that, you’re implying SCL1 and SDA1.
the Uno was built around a MCU that has only 1 i2C peripheral but is there any way i an still enable and use them in the arduino IDE ?
I have two I2C modules, the datasheet for one(LSM6DS3) recommends 4.7K - 10K pull-ups and the other(VL6180X) recommends 1.8K - 2.2K so, I can’t put them on the same wires.


At this time, there is still no easy way to use the second I2C bus on the A-Star 328PB; you would have to manipulate the AVR’s TWI1 control registers directly since we don’t have a library that helps make it easier to use. (That is something we’d like to look into, but we don’t have any definite plans for when or if that will be available.)

However, you should not need two separate I2C buses for the situation you describe. I2C pull-up values are generally not critical and your devices will probably just work if you use pull-ups that are anywhere close to those values. If you are using our carrier boards, note that they have on-board level shifters and pull-ups, so you should not even need to add external pull-ups at all.