AnsweredAssumed Answered

9S08SH8 and I2C

Question asked by bob_walker on Nov 9, 2012
Latest reply on Dec 17, 2012 by Monica Arvizu

Would anyone from Processor Expert like to weigh in on this one....?

 

PE initializes I2C as part of MCUinit() as follows:

 

  /* IICF: MULT1=0,MULT0=1,ICR5=0,ICR4=0,ICR3=1,ICR2=0,ICR1=1,ICR0=1 */

  IICF = 0x4BU;                                     

  /* IICS: TCF=1,IAAS=0,BUSY=0,ARBL=1,SRW=0,IICIF=1,RXAK=0 */

  IICS = 0x92U;                        /* Clear the interrupt flags */

  /* IICC1: IICEN=1 */

  IICC1 |= (unsigned char)0x80U;                     

 

I fail to understand why TCF is written to (=1). According to Table 11-7 in the datasheet (IICS), TCF is cleared automatically by tx/rx events and is

shown as a read only bit.

 

Is there something about this bit that has not been disclosed or is this just an error on PE's part?

Outcomes