0
\$\begingroup\$

Im programming an I2C device to act as a PMBus slave. Looking at the SMBus protocols (which PMBus is built on) the Receive Byte command has a format described as follows:

+---+---------------+---+---+-----------+---+---+
| S | Slave Address | R | A | Data Byte | A | P |
+---+---------------+---+---+-----------+---+---+

My question then is how is a slave supposed to know which commands data it is supposed to be returning? Is it dependent upon a preceding communications transaction, like reading from a device to which the read location has already been set??

\$\endgroup\$
1
\$\begingroup\$

Receive Byte is a low-level function, equivalent to a simple I2C read. It's up to the slave to decide what data to send in response. It could depend on the context of the previous communications, or there could be some default data such as a status code or sensor value. If the slave device can accept multiple addresses, then the choice of data could be based on the address. Or the command might not be useful at all.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.