#include void i2c_init(void) { TWSR=0x00; TWBR=0x47; TWCR=0x04; } //********************************************************** void i2c_start(void) { TWCR = (1 << TWINT) | (1 << TWSTA) | (1 << TWEN); while ((TWCR & (1 << TWINT)) == 0); } //********************************************************** void i2c_write(unsigned char data) { TWDR = data ; TWCR = (1<< TWINT)|(1<