Page 1 of 1

Some questions regarding the sub-20

Posted: Thu Feb 11, 2010 7:28 am
by niror
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.

Re: Some questions regarding the sub-20

Posted: Fri Feb 12, 2010 7:20 am
by xol
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)

Re: Some questions regarding the sub-20

Posted: Wed Jun 09, 2010 3:48 pm
by eryaf
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

Re: Some questions regarding the sub-20

Posted: Wed Jun 09, 2010 7:40 pm
by eryaf
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 :D

Re: Some questions regarding the sub-20

Posted: Thu Jun 10, 2010 1:14 am
by serg
eryaf 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.
No, you have to send the "transfer" command 32 times to the board or use customized firmware
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
eryaf wrote: 3. What ll happen if during I2C or SPI communication, I unplug the cable of the I2C or SPI to the slave?
You will get an error from the board's firmware in this case
eryaf wrote: 4. What ll happen if there is address mismatch for I2C?
The board's firmware and then the interface library return appropriate error code, i.e "no ack"
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?
You will get, probably 3 bytes, but I am not sure, I have to check this.
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

Re: Some questions regarding the sub-20

Posted: Thu Jun 10, 2010 9:07 am
by eryaf
Dear serg,

thanks for your reply :)
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
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:
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
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?

Kindest Regards :) E

Re: Some questions regarding the sub-20

Posted: Fri Jun 11, 2010 11:52 am
by serg
Hi eryaf,
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?
I would say nothing. What do you expect to happen?
eryaf 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?
We didn't test this scenario, but in general, should work
eryaf wrote: PC can have more than 1 SUB20 attached to it, right?
right

Re: Some questions regarding the sub-20

Posted: Tue Aug 31, 2010 2:12 am
by hero_hont
thanks your reply.
That's good when i can read this topic.