Hi,
I'm trying to develop a link between the ADSP 21489 and ADT7411. I have to use the I2C protocol. Could someone point me to a C code example demonstrating an I2C transaction for the ADSP 21489.
Thanks!
Hi,
I'm trying to develop a link between the ADSP 21489 and ADT7411. I have to use the I2C protocol. Could someone point me to a C code example demonstrating an I2C transaction for the ADSP 21489.
Thanks!
Hi Jeyanthi,
Thanks for your post. After posting my question, I looked around the Analog Devices Forum and found some examples in assembly (posted by Analog Devices Engineers) and started the work in C. I also came across the example that you attached. That example was posted by someone else in another post thread since the examples provided by Analog Devices were only available in Assembly. The attached example is a good example of TWI Master, however I have a couple of questions for you.
1. Inside the TWI_Transmit_Data_Polling function, it is sending N bytes (in this case 10). Would that really work? Don't we need to send 1 byte in each transmission and for each transmission repeat the sequence of events by resending the slave address before the data?
2. In the same TWI_Transmit_Data_Polling, wouldn't we need to restart (TWIRSTART) ? Is this in the Master_TWI_Init taking care of that when init is called ?
// Enable the master control register
*pTWIMCTL = (N << 6) ;
*pTWIMCTL |= TWIMEN;
Thank You!
Deco
Hi Jeyanthi,
Thanks for your post. After posting my question, I looked around the Analog Devices Forum and found some examples in assembly (posted by Analog Devices Engineers) and started the work in C. I also came across the example that you attached. That example was posted by someone else in another post thread since the examples provided by Analog Devices were only available in Assembly. The attached example is a good example of TWI Master, however I have a couple of questions for you.
1. Inside the TWI_Transmit_Data_Polling function, it is sending N bytes (in this case 10). Would that really work? Don't we need to send 1 byte in each transmission and for each transmission repeat the sequence of events by resending the slave address before the data?
2. In the same TWI_Transmit_Data_Polling, wouldn't we need to restart (TWIRSTART) ? Is this in the Master_TWI_Init taking care of that when init is called ?
// Enable the master control register
*pTWIMCTL = (N << 6) ;
*pTWIMCTL |= TWIMEN;
Thank You!
Deco
Hi,
I'm trying to develop a link between the ADSP 21489 and ADT7411. I have to use the I2C protocol. Could someone point me to a C code example demonstrating an I2C transaction for the ADSP 21489.
email : xiaobingchen63@sina.com
Hi Simon,
Please find the example TWI code in the below Ezone link. This can be directly run on ADSP-21479 EZ-kit. I have configured ADSP-21479 as a master and another ADSP-21479 as a slave. Though this is for ADSP-21479, you can easily port it to ADSP-21489. Please use this as reference and modify as per your requirement.
ez.analog.com/.../323975
Regards,
Anand Selvaraj.