Part Number: TMS320F28069
hi ,i have one question about R/2 bit after slave address.
R/W bit is sent automatically or we have to?
if automatically than how it is done?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: TMS320F28069
hi ,i have one question about R/2 bit after slave address.
R/W bit is sent automatically or we have to?
if automatically than how it is done?
Hi Mihir Dave,
The R/W bit is sent automatically at the end of the slave address when you start a transmission. It will depend on the state of the I2CMDR.TRX register bit.
0 == read bit
1 == write bit
Best,
Kevin
HI, kevin Thanks for prompt response
so, if i set I2CMDR.TRX bit than it will generate (write bit(0)) after slave address .
and if i reset I2CMDR.TRX bit than it will generate (read bit(1)) after slave address .
right?
Thank you
Your faithfully
Mihir dave
Hi Mihir Dave,
Yes, exactly.
Please see the example code I provided in the below E2E post for an example:
https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/773846
See the 'I2CA_ReadFromReg' and 'I2CA_ReadFromManyRegs' functions. Each one will initially transmit control register bytes to the slave, then switch to a master receiver to receive the number of desired bytes.
Best,
Kevin