![]() ![]() ![]() I2C (Inter-Integrated Circuit bus), originally developed by Phillips (now NXP Semiconductor) and also commonly known as TWI (Two Wire Interface) by Atmel and other companies who don't want to get into trademark issues, is a two-wire synchronous serial bus. Of course, I did most of the work with it and am telling you what I learned, so hopefully it'll be easier for you. I used my Rigol DS1052E (100Mhz modded) and it helped a TON. I2C uses two wires, so a two-channel scope works great. I know this is a big one, but if you can work with one (either own one, borrow one, or go to a lab where you can use one) it's a super amazing help. i2cdetect, i2cset, i2cget, and i2cdump are invaluable when writing code, especially slave-mode code.ģ. An Arduino with the Wire library will work, but more recently I prefer my Raspberry Pi with the Linux i2ctools package. Something that has a working I2C master - You'll want something to test/compare against if possible. I more recently purchased some Microchip MCP23017 GPIO expanders which give you 16 bits of additional GPIO over the I2C bus.Ģ. I like Texas Instruments' TMP100 temperature sensor as it's cheap (free if you sample) and has a simple protocol (just send an I2C read command to get temp values). If you're writing a master driver you need some things to talk to. Various I2C-compatible parts - Anything goes, as long as it's I2C. Learning it is tough at first, but once you know I2C it is a powerful tool.īefore you dig too deep into I2C communications, you'll want to have some things on hand that will make your learning experience easier.ġ. Fortunately it is a protocol that is available on most microcontrollers, though it is a bit more complex than others. ![]() If you spend much time looking for new, cool parts you'll probably wind up with several I2C parts. I2C is commonly used in GPIO expanders, EEPROM/Flash memory chips, temperature sensors, real-time clocks, LED drivers, and tons of other components. This tutorial will solve that problem, first by reviewing what I2C is and how it works, then by going in-depth on how to implement I2C in Atmel's ATTiny USI (Universal Serial Interface) hardware. It's an incredibly useful technology for us microcontroller hobbyists but can seem daunting for new users. I2C, it's a standard that's been around for around 20 years and has found uses in nearly every corner of the electronics universe. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |