Go Down

Topic: I2C Communication with ATtiny85 and Arduino Uno (Read 769 times) previous topic - next topic

mixania

Mar 07, 2013, 06:56 pm Last Edit: Mar 07, 2013, 07:03 pm by mixania Reason: 1
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  8) And give some additional tips if you can! Wil Really appreciate it!

Thanks!

(note, the resistors have a value of 4.7K)
Arduino Uno R3
Mac OSX Lion

Tumbleweed

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
Einstein once said you don't really understand anything until you can explain it to your Grandmother

mixania


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!
Arduino Uno R3
Mac OSX Lion

Nick Gammon

For that matter, don't forget to power the ATtiny either (pin 8).
Please post technical questions on the forum, not by personal message. Thanks!

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

Go Up