
// then I get this over & over

case 0x40:// Slave address + R transmitted, Ack received
      STA = 0;
      STO = 0;
      if (i2c_master_islastrxbyte(mbytenum))
      {
        AA = 0;	// return NACK for data byte, two more bytes 
      }
      else
      {
        AA = 1;	 // return ACK for data byte
      } // if
      	  break;

This is what I have for AA

unsigned char i2c_master_islastrxbyte(unsigned int bytenum)
				    // number of the byte in this transfer
                    // (0 = first byte)
{
  if (bytenum == 3)// want to send 3 bytes
  	{
		return 0; // AA = 0
	}
	else 
  		return 1; // AA = 1
} // i2c_master_islastrxbyte

