Connecting
The I2C bus consists of only four connections, clock, data and a power supply. This article will look at the requirements and the various practical methods.

One of the most common mistakes is to forget about the pull up resistors that are required on the clock and data lines. Unfortunately the I2C may work without these depending on the circumstances but it will be unreliable. The schematic shows that the resistors are connected to +5V. This may be 3V3 or less depending on the logic system and device in use.
Some master devices already have the resistors built in, in which case they will not be needed. The actual value of the resistors depends on a few factors but anywhere between about 1k and 10k should be okay. It is unlikely that slave devices will have these in but quite likely that master devices will. The BV511 and BV513 microcontroller boards don't have then built in and so provision must be made for this.
Connector
A very simple method is to solder two resistors onto a socket or connector.

Shown is a very flexible arrangement where the pull up resistors are soldered onto a plug and socket arrangement, the value of the resistors here are 1k. The positive pin is the bottom one shown on the picture as both resistors are connected to that. It is of course important to get this connector the right way round so that the positive pin does actually go to the positive supply. On BV equipment all I2C connectors are arranged in the same way so that the clock and data lines are between the power lines, this does give a littlie bit of noise immunity.

This shows how the socket arrangement can be used with the BV4218, it can of course be used at any end of the wire. In this case the purple wire is carrying the 5V supply and so this is connected to both the resistors.

This shows the other end of the connection to the BV4218. Connecting the I2C to the BV513 is very straightforward as the end socket has the power, clock and data lines in the correct order as shown. It simply plugs into the top end of the connector, observe that the purple wire is at the end as this is the wire that is connected to the +5V at the other end.
Supply Voltage
One of the great advantages of I2C physical layer is that the slave device can have an incompatible voltage with the host device as it is the supply that is connected to the pull up resistors that determines this voltage. In the case of the above example, the LCD display requires 5V but the BV513 will only normally supply 3V3 to the logic pins. In the case of the I2C, when a logic high is required the BV512 (PIC32) simply disconnects from the clock or data and the resistor pulls the line high to whatever voltage is required. Only logic low is driven, held low by the master.
Should the salve require 3.3 Volts then the power line can be connected to the 3.3V supply instead of the 5V supply. On the BV513, this can be found a little way down from the 5V and is marked on the PCB
