info needed about i2c commands
Archiver
Posts: 46,084
Hi,
A while ago I posted this question but got no response.
So I post it again with an additional question.
The i2cout command lets me format an output string that can exceed a dozens
of bytes.
Q1:
Does the bs2p send all these bytes in a single i2c transfer (defined by i2c
start and
stop condition) or is the output in chunks of a maximum or fixed number of
bytes,
or is each byte send as a separate transfer?
Q2:
I figured out that to use the i2c commands with a PCF8574(A) I/O expander, I
need
to set the address to the last byte send, as the PCF8574 sends every
received databyte
directly to its I/O pins. But how do the i2c commands respond if I address a
device
that is currently not available (empty sockets on pcb)?
Do the i2c commands wait forever to receive an ACK? Or do they just generate
a clock pulse
so an i2c slave can send an ACK and the i2c commands merely assume that the
device is present?
I don't own a bs2p yet so any info regarding this is appreciated.
(anyone from parallax perhaps)
Regards peter
A while ago I posted this question but got no response.
So I post it again with an additional question.
The i2cout command lets me format an output string that can exceed a dozens
of bytes.
Q1:
Does the bs2p send all these bytes in a single i2c transfer (defined by i2c
start and
stop condition) or is the output in chunks of a maximum or fixed number of
bytes,
or is each byte send as a separate transfer?
Q2:
I figured out that to use the i2c commands with a PCF8574(A) I/O expander, I
need
to set the address to the last byte send, as the PCF8574 sends every
received databyte
directly to its I/O pins. But how do the i2c commands respond if I address a
device
that is currently not available (empty sockets on pcb)?
Do the i2c commands wait forever to receive an ACK? Or do they just generate
a clock pulse
so an i2c slave can send an ACK and the i2c commands merely assume that the
device is present?
I don't own a bs2p yet so any info regarding this is appreciated.
(anyone from parallax perhaps)
Regards peter