Electronics > Projects, Designs, and Technical Stuff
Confused about how this I2C read works
<< < (3/8) > >>
Chet T16:
Yes, its in a car. It is the radio (master) and the display/wheel controls(slave). I tried doing this on my old car which had a very similar setup (3 wires, 2 of which followed the i2c protocol)

The car is a 2002, it has a primitive CAN bus but the radio setup is isolated. The later versions of my car did switch to CAN for the radio.
richcj10:
It is probably CAN. It may not be at CAN voltages. That means it is not using transceivers.  Do you have a scope? Logic analyzer?
AndreasF:

--- Quote from: Chet T16 on February 25, 2013, 01:47:09 am ---Further testing shows that its the slave that decides when to be read from, the master holding the line low when writing and the slave doing the same for reads.
...

--- End quote ---

That doesn't really sound like 'slave' behaviour (unless I misunderstood your description). You can have multiple masters in an I2C bus, if what you have is indeed an I2C protocol.
Chet T16:

--- Quote from: richcj10 on March 01, 2013, 07:08:12 am ---It is probably CAN. It may not be at CAN voltages. That means it is not using transceivers.  Do you have a scope? Logic analyzer?

--- End quote ---

Yes, both. 5v logic levels and the logic analyser decodes it as i2c. Writing works fine using a standard i2c library (only modified to use the 7kHz clock)
Chet T16:

--- Quote from: AndreasF on March 01, 2013, 07:20:32 am ---
--- Quote from: Chet T16 on February 25, 2013, 01:47:09 am ---Further testing shows that its the slave that decides when to be read from, the master holding the line low when writing and the slave doing the same for reads.
...

--- End quote ---

That doesn't really sound like 'slave' behaviour (unless I misunderstood your description). You can have multiple masters in an I2C bus, if what you have is indeed an I2C protocol.

--- End quote ---

When i posted originally i wasn't aware that it was the slave (i'll stick with that term for the minute!) that was pulling the third line low. It does appear the the reads are initiated from the master following the i2c protocol but the timing of the reads is determined by the slave.

The thing i find unusual is the varying number of bytes sent from the slave as it was my understanding that the master determined the amount read whereas here it would have no prior knowledge of whether it had five bytes to read. I don't think this will matter for me reading button presses anyway but i am curious.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod