Quick I2C Question

pmgant

New Member
I know that I2C need pullup resistors but should these go at the PICAXE end or at the peripheral? Line length in this case is about 15cm / 6 inches.

P M Gant
 

Armp

Senior Member
For anything less than 50cms it doesn't matter. Beyond that it should be at the point furthest from the 'master', but in practice it's really not significant.
 

westaust55

Moderator
Personal opinion – put the pull-up resistors at the PICAXE Master. Only one set of pull-up resistors are required per i2c network “segment” and there is only typically one master but tentatively/often many slave devices, so put the resistors at the singular (Master) device end of the i2c network.

The Rev Ed AXE022 proto board typically used as a Master device/board has provision on the board for the i2c pull-up resistor- potentially as there is also provision for an i2c EEPROM on the same board. So in this case at the Master/PICAXE device.

However, the Rev Ed AXE033 has permanently enabled pull-up resistors on board so here they are at the slave end.

The AXE110 board (with the Master chip) has the pull=up resistors onboard for good reason (EEPROM and RTC on the board) and the AXE111 slave memory board does not have pull-up resistors

Most other modules I have used such as compass, speech, IO expansion, etc, do not include pull-up resistors but do recall seeing modules on websites such as Sparkfun with the provision to link in i2c pull-up resistors on the module.

Pull-up resistors or suitable current sources are permitted under the Philips/NXP i2c specification.
I did not see any specific location mentioned for the pull-up resistors (that we all normally use) however for the current source options the specifications clearly state “Only the active master can enable its current-source pull-up circuit.”

If you are going to have i2c networks that exceed a total length of 10 cm then ensure that the signal and power supply wiring configuration meets the NXP i2c specification – namely the supply conductors (Vcc/Vdd and Vss) are between the i2c clock and i2c data conductors.

If you have longer i2c wiring networks then consider i2c bus extender chips in which case each segment of the i2c network will require its own pull-up resistors.
Likewise with level shifting (using transistors), each segment of the i2c network will require its own pull-up resistors.
 
Top