Welcome! Log In Create A New Profile

Advanced

sanguino + I2C + TWI.c

Posted by joebarteamv 
sanguino + I2C + TWI.c
March 01, 2011 07:00PM
Bonjour;
i'm Joël
i'm French ; i'm speak little english...

I think of problem of I2C library ;
Used or not used Pull up intern for I2C???

in File Twi.C

#if defined(__AVR_ATmega168__) || defined(__AVR_ATmega8__) || defined(__AVR_ATmega328P__)
// activate internal pull-ups for twi
// as per note from atmega8 manual pg167
sbi(PORTC, 4);
sbi(PORTC, 5);
#else
// activate internal pull-ups for twi
// as per note from atmega128 manual pg204
sbi(PORTD, 0);
sbi(PORTD, 1);
#endif

twi.c is not compatible with sanguino ( broche SDA/SCL= PC0 / PC1)

i'm used 328p + 644p ; it'is necessary to activate pull up?
Thank you

Edited 1 time(s). Last edit at 03/01/2011 07:03PM by joebarteamv.
Re: sanguino + I2C + TWI.c
July 11, 2011 05:21PM
No. The external pull ups will do the job. I would make them 4k7 and not 10k
Sorry, only registered users may post in this forum.

Click here to login