English
Language : 

AN113 Datasheet, PDF (38/52 Pages) Silicon Laboratories – SERIAL COMMUNICATION WITH THE SMBUS
AN113
} else {
DATA_READY = 1;
WORD = SMB0DAT;
SI = 0;
}
break;
// Valid data has been received. Process
// in OP_CODE handler.
// Slave Receiver: Data byte received while addressed as slave.
// NACK transmitted. Should not occur since AA will not be cleared
// as slave. Fall through to next state.
case SMB_SRODBNACK:
// Slave Receiver: Data byte received while addressed by general call.
// NACK transmitted.
// Should not occur since AA will not be cleared as slave.
case SMB_SRGDBNACK:
AA = 1;
SI = 0;
break;
// Slave Receiver: STOP or repeated START received while addressed as slave.
case SMB_SRSTOP:
SI = 0;
break;
// Slave Transmitter: Own slave address + READ received.
// Load SMB0DAT with data to be output.
case SMB_STOADACK:
SMB0DAT = WORD;
SI = 0;
break;
ACK transmitted.
// Slave Transmitter: Arbitration lost as master. Own address + READ received.
// ACK transmitted.
case SMB_STOARBLOST:
LOST_COMMAND = COMMAND;
//
LOST_WORD = WORD;
// Store variables for use when bus
LOST_CODE = OP_CODE;
// is free.
LOST = 1;
// Retry when bus is free.
SI = 0;
break;
// Slave Transmitter: Data byte transmitted. ACK received. Fall through.
case SMB_STDBACK:
// Slave Transmitter: Data byte transmitted. NACK received. Fall through.
case SMB_STDBNACK:
// Slave Transmitter: Last data byte transmitted.
// No action necessary.
case SMB_STDBLAST:
SI = 0;
break;
ACK received.
// All other status codes invalid. Reset communication.
default:
STO = 1;
38
Rev. 1.3