Pages: [1]   Go Down
Author Topic: I2C Communication with ATtiny85 and Arduino Uno  (Read 719 times)
0 Members and 1 Guest are viewing this topic.
New York, NY
Offline Offline
Full Member
***
Karma: 2
Posts: 142
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi guys I've downloaded all the required libraries to start communicating with the Attiny85. I followed the tutorial described here:

http://playground.arduino.cc/Code/USIi2c

However, I have no idea on how to connect the SDA and SCL to the attiny85 from the Arduino. I heard that you have to use pull-ups connected to ground. Here is an image about how I predict to do it. I heard the SDA and SCL pins on the Arduino Uno are A4 and A5 respectively, am i right?
 
Please tell me if the schematic is cool or not  smiley-cool And give some additional tips if you can! Wil Really appreciate it!

Thanks!

(note, the resistors have a value of 4.7K)


* Screen Shot 2013-03-07 at 12.49.09 PM.png (55.44 KB, 533x528 - viewed 41 times.)
« Last Edit: March 07, 2013, 01:03:17 pm by mixania » Logged

Arduino Uno R3
Teensy 3.0
Mac OSX Yosemite

alabama
Offline Offline
Full Member
***
Karma: 1
Posts: 183
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mixania,
Actually, the pull up resistors need to go to the 5V supply pin on the Uno. You need to leave the ground connected to the Uno though, and you will need to power the ATTiny. Since they draw so little current I usually use the 5V pin on the Uno for that too when prototyping. Don't forget a .1uf capacitor between the ground and power of the ATTiny, for noise  decoupling.
TomJ
Logged

Einstein once said you don't really understand anything until you can explain it to your Grandmother

New York, NY
Offline Offline
Full Member
***
Karma: 2
Posts: 142
"Why should I bother with made-up games when there are so many real ones going on." (c) Kurt Vonnegut
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Mixania,
Actually, the pull up resistors need to go to the 5V supply pin on the Uno. You need to leave the ground connected to the Uno though, and you will need to power the ATTiny. Since they draw so little current I usually use the 5V pin on the Uno for that too when prototyping. Don't forget a .1uf capacitor between the ground and power of the ATTiny, for noise  decoupling.
TomJ

Awesome, thanks! You were very helpful!
Logged

Arduino Uno R3
Teensy 3.0
Mac OSX Yosemite

Global Moderator
Melbourne, Australia
Online Online
Brattain Member
*****
Karma: 511
Posts: 19356
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

For that matter, don't forget to power the ATtiny either (pin 8).
Logged

http://www.gammon.com.au/electronics

Please post technical questions on the forum - not to me by personal message. Thanks a lot.

Pages: [1]   Go Up
Jump to: