1
\$\begingroup\$

Based on answers to my previous post - I have a question about basic I2C transactions.

If a basic transaction has the following structure:

  1. start

  2. chip address

  3. bytes to chip

  4. stop

I am wondering if its correct to execute multiple of these processes in sequence.

For example - here there is a pair of processes:

The first is: START, $3C, ACK, $00, ACK, $8D, ACK, STOP

The second is: START, $3C, ACK, $00, ACK, $AF, ACK, STOP

sequence

Although less efficient than something like: START, $3C, ACK, $10, ACK, $8D, ACK, $00, ACK, $AF, ACK, STOP - would the instructions be executed the same way?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

Yes, it is correct to execute multiple processes in sequence as you show.

Generally speaking, you use I2C to transfer data when the chip is ready to transfer data. Sometimes the chip is ready to transfer an entire frame-worth of video data, which can be thousands of bytes, before an I2C STOP condition. But, it is perfectly fine to transfer a byte at a time if more data is not available yet.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ Please note if this was a more common register-based chip instead of command-based chip, the answer would be no. It's not really about basic I2C transactions but how this specific SSD1306 can be communicated with using I2C. It's always chip-specific. \$\endgroup\$ Commented Jan 14 at 14:24
  • \$\begingroup\$ @Justme I see - so in that instance, the latter mentioned method is ideal? In all honesty - the manufacturer of the chip I am using are telling me to go and use the arduino library, and that they don’t have docs…😓 \$\endgroup\$ Commented Jan 14 at 15:07
  • \$\begingroup\$ But in any case, I am keen to learn the fundamentals of IIC - so will try to interface with my board using the standard SSD1306 docs anyhow \$\endgroup\$ Commented Jan 14 at 15:09
  • \$\begingroup\$ Then as a last resort I will purchase an Arduino and reverse engineer the correct signals. I hope that this won’t be necessary though! \$\endgroup\$ Commented Jan 14 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.