Society of Robots - Robot Forum
Electronics => Electronics => Topic started by: SmAsH on April 20, 2009, 08:52:19 PM
-
hey all, im just trying to get my facts right and clarify a few things... to use i2c with the atmega8 pin 28 is SCL and pin 27 is SDA, correct? now about the pull up resistors, i have heard two theories one is that anything from 4K7-47K is fine, the other is that 1K8-47K are both correct? although i may try this with a smaller chip i thought i would want to get it working with something small and simple first.
thanks in advance,
James (smash)
-
"the atmega8 pin 28 is SCL and pin 27 is SDA, correct?"
Correct.
Start with 4K7 (4700 ohm) resistors as pull up. This should be fine for most I2C "near processor" setups.
What I2C device are you playing with?
Hope that helps.
-
This tutorial should help you:
http://www.instructables.com/id/I2C_Bus_for_ATtiny_and_ATmega/ (http://www.instructables.com/id/I2C_Bus_for_ATtiny_and_ATmega/)
-
@gearmotion: thanks for that, im playing with that motor controller...
@chelmi: that's where i got my info from :D
-
4K7 should be fine...
But you can also use 10K...
These are standard resistors you must have... in your bench...
include 220ohm if you are playing with 5V...
And I think 22Ohm if you play around with 3V...
-
yes i have a LOT of 4K7 and 47K resistors from old music players. (never knew why they have so many?)
so as soon as i get more money ill make a parts order for my stuff.