Tutorial_ Arduino and the I2C Bus - Part One

Embed Size (px)

DESCRIPTION

Tutorial_ Arduino and the I2C Bus - Part One

Citation preview

  • tronixstuff fun and learning with electronics

    HomeTronixlabsArduino Tutorials Kit ReviewsProjectsReviewsAboutContact Us

    Categorized | arduino, CN75, ds1307, education, I2C, learning electronics, lesson, MCP4018T, microcontrollers,tutorial

    Tutorial: Arduino and the I2C bus Part OnePosted on 20 October 2010. Tags: arduino, bus, cn75, digital, DS1307, example, examples, guide, guides, i2c, lesson, lessons, mcp4018t,micro, microchip, microelectronics, pot, potentiometer, smd, SOIC, SOT, st, thermometer, tronixstuff, tutorial, tutorials

    This is part one of several tutorials on how to use the I2C bus with Arduino, and chapter twenty of a series originally titled GettingStarted/Moving Forward with Arduino! by John Boxall A tutorial on the Arduino universe. The first chapter is here, the completeseries is detailed here.

    [Updated 28/11/2014]

    In this first of several tutorials we are going to investigate the I2C data bus, and how we can control devices using it with our Arduinosystems. The I2C bus can be a complex interface to master, so I will do my best to simplify it for you. In this article we will learn thenecessary theory, and then apply it by controlling a variety of devices. Furthermore it would be in your interest to have an understandingof the binary, binary-coded decimal and hexadecimal number systems.

    But first of all, what is it?I2C is an acronym for Inter-Integrated Circuit. In the late 1970s, Philips semiconductor division (now NXP) saw the need forsimplifying and standardising the data lines that travel between various integrated circuits in their products. Their solution was the I2Cbus. This reduced the number of wires to two (SDA data, and SCL clock). Here is a nice introductory video from NXP:

    Why would we want to use I2C devices?

    As there are literally thousands of components that use the I2C interface! And our Arduino boards can control them all. There are manyapplications, such a real-time clocks, digital potentiometers, temperature sensors, digital compasses, memory chips, FM radio circuits, I/Oexpanders, LCD controllers, amplifiers, and so on. And you can have more than one on the bus at any time, in fact the maximum numberof I2C devices used at any one time is 112.

    1 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • From a hardware perspective, the wiring is very easy. Those of you with an Arduino Uno or 100% compatible board, you will be usingpins A4 for SDA (data) and A5 for SCL (clock):

    If you are using an Arduino Mega, SDA is pin 20 and SCL is 21, so note that shields with I2C need to be specifically for the Mega. If youhave another type of board, check your data sheet or try the Arduino teams hardware website. And finally, if you are using a bare DIPATmega328-PU microcontroller, you will use pins 27 for SDA and 28 for SCL. The bus wiring is simple:

    If you are only using one I2C device, the pull-up resistors are (normally) not required, as the ATmega328 microcontroller in our Arduinohas them built-in. However if you are running a string of devices, use two 10 kilo ohm resistors. Like anything, some testing on abreadboard or prototype circuit will determine their necessity. Sometimes you may see in a particular devices data sheet the use ofdifferent value pull-up resistors for example 4.7k ohm. If so, heed that advice. The maximum length of an I2C bus is around one metre,and is a function of the capacitance of the bus. This distance can be extended with the use of a special IC, which we will examine duringthe next I2C chapter.

    Each device can be connected to the bus in any order, and devices can be masters or slaves. In our Arduino situation, the board is themaster and the devices on the I2C bus are the slaves. We can write data to a device, or read data from a device. By now you should bethinking how do we differentiate each device on the bus? Each device has a unique address. We use that address in the functionsdescribed later on to direct our read or write requests to the correct device. It is possible to use two devices with identical addresses on anI2C bus, but that will be discussed in a later article.

    As like most devices, we make use of an Arduino library, in this case . Then use the function Wire.begin(); inside of voidsetup() and were ready to go.

    Sending data from our Arduino to the I2C devices requires two things: the unique device address (we need this in hexadecimal) and atleast one byte of data to send. For example, the address of the part in example 20.1 (below) is 00101111 (binary) which is 0X2F inhexadecimal. Then we want to set the wiper value, which is a value between 0 and 127, or 0x00 and 0x7F in hexadecimal. So to set thewiper to zero, we would use the following three functions:

    This sends the device address down the SDA (data) line of the bus. It travels along the bus, and notifies the matching device that it hassome data coming

    This sends the byte of data to the device into the device register (or memory of sorts), which is waiting for it with open arms. Any otherdevices on the bus will ignore this. Note that you can only perform one I2C operation at a time! Then when we have finished sendingdata to the device, we end transmission. This tells the device that were finished, and frees up the I2C bus for the next operation:

    Some devices may have more than one register, and require more bytes of data in each transmission. For example, the DS1307 real-timeclock IC has eight registers to store timing data, each requiring eight bits of data (one byte):

    1 Wire.beginTransmission(0x2F); // part address is 0x2F or 0101111

    1 Wire.write(0); // sends 0 down the bus

    1 Wire.endTransmission();

    2 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • However with the DS1307 the entire lot need to be rewritten every time. So in this case we would use eight wire.send(); functionsevery time. Each device will interpret the byte of data sent to it, so you need the data sheet for your device to understand how to use it.

    Receiving data from an I2C device into our Arduino requires two things: the unique device address (we need this in hexadecimal) andthe number of bytes of data to accept from the device. Receiving data at this point is a two stage process. If you review the table abovefrom the DS1307 data sheet, note that there is eight registers, or bytes of data in there. The first thing we need to do is have the I2Cdevice start reading from the first register, which is done by sending a zero to the device:

    Now the I2C device will send data from the first register when requested. We now need to ask the device for the data, and how manybytes we want. For example, if a device held three bytes of data, we would ask for three, and store each byte in its own variable (forexample, we have three variables of type byte: a, b, and c. The first function to execute is:

    Which tells the device to send three bytes of data back to the Arduino. We then immediately follow this with:

    We do not need to use Wire.endTransmission() when reading data. Now that the requested data is in their respective variables, you cantreat them like any ordinary byte variable. For a more detailed explanation of the I2C bus, read this explanatory document by NXP. Nowlets use our I2C knowledge by controlling a range of devices

    The Microchip MCP4018T digital linear potentiometer. The value of this model is 10 kilo ohms. Inside this tiny, tiny SMD part is aresistor array consisting of 127 elements and a wiper that we control by sending a value of between 0 and 127 (in hexadecimal) down theI2C bus. This is a volatile digital potentiometer, it forgets the wiper position when the power is removed. However naturally there is acompromise with using such a small part, it is only rated for 2.5 milliamps but used in conjunction with op amps and so on. For moreinformation, please consult the data sheet. As this is an SMD part, for breadboard prototyping purposes it needed to be mounted on abreakout board. Here it is in raw form:

    123

    Wire.beginTransmission(device_address);Wire.write(0);Wire.endTransmission();

    1 Wire.requestFrom(device_address, 3);

    123

    *a = Wire.read();*b = Wire.read();*c = Wire.read();

    3 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • Above the IC is a breakout board. Consider that the graph paper is 5mm square! It is the incorrect size, but all I have. However solderingwas bearable. Put a drop of solder on one pad of the breakout board, then hold the IC with tweezers in one hand, and reheat the solderwith the other hand then push the IC into place. A few more tiny blobs of solder over the remaining pins, and remove the excess withsolder wick. Well it worked for me:

    4 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • Our example schematic is as follows:

    As you can see, the part is simple to use, your signal enters pin 6 and the result of the voltage division is found on pin 5. Please note thatthis is not a replacement for a typical mechanical potentiometer, we cant just hook this up as a volume or motor-speed control! Again,please read the data sheet.

    Control is very simple, we only need to send one byte of data down, the hexadecimal reference point for the wiper, e.g.:

    Here is a quick demonstration that moves the wiper across all points:

    and a video demonstration:

    123

    Wire.beginTransmission(0x2F); // part address is 0x2F or 0101111bWire.write(0x3F); //Wire.endTransmission();

    1234567891011121314151617181920212223242526272829303132

    // Example 20.1

    int dt = 2000; // used for delay durationbyte rval = 0x00; // used for value sent to potentiometer#include "Wire.h"#define pot_address 0x2F // each I2C object has a unique bus address, the MCP4018 is 0x2F or 0101111 in binary

    void setup(){

    Wire.begin();Serial.begin(9600);

    }

    void potLoop()// sends values of 0x00 to 0x7F to pot in order to change the resistance// equates to 0~127{

    for (rval=0; rval

  • Now we will read some data from an I2C device. Our test subject is the ST Microelectronics CN75 temperature sensor. Again, wehave another SMD component, but the CN75 is the next stage larger than the part from example 20.1. Thankfully this makes thesoldering process much easier, however still requiring some delicate handiwork:

    First, a small blob of solder, then slide the IC into it. Once that has cooled, you can complete the rest and solder the header pins into thebreakout board:

    6 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • Our example schematic is as follows:

    Pins 5, 6 and 7 determine the final three bits of the device address in this case they are all set to GND, which sets the address to1001000. This allows you to use multiple sensors on the same bus. Pin 3 is not used for basic temperature use, however it is an output forthe thermostat functions, which we will examine in the next chapter.

    As a thermometer it can return temperatures down to the nearest half of a degree Celsius. Although that may not be accurate enough, itwas designed for automotive and thermostat use. For more details please read the data sheet. The CN75 stores the temperature data intwo bytes, lets call them A and B. So we use

    with the second parameter as 2, as we want two bytes of data. Which we then store using the following functions:

    where *a and *b are variables of the type byte. And as always, there is a twist to decoding the temperature from these bytes. Here are

    1 Wire.requestFrom(cn75address, 2)

    12

    *a = Wire.read(); // first received byte stored here*b = Wire.read(); // second received byte stored here

    7 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • two example pieces of sample data:

    The bits in each byte note particular values the most significant bit (leftmost) of byte A determines whether it is below or above zerodegrees 1 for below zero. The remaining seven bits are the binary representation of the integer part of the temperature; if it is belowzero, we subtract 128 from the value of the whole byte and multiply by -1. The most significant bit of byte B determines the fraction,either zero or half a degree. So as you will see in the following example sketch, there is some decision making done in showCN75data():

    And here is the result from the serial monitor:

    Now that we know how to read and write data to devices on the I2C bus here is an example of doing both, with a very popular device the Maxim DS1307 real-time clock IC. Before moving on, consider reading their good data sheet.

    12

    Example bytes one: 00011001 10000000Example bytes two: 11100111 00000000

    123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354

    // Example 20.2

    #include "Wire.h"#define cn75address 0x48 // with pins 5~7 set to GND, the device address is 0x48

    void setup(){

    Wire.begin(); // wake up I2C busSerial.begin(9600);

    }

    void getCN75data(byte *a, byte *b){

    // move the register pointer back to the first registerWire.beginTransmission(cn75address); // "Hey, CN75 @ 0x48! Message for you"Wire.write(0); // "move your register pointer back to 00h"Wire.endTransmission(); // "Thanks, goodbye..."// now get the data from the CN75Wire.requestFrom(cn75address, 2); // "Hey, CN75 @ 0x48 - please send me the contents of your first two registers"*a = Wire.read(); // first received byte stored here*b = Wire.read(); // second received byte stored here

    }

    void showCN75data(){

    byte aa,bb;float temperature=0;getCN75data(&aa,&bb);if (aa>127) // check for below zero degrees{

    temperature=((aa-128)*-1);if (bb==128) // check for 0.5 fraction{

    temperature-=0.5;}

    }else // it must be above zero degrees{

    temperature=aa;if (bb==128) // check for 0.5 fraction{

    temperature+=0.5;}

    }Serial.print("Temperature = ");Serial.print(temperature,1);Serial.println(" degrees C");delay(1000);

    }

    void loop(){

    showCN75data();}

    8 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • Furthermore, it also has a programmable square-wave generator. Connection and use is quite simple:

    However some external components are required: a 32.768 kHz crystal, a 3V battery for time retention when the power is off, and a 10kohm pullup resistor is required if using as a square-wave generator, and 10k ohm pull-up resistors on the SCL and SDA lines. You can usethe SQW and timing simultaneously. If we have a more detailed look at the register map for the DS1307:

    We see that the first seven registers are for timing data, the eighth is the square-wave control, and then another eight RAM registers. Inthis chapter we will look at the first eight only. Hopefully you have noticed that various time parameters are represented by less thaneight bits of data the DS1307 uses binary-coded decimal. But dont panic, we have some functions to do the conversions for us.

    However, in general remember that each bit in each register can only be zero or one so how do we represent a registers contents inhexadecimal? First, we need to find the binary representation, then convert that to hexadecimal. So, using the third register of theDS1307 as an example, and a time of 12:34 pm we will read from left to right. Bit 7 is unused, so it is 0. Bit 6 determines whether the

    9 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • time kept is 12- or 24-hour time. So well choose 1 for 12-hour time. Bit 5 (when bit 6 is 0) is the AM/PM indicator choose 1 for PM.Bit 4 represents the left-most digit of the time, that is the 1 in 12:34 pm. So well choose 1. Bits 3 to 0 represent the BCD version of 2which is 0010.

    So to store 12pm as hours we need to write 00110010 as hexadecimal into the hours register which is 0x32. Reading data from theDS1307 should be easy for you now, reset the register pointed, then request seven bytes of data and receive them into seven variables.The device address is 0x68. For example:

    At which point the time data will need to be converted to decimal numbers, which we will take care of in the example sketch later.Setting the time, or controlling the square-wave output is another long operation you need to write seven variables to set the time oreight to change the square-wave output. For example, the time:

    The decToBcd is a function defined in our example to convert the decimal numbers to BCD suitable for the DS1307.

    You can also address each register individually. We will demonstrate doing this with an explanation of how to control the DS1037s inbuilt square-wave generator:

    1234567891011

    Wire.beginTransmission(0x68);Wire.write(0);Wire.endTransmission();Wire.requestFrom(DS1307_I2C_ADDRESS, 7);*second = bcdToDec(Wire.read();*minute = bcdToDec(Wire.read();*hour = bcdToDec(Wire.read();*dayOfWeek = bcdToDec(Wire.read());*dayOfMonth = bcdToDec(Wire.read());*month = bcdToDec(Wire.read());*year = bcdToDec(Wire.read());

    12345678910

    Wire.beginTransmission(0x68);Wire.write(0);Wire.write(decToBcd(second));Wire.write(decToBcd(minute));Wire.write(decToBcd(hour));Wire.write(decToBcd(dayOfWeek));Wire.write(decToBcd(dayOfMonth));Wire.write(decToBcd(month));Wire.write(decToBcd(year));Wire.endTransmission();

    12345678910111213141516171819202122232425262728293031323334353637383940414243

    /*DS1307 Square-wave machine Used to demonstrate the four different square-wave outputs from Maxim DS1307 See page nine of data sheet for more information John Boxall - tronixstuff.com */

    #include "Wire.h"#define DS1307_I2C_ADDRESS 0x68 // each I2C object has a unique bus address, the DS1307 is 0x68

    void setup(){Wire.begin();

    }

    void sqw1() // set to 1Hz{Wire.beginTransmission(DS1307_I2C_ADDRESS);Wire.write(0x07); // move pointer to SQW addressWire.write(0x10); // sends 0x10 (hex) 00010000 (binary)Wire.endTransmission();

    }

    void sqw2() // set to 4.096 kHz{Wire.beginTransmission(DS1307_I2C_ADDRESS);Wire.write(0x07); // move pointer to SQW address Wire.write(0x11); // sends 0x11 (hex) 00010001 (binary)Wire.endTransmission();

    }

    void sqw3() // set to 8.192 kHz{Wire.beginTransmission(DS1307_I2C_ADDRESS);Wire.write(0x07); // move pointer to SQW address Wire.write(0x12); // sends 0x12 (hex) 00010010 (binary)Wire.endTransmission();

    }

    void sqw4() // set to 32.768 kHz (the crystal frequency){Wire.beginTransmission(DS1307_I2C_ADDRESS);Wire.write(0x07); // move pointer to SQW address

    10 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • Bio

    Here is the SQW output in action we measure the frequency using my very old Tek CFC-250:

    For further DS1307 examples, I will not repeat myself and instead direct you to the list of many tronixstuff articles that make use of theDS1307.

    So there you have it hopefully an easy to understand introduction to the world of the I2C bus and how to control the devices within.Part two of the I2C tutorial has now been published, as well as an article about the NXP SAA1064 LED display driver IC and theMicrochip MC23017 16-bit port expander IC.

    And if you enjoyed this article, or want to introduce someone else to the interesting world of Arduino check out my book (now in afourth printing!) Arduino Workshop.

    Have fun and keep checking into tronixstuff.com. Why not follow things on twitter, Google+, subscribe for email updates or RSS usingthe links on the right-hand column, or join our forum dedicated to the projects and related items on this website.

    John BoxallFounder, owner and managing editor of tronixstuff.com.

    4445464748495051525354555657585960616263646566676869

    Wire.write(0x13); // sends 0x13 (hex) 00010011 (binary)Wire.endTransmission();

    }

    void sqwOff()// turns the SQW off{Wire.beginTransmission(DS1307_I2C_ADDRESS);Wire.write(0x07); // move pointer to SQW addressWire.write(0x00); // turns the SQW pin offWire.endTransmission();

    }

    void loop(){sqw1();delay(5000);sqw2();delay(5000);sqw3();delay(5000);sqw4();delay(5000);sqwOff();delay(5000);

    }

    11 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • Please share with others:

    Kit Review adafruit industries waveshield kitKit Review Silicon Chip Low Capacitance Meter adaptor for DMMs

    21 Responses to Tutorial: Arduino and the I2C bus Part One

    Jerrar Bukhari says:February 11, 2013 at 4:32 am

    Thank You a Hundred Times Was Very Very Useful It was both .. very simple and very compact

    Reply

    1.

    luis says:March 12, 2013 at 1:42 am

    Hello data sheets show the following addresses,

    MCP4017 0101111MCP4018 0101111MCP4019 0101111

    Can you connect more than one ? like + = 1 address pulling pin to ground = 2 address ?

    not sure Ive seeing that in the data sheets

    Reply

    John Boxall says:March 14, 2013 at 9:24 pm

    The bus address is fixed for that part see page 36 of the data sheet http://ww1.microchip.com/downloads/en/DeviceDoc/22147a.pdfYoull need to select a different part that supports multiple I2C addresses.

    Reply

    2.

    Bela Cseke says:May 11, 2013 at 6:23 pm

    Thanks a mill. for this understandable description. That was what Im looking for. I not seen before, what are the limitations of IIC,for example the number of devices, its very helpful for me in my project(s) at work, and Im definitely happy for the interfacing adigipot to uController part.And of course Ill sign up for your Google-group for sharing my experience.

    Cheers,Bela

    Reply

    John Boxall says:May 11, 2013 at 6:26 pm

    Youre welcome and have fun.

    Reply

    3.

    6 53

    Like this:

    Be the first to like this.

    12 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • cmp says:May 17, 2013 at 12:06 am

    Very well written article thanks a lot for all your work here!

    Reply

    John Boxall says:May 17, 2013 at 10:41 am

    Thank you

    Reply

    4.

    Tyl says:June 7, 2013 at 5:58 pm

    This is a wonderful writeup! Easy to understand, plus you include great examples to show the value. Thank you so much forsharing this!

    Reply

    John Boxall says:June 8, 2013 at 5:10 pm

    Thanks, glad you found it useful.

    Reply

    5.

    TecnoGeppetto says:June 20, 2013 at 4:29 am

    Lha ribloggato su Le avventure di TecnoGeppettoe ha commentato:Non li conoscevo prima, ma sono componenti molto interessanti. Sto gia pensando ad un progettino che utilizzi i potenziomentridigitali.TecnoGeppetto!

    Reply

    John Boxall says:June 20, 2013 at 9:10 am

    Buono a sapersi, ti piace larticolo. Buon divertimento.

    Reply

    6.

    Ciprian says:June 25, 2013 at 6:14 am

    Hello,

    Nice tutorial. You said something that would be possible to connect more slave devices with the same address to onemicrocontroller. I tried to look for that in another article, but i couldnt find a solution.

    My problem is that I would like to connect more I2C Color Sensors based on TCS3414CS. Their address is fixed. Is there any way ican connect like 20 sensors like this?

    Reply

    John Boxall says:June 25, 2013 at 9:44 am

    Have a look at page three of the datasheet theres four different I2C address models. (Well its a start!). You can get I2Cmultiplexers such as the TI TCA9548A which give you 8 to 1 (http://www.ti.com/product/tca9548a) so a couple of those anda few different models of your sensor should solve the problem.

    7.

    13 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • Reply

    Doug says:December 1, 2013 at 7:57 am

    Hey John. Im having trouble understanding a part of your book Arduino Workshop, so I came here looking for some insight.Youve used the same piece of code in the very similar RTC project above.The function is reading from the RTC and uses an asterisk (*) preceding a variable name. I *think* this has to do with a pointer, butI couldnt find any further understanding in your book, the Arduino Reference (talk about a short wiki page!), or here. Can youexplain, or point me to an explanation no pun intended

    Wire.beginTransmission(0x68); //I get all of this partWire.write(0);Wire.endTransmission();

    Wire.requestFrom(DS1307_I2C_ADDRESS, 7); // grab 7 bytes from the serial interface and load them into these next variables..

    *second = bcdToDec(Wire.read();*minute = bcdToDec(Wire.read();*hour = bcdToDec(Wire.read();*dayOfWeek = bcdToDec(Wire.read());*dayOfMonth = bcdToDec(Wire.read());*month = bcdToDec(Wire.read());*year = bcdToDec(Wire.read());

    // But what are the asterisks doing? What would removing them do?

    Thanks for any help. Ive really enjoyed your book as it reads the way that my learning works through the project, discoveringone thing after another that I want to learnthanks so much for that.

    Reply

    John Boxall says:December 2, 2013 at 11:21 am

    Yes the asterisks are necessary it makes the variable a pointer.Any more book questions please use the form here http://tronixstuff.com/contact-us/

    Reply

    8.

    John Boxall says:December 22, 2013 at 7:54 pm

    Thanks

    Reply

    9.

    **SJ** says:December 24, 2013 at 9:31 pm

    Thanks for the Quick reply John ive connected the Module 3.3 Vcc directly to 3.3V of Arduino and Gnd,SDA,SCL to ArduinosGnd,SDA,SCL.. When running i2c scanner,it finds a device in the Address 0x48 After that i cant get data from CDC by MasterReader Code even after re wrote that in many ways

    Reply

    10.

    Harold says:November 27, 2014 at 2:46 am

    Hi, I need a schematics for USING ARDUINO MICRO-CONTROLLER TO MANAGE THE MOVEMENT OF A FOUR BITBINARY CODE OVER AN OPTICAL LINK

    Reply

    John Boxall says:

    11.

    14 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • December 1, 2014 at 11:49 am

    No, do your own homework.

    Reply

    Paul Allsopp says:December 7, 2014 at 8:34 am

    Having fallen into the same mistake as other readers, in that I bought a bunch of devices with fixed slave addresses, I wonderedWould it be possible to use these devices in a round-robin implementation?

    What I mean is, if the device address of all the slaves was, say 0x50, and all of the devices except 1 were disabled somehow(maybe disconnected from the CLK line), could you read from that device, disable it, enable of the other devices and request aread from that, and continue that way until you have cycled through all the devices?

    Is that possible?

    Reply

    John Boxall says:December 13, 2014 at 9:57 am

    See I2C bus tutorial part two for some ideas.

    Reply

    12.

    Trackbacks/Pingbacks

    Leave a Reply

    Name (required)

    Mail (will not be published) (required)

    Website

    Notify me of follow-up comments by email.

    Notify me of new posts by email.

    Visit tronixlabs.com

    Helping you make it with Australia's best value for supported hobbyist electronics from adafruit, DFRobot, Freetronics, Seeed Studio andmore!

    Subscribe via email

    Receive notifications of new posts by email.

    15 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • Search the site

    tronixstuff forum

    Why not join our moderated discussion forum?

    Arduino Tutorials

    Click for Detailed Chapter Index

    Chapters 0 1 2 3 4Chapters 5 6 6a 7 8Chapters 9 10 11 12 13Ch. 14 - XBeeCh. 15 - RFID - RDM-630Ch. 15a - RFID - ID-20Ch. 16 - EthernetCh. 17 - GPS - EM406ACh. 18 - RGB matrix - awaiting updateCh. 19 - GPS - MediaTek 3329Ch. 20 - I2C bus part ICh. 21 - I2C bus part IICh. 22 - AREF pinCh. 23 - Touch screenCh. 24 - Monochrome LCDCh. 25 - Analog buttonsCh. 26 - GSM - SM5100 UnoCh. 27 - GSM - SM5100 MegaCh. 28 - Colour LCDCh. 29 - TFT LCD - coming soon...Ch. 30 - Arduino + twitterCh. 31 - Inbuilt EEPROMCh. 32 - Infra-red controlCh. 33 - Control AC via SMSCh. 34 - SPI bus part ICh. 35 - Video-out

    16 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • Ch. 36 - SPI bus part IICh. 37 - Timing with millis()Ch. 38 - Thermal PrinterCh. 39 - NXP SAA1064Ch. 40 - Push wheel switchesCh. 40a - Wheel switches IICh. 41 - More digital I/OCh. 42 - Numeric keypadsCh. 43 - Port Manipulation - UnoCh. 44 - ATtiny+ArduinoCh. 45 - Ultrasonic SensorCh. 46 - Analog + buttons IICh. 47 - Internet-controlled relaysCh. 48 - MSGEQ7 Spectrum AnalyzerFirst look - Arduino DueCh. 49 - KTM-S1201 LCD modulesCh. 50 - ILI9325 colour TFT LCD modulesCh. 51 - MC14489 LED display driver ICCh. 52 - NXP PCF8591 ADC/DAC ICCh. 53 - TI ADS1110 16-bit ADC ICCh. 54 - NXP PCF8563 RTCCh. 55 - GSM - SIM900Ch. 56 - MAX7219 LED driver ICCh. 57 - TI TLC5940 LED driver ICCh. 58 - Serial PCF8574 LCD BackpacksCh. 59 - L298 Motor ControlCh. 60 - DS1307 and DS3231 RTC part IArduino Yn tutorialspcDuino tutorials

    The Arduino Book

    Fr unsere deutschen Freunde

    17 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/

  • Dla naszych polskich przyjaci ...

    Australian Electronics!

    Buy and support Silicon Chip - Australia's only Electronics Magazine.

    Interesting Sites

    Amazing Arduino Shield DirectoryDavid L. Jones' eev blogSilicon Chip magazine Always a great read!Talking ElectronicsDangerous PrototypesThe Amp Hour podcastSuperhouse.tv High-tech home renovation

    Use of our content

    tronixstuff.com by John Boxall is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

    18 http://tronixstuff.com/2010/10/20/tutorial-arduino-and-the-i2c-bus/