go_away

Author Topic: setting up i2c for atmega8  (Read 6260 times)

0 Members and 1 Guest are viewing this topic.

Offline SmAsHTopic starter

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
setting up i2c for atmega8
« 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)
« Last Edit: April 20, 2009, 11:35:11 PM by SmAsH »
Howdy

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
Re: setting up i2c for atmega8
« Reply #1 on: April 21, 2009, 10:17:58 AM »
"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.

Offline chelmi

  • Supreme Robot
  • *****
  • Posts: 496
  • Helpful? 15
Re: setting up i2c for atmega8
« Reply #2 on: April 21, 2009, 11:45:16 AM »

Offline SmAsHTopic starter

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: setting up i2c for atmega8
« Reply #3 on: April 21, 2009, 04:45:08 PM »
@gearmotion: thanks for that, im playing with that motor controller...
@chelmi: that's where i got my info from :D
Howdy

Offline TrickyNekro

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,207
  • Helpful? 15
  • 1.6L Peugeot 307 tuner
Re: setting up i2c for atmega8
« Reply #4 on: April 21, 2009, 05:01:18 PM »
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...
For whom the interrupts toll...


P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

Offline SmAsHTopic starter

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: setting up i2c for atmega8
« Reply #5 on: April 21, 2009, 05:18:05 PM »
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.
Howdy

 


Get Your Ad Here