cpp code
char temp;
void main()
{
trisb = 0;
portb = 0;
i2c1_init(100000); // initialize I2C communication
while(1)
{ //escrita
i2c1_start(); // I2C start signal
i2c1_wr(0xA0); // send byte via I2C (device address + W) => 1010 000 0
i2c1_wr(0x00); // send byte (address of EEPROM location)
i2c1_wr(0x01); // send data (data to be written)
i2c1_stop(); // I2C stop signal
delay_ms(50);
//leitura
i2c1_start(); // I2C start signal
i2c1_wr(0xA0); // send byte via I2C (device address + W) => 1010 000 0
i2c1_wr(0x00); // send byte (address of EEPROM location)
i2c1_repeated_start(); // I2C signal repeated start
i2c1_wr(0xA1); // send byte (device address + R) => 1010 000 1
temp=i2c1_rd(0); // Read the data (NO acknowledge)
i2c1_stop(); // I2C stop signal
}
}
Já tentei tudo que vocês sugeriram.
A propósito, a opção "Notificar-me quando for respondida" está marcada mas a notificação não chega!