TI-H: Multimaster I2C routines


[Prev][Next][Index][Thread]

TI-H: Multimaster I2C routines



I fixed a serious bug in my slave I2C routines and released version 0.91
of them. I didn't test the "final" 0.9 version thoroughly, and I forgot
to change some addresses. Sorry. Version 0.91 works definitely.

I've also thought a bit about the protocol that would be used on top of
I2C. My suggestion is that each packet consist of these elements:

1 byte - destination address (of course)
1 byte - length of packet
1 byte - protocol (one is allocated for each program)
1 byte - address of sender
n bytes - freeform data (max 253 bytes I think)
1 byte - checksum (calculated as in Intel Hex format)

The slave would check if the checksum was valid and only ACK the last
byte if it was. If there was an error, the master would resend the
packet.

Then there'd be a variant for the general call address (00000000) that
every I2C device receives. This will be very similar, but requires some
thought. It could, for example, be used for "All hosts, identify
yourself" -type requests, public messages in a chat program etc.

-Ozone

-- 
*** Osma Suominen *** ozone@clinet.fi *** http://www.clinet.fi/~ozone
***


Follow-Ups: