Scott Pearse

IIC problems with HCS08

Discussion created by Scott Pearse on Apr 19, 2007
Latest reply on Apr 23, 2009 by Ed Leslie
   I am trying to get my IIC bus to work on an HCS08 microporcessor.  I am using GB60_IIC.mcp that was provided with HCS08QRUG.pdf.  I can get one transmission from slave to master to work, but RXAK (IIC1S_RXAK) bit is being set high at the end of transmission, throwing my status register, I2C_STEP, into error status.  If everything was going smoothly, it would be set low.

What I would like to do is repeatedly send changing data from slave to master, but this error keeps me from sending a second transmission

This happens in the interrupt handler, with the following code:

        if(IIC1S_RXAK==1){      /* Verify if byte sent was ACK */
          IIC1C_MST = 0;
        I2C_STEP = IIC_ERROR_STATUS;
        return;
        }

I tried commenting this out, but the second data transfer would not pass.  Does anybody know why RXAK is being set high? I greatly appreciate any help.

Outcomes