does I2C speed matching matters?
KelvinL
Posts: 15
Hi
I am trying to ease my working on interfacing a Multi-touch Panel by the·leverage of PBASIC's I2C command using BS2pe. But·I can't get controller's respond after many tried.
The target controller is in slave mode and with 400 Kbit/s transfer rate. I noticed that BS2pe has transfer rate at 45kBit/s as discribed in PBASIC Syntax guide. Can't find any information talking about the speed match.
Please anyone give me a hint about whether the speed matching is important and should·I keep trying using BS2pe?
I even tried to use·bit bashing, but failed still.
Thank you for·giving me any help.·
I am trying to ease my working on interfacing a Multi-touch Panel by the·leverage of PBASIC's I2C command using BS2pe. But·I can't get controller's respond after many tried.
The target controller is in slave mode and with 400 Kbit/s transfer rate. I noticed that BS2pe has transfer rate at 45kBit/s as discribed in PBASIC Syntax guide. Can't find any information talking about the speed match.
Please anyone give me a hint about whether the speed matching is important and should·I keep trying using BS2pe?
I even tried to use·bit bashing, but failed still.
Thank you for·giving me any help.·
Comments
All of the timing on an I2C, or I2C, bus is based upon the edges· -- that is, the rises and falls, of the signal on the·SCL line.· The requirement is (1) that these rises and falls not occur too close to each other, and (2) that the SDA line be steady (not changing) when the SCL line changes, and the SDA must stay steady for at least some minimum time after a change in SCL.
Changes on the SCL are signals from the master to the slave to do something (read a bit from SDA, or place a bit on SDA for the master to read).· As long as there is time to react, the communication will work OK; then nothing else will happen until SCL changes state again, even if it takes a week for the master to get around to changing it.
So you can go too fast, but you can't go too slow.· All of the timing is controlled by the master, so there is nothing to match.· That is, there is only one timing signal, not two, so "speed matching" has no meaning.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
As you explaination, the BS2 I2COut command should be working, since it's an high level function call, then·I don't have to write the protocal myself.
I was wondering·why·I can't get the slave·respond. Perheps the wrong addressing?
As in the·document for touch panel controller, it describes that the slave has a 7 bits address code of 0x41...
and with additional Read/Write bit behind to form·the first byte when sending to slave.
what i am confusing is·... whether the 7 bits address 0x41 means ...
1)· 0100 001, so need only append the latest·R/W bit to become 0100 0010=0x42(for read)
2)· 100 0001, so need to shift 1 bit left and then append R/W bit to become 1000 0010=0x82(for read)
the Attached bitmap is it's command depiction for retriving X-Y coordinates.
Hope to have your hint again. Thank you.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Kelvin Liao
Post Edited (KelvinL) : 4/28/2009 6:54:13 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
· -- Carl, nn5i@arrl.net
· Yes certainly, I do applied resistors for pulling up.
· Do you suggest me to "scan" all the possibile addresses to check its response?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Kelvin Liao
I would think the second format would be correct (certainly not the first). Generally I2C addresses must be "even" -- so that bit 0 is "free" to be the read/write bit. If the "7-bit" address is $41, then I would presume the "real" address of the device is $82, and $83 would be used for reads.
Can you attach a datasheet for the device?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST
1uffakind.com/robots/povBitMapBuilder.php
1uffakind.com/robots/resistorLadder.php
( Sorry for wrong terminology here - I met the·combination of address and read / write as you know - edited )
I had trouble with the start condition. Make sure to set the·initial state first and than do the pulse change.
I assume you not getting the ACK· ( A ) after you send the command, correct?
PS I could send or post my code for I2C interface to TAOS chip.
Cheers Vaclav
Post Edited (vaclav_sal) : 4/29/2009 4:06:45 PM GMT