Home ] Up ] Software ] Microcontroller ] IASI ] I/O ] [ I2C ] Serial ] Wire ] Other ] Terms ]

Cart Quantity: Total:

  Select Device  
  BV4205
BV4206
BV4208
BV4213
BV4218
BV4219
BV4220
BV4221
BV4236
BV4237
BV4506

 

 

 
     
 
  I2C  
 

The products in the range listed below are:

BV4205 10 Channel x 10 bit Analogue to Digital IC
BV4206 GPIO / Timer / PWM IC
BV4208 LCD Controller IC
BV4213 Motor Controller with I2CO
BV4218 LCD & Keypad Interface
BV4219 I2C 128 X 64 Graphic Display with 21 Character x 8
line Text
BV4221 USB to I2C Converter
BV4230 I2C LCD Green/Yellow 16x2 with keypad interface
BV4230 I2C LCD Blue 16x2 with keypad interface
BV4236 I2C Real Time Clock & Temperature Sensor
BV4237 I2C 8 Digital outputs with power 9 power levels, 5 ADC inputs, Real Time Clock with battery back up and Temperature sensor
BV4506 12 way keypad with I2C interface

Introduction

I²C is a multi-master serial computer bus invented by Philips that is used to attach peripherals to a motherboard, embedded system, or cellphone. The name stands for Inter-Integrated Circuit and is pronounced I-squared-C or I-two-C. 

SMBus is a subset of I²C that defines stricter electrical and protocol conventions. One purpose of SMBus is to promote robustness and interoperability. Accordingly, modern I²C systems incorporate policies and rules from SMBus, and the line between these two standards is often blurred in practice.

Signal Protocol

Essentially this is a two wire communication interface but in practice because of ground and power, 4 lines are usually required. All the BV I2C boards have a 4 way connector for this. One device, usually the microcontroller (see also the BV4221) is the master and the other is the slave. Both the master and slave can transmit and receive data, so a slave for example could send back information to the master in the case of a temperature sensor for example or receive information form the master in the case of say and LCD interface.

On the two wire interface one wire is the clock and the other is the data line, they are both connected to an open collector source and so need pull up resistors.

The signal protocol is address, packet based. This means that the master takes control and sends or received data. It also means that because each device on the bus has a unique address, more than one device can be on the bus at the same time. This can be very useful for minimizing the interconnectivity of a system.

Although the I2C is considered a 'low speed' system, this is relative, and although refreshing a plasma display every 20mS would be out of the question, the speed of up to 400kHz is very useful and more than adequate for most applications particularly in the field of CNC and robotics.

BV - I2C Devices

The BV device make use of the I2C protocol in a very consistent way, this makes it easier when using more than one device. It is based on a command structure whereby all BV-I2C devices expect to be addressed and then receive a command. Depending on what that command is will depend on what happens next.

Command Diagrams

To further explain the format of the commands take a look at the diagrams below.  The design of the interface has been purposely kept simple and so there are only a few standard sequences required.

Key

Text Box: Master
 

Text Box: Slave

Text Box: S
 Start condition

Text Box: P
 Stop Condition

Text Box: A
 Acknowledge = 1

Text Box: N
 Not acknowledge = 0

Sending a Single Command

This is designated in the list as:

<S-addr><cmd><Stop>

This sequence is used for simple functions where no data is involved. The I2C sequence, using the default address is:

Sending a command with parameter bytes

This is designated in the list as:

<S-addr><cmd><data…><Stop>

Some commands expect a parameter after the command. In this case the bytes are sent one after the other up to the maximum of 31 bytes. The stop command tells the slave that there is a command ready to be executed.

Receiving bytes from the salve

<S-addr><cmd-Addr><byte><Stop>

When receiving one or a number of bytes from the device a restart is required.

The command is sent with an even address (the R/W bit 0). When the slave acknowledges the command another start condition is sent with the R/W bit set to 1. This is called a restart. After this restart the slave will continue to send bytes until the master sends a not acknowledge (N or NACK).

If the master does not send a NACK at the last byte the slave will be expecting another byte to be requested and this may cause either unpredictable results or the I2C bus to lock.