7 years, 4 months ago.

I2C polling transfer

Hi,

I have connected two FRDM-K64 boards thru the I2C1 bus (PTC11 and PTC10). I have updated the freescale program (i2c_polling_tranfer.c) to have a master version running an one board and a slave version on the other board (see joined file).

Unfortunately, on the master side, the result is not as expected. I need to add a scanf on the master side to have the expected result !

Thanks for your help Nadine,

I2C example MasterPolling_SlaveInterrupt Select Master or Slave (0/1): 0

Master will send data : 0x 0 0x 1 0x 2 0x 3 0x 4 0x 5 0x 6 0x 7 0x 8 0x 9 0x a 0x b 0x c 0x d 0x e 0x f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f

Master received data : 0x 0 0x 1 0x 2 0x 3 0x 4 0x 5 0x 6 0x 7 0x 8 0x 9 0x a 0x b 0x c 0x d 0x e 0x f 0x10 0x11 0x12 0x13 0x14 0x15 0x16 0x17 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f

End of I2C example .

Be the first to answer this question.