Hi.. Can you please help me with initiating the inbuilt I2C in ARM7. Manual says 2 things : 1) After start condition is sent, SI is reset and the STAT register is set to 0x08. Then "Interrupt service routine will LOAD I2CDAT (data register) with Slave address(from I2CADR register) and data direction bit(WRITE -0)". 2) I2CADR (slave address register) is LOAD with address ONLY in Slave Mode.
Now if i want to use the Internal I2C in Master Mode: 1. Transmit Mode to sent Slave address and data direction. 2. Receive Mode to receive data from the application.
" should we give the Slave address to I2CADR so that the I2C Load the Slave Address directly to data register I2CDAT after start condition. In this case How will the I2C load the Data Direction bit (How will it know if we want to use it as Tx or Rx) as the status register I2CSTAT will be 0x08 in both Tx and Rx Modes." (or) " should we give the slave address and data direction bit(R/W) to data register I2CDAT directly after start condition is sent. " ... How to Initiate the Internal I2C in ARM7 to acquire data from an external ADC(PCF 8591) which is connected to a variable resister(as an application)?
Plz Help me in this regard.
Thank You very much kris