Hi,
I'm interesting in the sub-20 model for debugging proposes.
I have a couple of questions though:
1. Can I use this product as an i2c monitor?
That means sniffing all communication between devices on the i2c bus?
2. Can I emulate 2 or three slave devices on the i2c bus?
thanks,
ran.
Some questions regarding the sub-20
Moderator: serg
Re: Some questions regarding the sub-20
1. SUB-20 is not an I2C monitor. It can be I2C master or I2C slave. To implement monitor more complex and powerfull core required. Price of such device is also not under $100
2. Yes. Not simultaneously. You can change slave address of SUB-20 board in I2C slave mode.
http://www.xdimax.com/sub20/doc/HTML/sub_i2c_config.htm
This requires synchronization between I2C master and your software changing slave address.
Another option is to use a number of SUB-20 boards connected to the same I2C bus (and more likely to the same PC)
2. Yes. Not simultaneously. You can change slave address of SUB-20 board in I2C slave mode.
http://www.xdimax.com/sub20/doc/HTML/sub_i2c_config.htm
This requires synchronization between I2C master and your software changing slave address.
Another option is to use a number of SUB-20 boards connected to the same I2C bus (and more likely to the same PC)
Re: Some questions regarding the sub-20
Question 
1. Can I ask SUB20 to do multiple lets say SPI communication? So can I say to the SUB20: "Do this SPI 32 times and report the result to me." either than executing one by one SPI until 32 time.
2. Can I use SPI and I2C at the same time? Or do I need 2 SUB20 to do that?
Kindest Regards
E

1. Can I ask SUB20 to do multiple lets say SPI communication? So can I say to the SUB20: "Do this SPI 32 times and report the result to me." either than executing one by one SPI until 32 time.
2. Can I use SPI and I2C at the same time? Or do I need 2 SUB20 to do that?
Kindest Regards

Re: Some questions regarding the sub-20
Another question 
3. What ll happen if during I2C or SPI communication, I unplug the cable of the I2C or SPI to the slave?
4. What ll happen if there is address mismatch for I2C?
5. What ll happen if the reply for I2C is more than the slave used to give, for example we ask 5bytes while the slave only gives 3?
6. Can I use this SUB20 for hot swapping/hot plugging?
Thanks a lot

3. What ll happen if during I2C or SPI communication, I unplug the cable of the I2C or SPI to the slave?
4. What ll happen if there is address mismatch for I2C?
5. What ll happen if the reply for I2C is more than the slave used to give, for example we ask 5bytes while the slave only gives 3?
6. Can I use this SUB20 for hot swapping/hot plugging?
Thanks a lot

Re: Some questions regarding the sub-20
No, you have to send the "transfer" command 32 times to the board or use customized firmwareeryaf wrote: 1. Can I ask SUB20 to do multiple lets say SPI communication? So can I say to the SUB20: "Do this SPI 32 times and
report the result to me." either than executing one by one SPI until 32 time.
Well, not "at the same time", but one after another. You need only one board for this. SPI and I2C use different connectors on the board. You just call different API functions/methodseryaf wrote: 2. Can I use SPI and I2C at the same time? Or do I need 2 SUB20 to do that?
You will get an error from the board's firmware in this caseeryaf wrote: 3. What ll happen if during I2C or SPI communication, I unplug the cable of the I2C or SPI to the slave?
The board's firmware and then the interface library return appropriate error code, i.e "no ack"eryaf wrote: 4. What ll happen if there is address mismatch for I2C?
You will get, probably 3 bytes, but I am not sure, I have to check this.eryaf wrote: 5. What ll happen if the reply for I2C is more than the slave used to give, for example we ask 5bytes while the slave only gives 3?
Since the SUB-20 is a USB(bus powered) board it supports hot swapping/hot plugging I guesseryaf wrote: 6. Can I use this SUB20 for hot swapping/hot plugging
Re: Some questions regarding the sub-20
Dear serg,
thanks for your reply
Kindest Regards
E
thanks for your reply

What i mean here is for I2C and SPI, so if there is I2C or SPI transaction in the bus, and I plug new I2C or SPI device, what will happen?eryaf wrote:
6. Can I use this SUB20 for hot swapping/hot plugging
Since the SUB-20 is a USB(bus powered) board it supports hot swapping/hot plugging I guess
How about if the SUB-20 is configured as slave, both SPI and I2C slave, and there are 2 communications, SPI and I2C at the same time. Can the SUB20 handle this? a PC can have more than 1 SUB20 attached to it, right?eryaf wrote:
2. Can I use SPI and I2C at the same time? Or do I need 2 SUB20 to do that?
Well, not "at the same time", but one after another. You need only one board for this. SPI and I2C use different connectors on the board. You just call different API functions/methods
Kindest Regards

Re: Some questions regarding the sub-20
Hi eryaf,
I would say nothing. What do you expect to happen?eryaf wrote: What i mean here is for I2C and SPI, so if there is I2C or SPI transaction in the bus, and I plug new I2C or SPI device, what will happen?
We didn't test this scenario, but in general, should workeryaf wrote: How about if the SUB-20 is configured as slave, both SPI and I2C slave, and there are 2 communications, SPI and I2C at the same time. Can the SUB20 handle this?
righteryaf wrote: PC can have more than 1 SUB20 attached to it, right?
Re: Some questions regarding the sub-20
thanks your reply.
That's good when i can read this topic.
That's good when i can read this topic.