IOW56 (SPI) speed performance

This is the English forum for all topics related to IO-Warrior. Please post in English only

Moderator: Guido Körber

Post Reply
willem
Posts: 17
Joined: Tue Oct 25, 2005 3:09 pm
Location: Netherlands

IOW56 (SPI) speed performance

Post by willem »

Dear forum members,
I’m working on hardware to be connected to the IOW56 to do SPI based I/O to several slaves (up to 14) and have to make estimation on overall IO speed/performance.
I realize the “magic number” for HID USB2 by the IOW56 is 1ms per report, but how many reports are involved in the end, and are there any other issues slowing down performance......
Because I’m mainly hardware engineer I would appreciate some input on what are the expected limitations on the software side (dll, IOW-kit etc) and or Windows.
The plan is to do software in Visual C++

One of the slaves is for TTL IO to 56 lines, for this purpose I use 2 cascaded MAX7301AAX ( http://datasheets.maxim-ic.com/en/ds/MAX7301.pdf )SPI 28-line IOexpanders as a single SPI slave device. (one for 28 line TTL input, one for 28 line TTL output)

Beside this SPI slave several other slaves will be connected.
To select the actual slave hardware to “talk” to I plan to use P3 and P4 lines directly from the IOW56 (combined with the SPI /SS).

My question concerns the max. Speed to read/write the TTL IO lines on the MAX7301AAX chips based on the following.

A complete read/write action for my 2 x 28 IO lines may consist out of
- forcing LOW the select line in charge on IOW56 P3.x or P4.x
- shift out 3 SPI report ID $09out with 4 byte of data each to read/write
- shift in 3 SPI report ID $09in
- forcing HIGH the select line

How much time would it take (approx) to get my IO results ???

The special mode setup for SPI on the IOW56 and also the initialization of the MAX7301AAX has to be done only once during startup of the system, so any timing issues on this aspect are not critical and not a part of my question on the IO performance.

SPI clock speed SCLK will be 93.75kHz, but I assume this is not very relevant on the overall performance because I just read 4 byte of data per report (or am I wrong)

I’m looking forward to any reply, thank you in advance!!

Willem
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Re: IOW56 (SPI) speed performance

Post by Guido Körber »

Writing the status of the select line takes 1ms. If you switch from one SPI slave to another this can be done with a single write, as you set all outputs at the same time. Reading and writing on SPI is always simultaneous. So unless your slave needs some setup packet you write the command to it and at the same time read the result back. This is only one transaction, another millisecond, worst case two milliseconds if the return data packet misses the next available time slot.
willem
Posts: 17
Joined: Tue Oct 25, 2005 3:09 pm
Location: Netherlands

Re: IOW56 (SPI) speed performance

Post by willem »

Thank you Guido!

I understand as overall speed result to read/write all my data to the IO expander chipset some 7 or 8 ms should be possible, that would be fine.

However, our software engineer find results in order of upto 60...65ms.
I wonder if the problem could be in the USB port type (USB1 or USB2) the IOW56 is connected to
Is there any signaling on a USBport type match / mismatch available (IOW highspeed USB2 device connected to USB1 port).

(the PC hardware device manager stated both USB Universal Host Controller and USB2 Enhanced Controller available, but unclear which physical USB connector is USB1 ans which is USB2)


Regards,

Willem
Guido Körber
Site Admin
Posts: 2856
Joined: Tue Nov 25, 2003 10:25 pm
Location: Germany/Berlin
Contact:

Re: IOW56 (SPI) speed performance

Post by Guido Körber »

Enhanced host controller is 2.0. Though that does not really make a difference since the IOW56 is Full Speed and not High Speed. It gets connected to one of the 1.x hosts when plugged direct into the computer, when plugged into a 2.0 hub the hub takes care for the speed translation.

Though some hubs have only one so called Transaction Translator, if multiple Low or Full Speed devices are connected to such a hub this may reduce the speed.

Also the strategy of writing to the USB can influence the total throughput. If possible multiple writes should be queued at the same time.
willem
Posts: 17
Joined: Tue Oct 25, 2005 3:09 pm
Location: Netherlands

Re: IOW56 (SPI) speed performance

Post by willem »

OK Guido,
So the actual USB connector on the PC is not that important in terms of my TTL IO speed.
Well, then our software engineer may have a closer look at his code.

Maybe he get in touch with more specific questions on this speed item if you don't mind....

Regards,
Willem
Post Reply