//************************************************************** // ******** FUNCTIONS FOR I2C COMMUNICATION ******* //************************************************************** //Controller: ATmega128 (Crystal: 16Mhz) //Compiler: winAVR (AVR-GCC) //Author: CC Dharmani, Chennai (India) // www.dharmanitech.com //Date: April 2009 //******************************************************** //link to post: http://www.dharmanitech.com/2008/08/interfacing-rtc-serial-eeprom-using-i2c.html #include #include "i2c_routines.h" #include "UART_routines.h" //************************************************* //Function to start i2c communication //************************************************* unsigned char i2c_start(void) { TWCR = (1<