Attendees of this course will learn how serial communication works, as well as the most common standardised protocols for serial communication. In Part 1 of this course, we will be covering I2C and 1-Wire. Hardware is not required to succeed with this course, but students are encouraged to try out examples and/or play around with the material presented in class. Remember, using skills is what sharpens them!
I2C is an extremely common serial bus standard developed by Phillips in the 1980s. It is the most common bus used for communicating with sensors and EEPROMs. There is a lot more to the I2C bus than meets the eye. It's a multi-controller, multi-peripheral bus with in-built arbitration and signalling. Extensions to the original standard have allowed for faster transfer speeds and an increased address space. A derived standard called SMBus is widely used on computer motherboards for temperature sensors, fan sensors, and more. We will examine the differences between I2C and SMBus, but the focus of the course will be on I2C.
1-Wire is, as the name suggests, a bi-directional serial protocol that uses only one wire for communication. This single wire can also be used to power the device, meaning a sensor can be powered and communicated with over just 2 wires! The standard only allows for one controller, but a huge number of peripherals. Sensors and EEPROMs are also quite common. The hardware is similar to I2C, which is why these two have been grouped together in Part 1.
Goals of this course
We will be taking a close look at who developed these standards; why they were developed; why they became popular; how they work at multiple layers (hardware, protocol, software); and we will examine common use cases as well as example code. Example libraries will be briefly covered, as well as how to find more information if needed.
After completion of this course, you will be ready to tackle any project that uses these serial bus standards!
Though not necessary, a wide range of hardware can be used to implement the things you learn in this course. Almost any development board will work -- Arduino, BeagleBone, Adafruit Feathers/Trinkets, Teensy, MSP430, PIC32, ESP8266/ESP32. Any microcontroller will do, even those without hardware support for I2C or 1-Wire. This course will be providing sample code for the MSP430F5529 Launchpad, which you can get from Digikey for under $20. Adafruit has an ATMEGA 328p development board for just $12.95 which supports hardware I2C and SPI. It's programmable with Arduino, which makes getting up to speed quite easy. Or, if you want to support other hackers from around the world, Tindie has literally hundreds and hundreds of development boards that you can use! A personal favourite is the Ladybug STM32 Development Board.
Again, I would stress that it's not necessary to complete the course and succeed in using these skills in the future, but practical applications will boost your confidence and sharpen your skills!