AN428
Rev. 0.6 31
STA = 1;
SEND_START = 0;
break;
}
if(SMB_SENDWORDADDR) // Are we sending the word address?
{
SMB_SENDWORDADDR = 0; // Clear flag
SMB0DAT = WORD_ADDR; // Send word address
if (SMB_RANDOMREAD)
{
SEND_START = 1; // Send a START after the next ACK cycle
SMB_RW = READ;
}
break;
}
if (SMB_RW==WRITE) // Is this transfer a WRITE?
{
if (i < SMB_DATA_LEN) // Is there data to send?
{
// send data byte
SMB0DAT = *pSMB_DATA_OUT;
// increment data out pointer
pSMB_DATA_OUT++;
// increment number of bytes sent
i++;
}
else
{
STO = 1; // Set STO to terminte transfer
SMB_BUSY = 0; // Clear software busy flag
Comments to this Manuals